[android-developers] Re: Yet another HTTPS problem with HttpClient in Android SDK v1.0r1

2008-10-20 Thread vel

I am also facing the same problem.
Can please any one help us.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Inflate Exception... how to diagnose?

2008-10-20 Thread for android
This post might help you also.

http://groups.google.com/group/android-developers/browse_thread/thread/f169c76bc7faccaf/cab78c24a36d3101?lnk=raotpli=1

Also if you have done a sample for inflation.Could share a code snippet.I
also need it.

Thanks

On Mon, Oct 20, 2008 at 8:07 AM, Romain Guy [EMAIL PROTECTED] wrote:


 In the Logcat view of Eclipse (or from a shell, type adb logcat), you
 will see the full stack trace with the explanation of what's wrong.

 On Sun, Oct 19, 2008 at 7:34 PM, DulcetTone [EMAIL PROTECTED] wrote:
 
  I have an XML file that causes an inflate exception with no
  discernible detail to help me diagnose what went wrong
 
  What is the best way to get Android to offer details on what was
  objectionable?
 
  tone
 
  FYI, here was the XML:
 
  ?xml version=1.0 encoding=utf-8?
 
  RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
  android
 android:layout_width=fill_parent
 android:layout_height=wrap_content
 android:padding=10px
 
 Spinner android:id=@+id/skin_name
 android:layout_width=fill_parent
 android:layout_height=wrap_content
 android:drawSelectorOnTop=false/
 
 TextField android:id=@+id/ospeed_label
 android:text=Output Speed
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:layout_below=@id/skin_name/
 
 SeekBar android:id=@+id/ospeed
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:layout_toRightOf=@id/ospeed_label/
 
 
 CheckBox android:id=@+id/var_output
 android:text=Do incoming VAR
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:layout_below=@id/ospeed/
 
 
 TextField android:id=@+id/ispeed_label
 android:text=Input Speed
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:layout_below=@id/var_output/
 
 SeekBar android:id=@+id/ispeed
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:layout_toRightOf=@id/ispeed_label/
 
 
 Button android:id=@+id/ok
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:layout_below=@id/ispeed
 android:layout_alignParentRight=true
 android:layout_marginLeft=10px
 android:text=OK /
 
 Button android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:layout_toLeftOf=@id/ok
 android:layout_alignTop=@id/ok
 android:text=Cancel /
  /RelativeLayout
 
 
  
 



 --
 Romain Guy
 www.curious-creature.org

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Stored data files in Android App

2008-10-20 Thread for android
These would be placed in ur application package which will be there in
data/data..You can view them in File Explorer in Eclipse with DDMS mode.

On Sat, Oct 18, 2008 at 10:51 PM, Le Duc Bao [EMAIL PROTECTED] wrote:


 Dear,

 I build a Android program with some static data files.

 I looked at Android Document:
 Android provides access to read or write streams to files local to an
 application. Call Context.openFileOutput() and Context.openFileInput()
 with a local name and path to read and write files. Calling these
 methods with the same name and path strings from another application
 will not work; you can only access local files.

 If I have some existent data files, where they could be placed and how
 to read them by using Context.openFile*() methods?

 Thanks,
 Bao Le Duc

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: background process

2008-10-20 Thread [EMAIL PROTECTED]

Thanks, i read it now.

i hope that will be the Answer



On 17 oct, 17:38, Ludwig [EMAIL PROTECTED] wrote:
 You will need to implement a service and have something that listens for the
 boot completed message being broadcast.
 I wrote about this 
 athttp://androidgps.blogspot.com/2008/09/starting-android-service-at-bo...

 HTH

 Ludwig

 2008/10/17 [EMAIL PROTECTED] [EMAIL PROTECTED]



  I 'm interested too by running my program at the same time of boot,
  and in background.

  I try with thread, but that's display application, and next start
  thread.

  So that's not good.

  any idea?

  thanks

  On 14 oct, 11:22, zeshu [EMAIL PROTECTED] wrote:
   How to design a process that boots itself up always at the same time
   with the device. This process should run on thebackground(like virus
   scanners), and observe what kind of events take place in the device
   (these events could be e.g. voice calls, network cell-id changes and
   incoming messages). If the process crashes, there should be some kind
   of implementation that initiates the process back up. How could this
   kind ofbackgroundprocess be built on Google Android?Please provide
   references/guidelines regarding how to start building and
   implementing it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Inflate Exception... how to diagnose?

2008-10-20 Thread shailesh prakash

I don't know why you all complexing the problem. I t is just a missing
classname in provided namespace.
 As I can see there is no TextField in res/android namespace better
you try TextView

On Mon, Oct 20, 2008 at 11:55 AM, for android [EMAIL PROTECTED] wrote:
 This post might help you also.

 http://groups.google.com/group/android-developers/browse_thread/thread/f169c76bc7faccaf/cab78c24a36d3101?lnk=raotpli=1

 Also if you have done a sample for inflation.Could share a code snippet.I
 also need it.

 Thanks

 On Mon, Oct 20, 2008 at 8:07 AM, Romain Guy [EMAIL PROTECTED] wrote:

 In the Logcat view of Eclipse (or from a shell, type adb logcat), you
 will see the full stack trace with the explanation of what's wrong.

 On Sun, Oct 19, 2008 at 7:34 PM, DulcetTone [EMAIL PROTECTED] wrote:
 
  I have an XML file that causes an inflate exception with no
  discernible detail to help me diagnose what went wrong
 
  What is the best way to get Android to offer details on what was
  objectionable?
 
  tone
 
  FYI, here was the XML:
 
  ?xml version=1.0 encoding=utf-8?
 
  RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
  android
 android:layout_width=fill_parent
 android:layout_height=wrap_content
 android:padding=10px
 
 Spinner android:id=@+id/skin_name
 android:layout_width=fill_parent
 android:layout_height=wrap_content
 android:drawSelectorOnTop=false/
 
 TextField android:id=@+id/ospeed_label
 android:text=Output Speed
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:layout_below=@id/skin_name/
 
 SeekBar android:id=@+id/ospeed
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:layout_toRightOf=@id/ospeed_label/
 
 
 CheckBox android:id=@+id/var_output
 android:text=Do incoming VAR
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:layout_below=@id/ospeed/
 
 
 TextField android:id=@+id/ispeed_label
 android:text=Input Speed
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:layout_below=@id/var_output/
 
 SeekBar android:id=@+id/ispeed
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:layout_toRightOf=@id/ispeed_label/
 
 
 Button android:id=@+id/ok
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:layout_below=@id/ispeed
 android:layout_alignParentRight=true
 android:layout_marginLeft=10px
 android:text=OK /
 
 Button android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:layout_toLeftOf=@id/ok
 android:layout_alignTop=@id/ok
 android:text=Cancel /
  /RelativeLayout
 
 
  
 



 --
 Romain Guy
 www.curious-creature.org




 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: background process

2008-10-20 Thread [EMAIL PROTECTED]

I tryed it but, i Think It works. My programm run when the phone boot.
But it always be on the foreground.

I'd like not.



On 20 oct, 08:34, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Thanks, i read it now.

 i hope that will be the Answer

 On 17 oct, 17:38, Ludwig [EMAIL PROTECTED] wrote:

  You will need to implement a service and have something that listens for the
  boot completed message being broadcast.
  I wrote about this 
  athttp://androidgps.blogspot.com/2008/09/starting-android-service-at-bo...

  HTH

  Ludwig

  2008/10/17 [EMAIL PROTECTED] [EMAIL PROTECTED]

   I 'm interested too by running my program at the same time of boot,
   and inbackground.

   I try with thread, but that's display application, and next start
   thread.

   So that's not good.

   any idea?

   thanks

   On 14 oct, 11:22, zeshu [EMAIL PROTECTED] wrote:
How to design a process that boots itself up always at the same time
with the device. This process should run on thebackground(like virus
scanners), and observe what kind of events take place in the device
(these events could be e.g. voice calls, network cell-id changes and
incoming messages). If the process crashes, there should be some kind
of implementation that initiates the process back up. How could this
kind ofbackgroundprocess be built on Google Android?Please provide
references/guidelines regarding how to start building and
implementing it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: this.finish() did the activity totally exist??

2008-10-20 Thread Jason Parekh
This may be useful (first hit from 'java interrupt thread'):

http://articles.techrepublic.com.com/5100-10878_11-5144546.html

jason


On Sun, Oct 19, 2008 at 7:58 PM, Wesley [EMAIL PROTECTED] wrote:

 hi,

 how to terminate a threads??? any example???
 how to free all resources???

 do u mind give me some example a simple one will do...

 thanks...



 wesley.


 On Mon, Oct 20, 2008 at 10:51 AM, Romain Guy [EMAIL PROTECTED] wrote:


 You should free all resources and terminate all your threads when you
 Activity stops or is destroyed (in onDestroy().)

 On Sun, Oct 19, 2008 at 7:50 PM, Wesley [EMAIL PROTECTED] wrote:
  oic... because I afraid if some of my thread still running at the
  background... and I can't manage to allocate it...
  if this is the case... I think I should move on...
 
  thanks Romain...
 
  have a nice day...
 
 
  Wesley.
 
  On Mon, Oct 20, 2008 at 10:37 AM, Romain Guy [EMAIL PROTECTED]
 wrote:
 
  It is normal. finish() does not necessarily destroy the process.
  Android manages processes automatically and destroy processes whenever
  more resources are need. Just don't worry about it :)
 
  On Sun, Oct 19, 2008 at 7:33 PM, Wesley Sagittarius 
 [EMAIL PROTECTED]
  wrote:
  
   hi,
  
   I don't know is it a issue or not???
  
   when I this.finish() method was call... logically, it will exist the
   process and remove in the process list right???
  
   but when I got to check the process in the devices... my program seem
   that still there wo is it normal???
  
   any one have any idea on it???
  
  
   Wesley.
   
  
 
 
 
  --
  Romain Guy
  www.curious-creature.org
 
 
 
 
  
 



 --
 Romain Guy
 www.curious-creature.org




 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Web-view is not loading external URLs

2008-10-20 Thread jrb9253

Hi. I also have this problem, like Tahir Akhtar.
And I had add Uses Permission in the AndroidManifest.xml.
But still get a Website Not Available.
What's wrong ??

Best Regards,
jrb9253

On 10月15日, 上午1時12分, schmielson [EMAIL PROTECTED] wrote:
 Hey Tahir,

 In order for your application to access the web (ex. via aWebView),
 you'll need to add the Uses Permission Internet.  You can add this
 in the AndroidManifest.xml editor.

 Best,
 Dave

 On Oct 13, 8:06 am, Tahir Akhtar [EMAIL PROTECTED] wrote:



  I am just starting with Android.

  I was trying following example but with external URLs:

 http://android-developers.blogspot.com/2008/09/using-webviews.html

  The example shows how to load an HTML file from assets folder (file://
  url) and display it in awebview.

  But when I try it with external URLs (likehttp://google.com), I am
  always getting a Website Not Available error. Though Android's built-
  in browser is able to access all external URLs so its not connection
  issue I guess.

  I suspect that it has something to do with permissions but wasn't able
  to confirm it.- 隱藏被引用文字 -

 - 顯示被引用文字 -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Java Source for Android Classes

2008-10-20 Thread b2amedina

Does anyone know if the java source code for the android classes has
been posted somewhere? Especially the android.webkit classes?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Apps for Democracy Contest $20,000 in Prizes

2008-10-20 Thread corbett3000

So we're hosting an app dev challenge here in DC (anyone from anywhere
can enter) and our first submission was an iphone app.

I'm hoping you guys will be interested to check out Apps for Democracy
and see if an Android app would be useful for visualizing DC's public
data. here's the info:

Apps for Democracy will feature 60 cash prizes from $2000 to $100
dollars for a total of $20,000 in prizes. Developers and designers
will compete by creating web applications, widgets, Google Maps mash-
ups, iPhone apps, Facebook apps, and other digital utilities that
visualize DC.gov’s Data Catalog (http://data.octo.dc.gov), which
provides real-time data from multiple agencies to citizens — a
catalyst ensuring agencies operate as more responsive, better
performing organizations.

More at http://www.appsfordemocracy.org

-Peter (@corbett3000)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Examples vs. Docs vs. Reality

2008-10-20 Thread Arun Mankad
Many of the examples available in the net also dont work with 1.0

On Mon, Oct 20, 2008 at 8:55 AM, ScottG [EMAIL PROTECTED] wrote:


 Folks, there is a serious disconnect between the examples that are
 provided, what the documentation says, and what the Version 1.0 SDK
 actually implements.

 For openers, it'd be of great help to get rid of examples posted on
 this forum and in Android docs that only work on m5.  I gotta believe
 this is causing a lot of grief. I can understand old m5 code on the
 Web but not on code.google.com.

 Second, there are a number of m5 entry points that are implemented as
 NOPs in v1.0.  This is NOT helpful.

 Lots of good thinking as gone into V1.0.  It's a pity that it's so
 hard to find.

 IMHO, as always.

 Cheers, Scott


 



-- 
Arun Mankad

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] About the font used by ADT layout editor

2008-10-20 Thread 小土豆

hi, guys
I writed some Chinese words in a textview. It can't display correctly
in eclipse but display correctly in emulator.I tried to change the
fonts of JRE by configure the fontconfig.properties, but it doesn't
work. I really want to know that how can i fix it.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Browser based installation fails on G1

2008-10-20 Thread InC

I had  chance to install an app on real h/w today and it went all the
way till the last step, when it came back with a application install
unsuccessful ( something close to that).

I created a .apk file and signed it with keytool and jarsigner. I then
verified it with jarsigner and put it on a webserver. From the G1
browser downloaded the file and it went through the permissions screen
and then I finally hit install. Comes back with a install
unsuccessful message.

The same install from the USB interface works just fine - I did a adb
install app.apk and it loaded it - no problem.
Any ideas on what's going on.

thanks
InC

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Java Source for Android Classes

2008-10-20 Thread b2amedina

Does anyone know if the java source code to the android classes has
been made available somewhere?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Problem Starting new ActivityForResult

2008-10-20 Thread fahadlala

Using Eclipse 3.4  ADT Plugin to Debug;

I have followed the NotePadv2 Tutorial and created 2 activities, the
First ListActivity works fine and shows No Notes/Customers Yet, but
when launching Second activity through Add Notes/Customers  I get
the following error: The applciation has stopped unexpectedly.Please
try again.

This is the Step where this occurs:

   private void createCustomer() {
Intent i = new Intent(this, CustomerAddEdit.class);
 startActivityForResult(i, ACTIVITY_CREATE);   // -- Error after
this inside threads
}

The logcat produces no messages.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Examples vs. Docs vs. Reality

2008-10-20 Thread Megha Joshi
2008/10/19 ScottG [EMAIL PROTECTED]


 Folks, there is a serious disconnect between the examples that are
 provided, what the documentation says, and what the Version 1.0 SDK
 actually implements.

 For openers, it'd be of great help to get rid of examples posted on
 this forum and in Android docs that only work on m5.  I gotta believe
 this is causing a lot of grief. I can understand old m5 code on the
 Web but not on code.google.com.


These  samples from this forum are not removed. Sorry about that. I don't
think there is any m5 code on code.google.com.
Let us know if you know of any.



 Second, there are a number of m5 entry points that are implemented as
 NOPs in v1.0.  This is NOT helpful.



 Lots of good thinking as gone into V1.0.  It's a pity that it's so
 hard to find.


We will be releasing a set of stepwise Hello World tutorials for V1.0
shortly. I hope that would help.


 IMHO, as always.

 Cheers, Scott


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Examples vs. Docs vs. Reality

2008-10-20 Thread Megha Joshi
2008/10/20 Megha Joshi [EMAIL PROTECTED]



 2008/10/19 ScottG [EMAIL PROTECTED]


 Folks, there is a serious disconnect between the examples that are
 provided, what the documentation says, and what the Version 1.0 SDK
 actually implements.

 For openers, it'd be of great help to get rid of examples posted on
 this forum and in Android docs that only work on m5.  I gotta believe
 this is causing a lot of grief. I can understand old m5 code on the
 Web but not on code.google.com.


 These  samples from this forum are not removed. Sorry about that. I don't
 think there is any m5 code on code.google.com.
 Let us know if you know of any.


I meant these samples are now removed  :)




 Second, there are a number of m5 entry points that are implemented as
 NOPs in v1.0.  This is NOT helpful.



 Lots of good thinking as gone into V1.0.  It's a pity that it's so
 hard to find.


 We will be releasing a set of stepwise Hello World tutorials for V1.0
 shortly. I hope that would help.


 IMHO, as always.

 Cheers, Scott


 



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Business and Finance

2008-10-20 Thread beauty

Why does your business need finance?*It is important to clearly
identify the purpose of the funds.Business finance is generally
used to acquire assets which are employedto help the
business achieve its profit-making objectives, such as: *
to purchase capital items (fixed assets) eg, plant, equipment, ...

http://www.freewebs.com/krishnagri/
http://indianfriendfinder.com/go/g1029652-pmem
http://italianfriendfinder.com/go/g1029652-pmem

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Video and Audio format supported in Android SDK 1.0

2008-10-20 Thread Nan.YE

Hi all,

What video and audio format are supported in Android SDK 1.0 and T-
mobile G1 devices?
Could anyone give me a brief conclusion?

And does Android platform support codec extension? That means
developer can import some new codes into the system to support new
media formats?

Best regards,
Nan YE

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Power issue of the location aware background process

2008-10-20 Thread Zen

I am wondering if I can make a process as a background process, which
can be listenning on the gps or cell id changing.

1. How to make a background process, like a service?
2. Will I need to set to phone power always on to make this work?
3. If the phone goes to sleep mode, will the gps position changing
event wake it up? I guess only if the gps chip has a interrupt you can
set to...

I am not sure how the MIT project Locale handle this.
http://code.google.com/android/adc_gallery/app.html?id=25
Do we need to run the applicaiton on the foreground all the time? I
guess the phone power will be gone soon if I run this applicaiton all
the time...

Zen

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: About the font used by ADT layout editor

2008-10-20 Thread Ludwig
If your problem is to display Chinese fonts correctly in Eclipse, you
probably have the encoding set incorrectly for Eclipse. To set the correct
encoding for a file go to its properties (Edit-Set Encoding, this is the
last in my second pull-down menu, not sure what it would say if you are
using a non-English version). I use UTF-8. You can also set the default
encoding for a project by going to its properties.

As your fonts display correctly in the Emulator, your compilation process
etc seem fine.

Apologies if I misunderstood your question.

Ludwig

2008/10/20 小土豆 [EMAIL PROTECTED]


 hi, guys
 I writed some Chinese words in a textview. It can't display correctly
 in eclipse but display correctly in emulator.I tried to change the
 fonts of JRE by configure the fontconfig.properties, but it doesn't
 work. I really want to know that how can i fix it.

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] java.io.IOException: Couldn't open /data/data/com.basic.ui/cache_/data.xml (parser problem)

2008-10-20 Thread Wesley Sagittarius

hi all,

I want to download a xml file from internet and store it in my app
dir...

I manage to download it...
but...

I cannot parser due to the error below...
09-30 05:41:09.305: INFO/WESLEY(2340): java.io.IOException: Couldn't
open /data/data/com.basic.ui/cache_/data.xml

any one got this exception before???

how to solve it???



wesley.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Yet another HTTPS problem with HttpClient in Android SDK v1.0r1

2008-10-20 Thread Guillaume Perrot

My server used a valid certificate (authenticated by godaddy.com), you
can view the certificate by trying to access https://ubithere.com:5280/http-bind
I have the same error when I used a self-signed certificate.

On Oct 20, 8:13 am, vel [EMAIL PROTECTED] wrote:
 I am also facing the same problem.
 Can please any one help us.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How can I get help on /system/bin ash commands?

2008-10-20 Thread [EMAIL PROTECTED]

Please tell me if you find AWK.

On Oct 19, 7:54 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 I have tried

 # man
 # help
 # ?
 # ls -help

 and searched far and wide.

 I am also wondering if find and grep are supported on the device?

 Thanks again
 Satya
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Yet another HTTPS problem with HttpClient in Android SDK v1.0r1

2008-10-20 Thread Guillaume Perrot

Forgot to say, the aim is to allow to use self-signed server
certificates, it does work with trusted ones.

On 20 oct, 08:13, vel [EMAIL PROTECTED] wrote:
 I am also facing the same problem.
 Can please any one help us.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Tips for Orientation

2008-10-20 Thread Mark Hansen

I've actually created layouts for both vertical and horizontal views,
I've had some people testing it and it turns out Android doesn't turn
the view, I guess it has to be detected?

I was curious how to go about doing that detection.. I know I can also
set the view with:

setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_*);

The problem I'm having is what event to trap or how to go about
determining which way the phone is being held.

On Oct 20, 12:13 am, hackbod [EMAIL PROTECTED] wrote:
 Use the android:screenOrientation attribute when declaring your
 manifest:

 http://code.google.com/android/reference/android/R.styleable.html#And...

 http://code.google.com/android/reference/android/R.styleable.html#And...

 On Oct 19, 3:23 pm, Mark Hansen [EMAIL PROTECTED] wrote:

  I was thinking Android switched orientation automatically based on the
  phones position but I'm finding from users this is not the case.

  Anyone have some sample code on how to switch screen orientation based
  on the position of the phone?

  Thanks,

  Mark


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Capabilities of Location API

2008-10-20 Thread NickDG

On Oct 16, 10:29 am, NickDG [EMAIL PROTECTED] wrote:
 We're investigating the possibility of creating a smart phone
 application that uses the GSM network to determine the location of the
 phone.

 We will study different methods of calculating positions and to do
 that we need extensive data about the network such as IDs, signal
 strengths, etc of cell towers, not just of the currently connected one
 but of all visible towers. Does the Android API allow us to get these?

 The class 'android.location.LocationManager' seems to provide the
 functionality to do get a position via the network. The JavaDoc of the
 constant NETWORK_PROVIDER (http://code.google.com/android/reference/
 android/location/LocationManager.html#NETWORK_PROVIDER) states
 Results are retrieved by means of a network lookup.. What does this
 mean? How is the positioning done technically?


It seems nobody in this group can answer my questions. Do you know
another place I can look for answers?

Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Tips for Orientation

2008-10-20 Thread Mark Murphy

Mark Hansen wrote:
 I've actually created layouts for both vertical and horizontal views,
 I've had some people testing it and it turns out Android doesn't turn
 the view, I guess it has to be detected?
 
 I was curious how to go about doing that detection.. I know I can also
 set the view with:
 
 setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_*);
 
 The problem I'm having is what event to trap or how to go about
 determining which way the phone is being held.

That might require use of the accelerometer. I haven't played at all in 
that area, so I don't have more specific advice.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.3 Published!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Capabilities of Location API

2008-10-20 Thread Mark Murphy

NickDG wrote:
 We're investigating the possibility of creating a smart phone
 application that uses the GSM network to determine the location of the
 phone.
 
 We will study different methods of calculating positions and to do
 that we need extensive data about the network such as IDs, signal
 strengths, etc of cell towers, not just of the currently connected one
 but of all visible towers. Does the Android API allow us to get these?

Not that I have seen.

Off the cuff, what you want to do probably is not possible without 
modifying the Android OS in firmware. Once Android is released as open 
source, you hopefully will be able to see what is needed, implement the 
changes, and propose them as patches to be considered for a future 
version of Android.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.3 Published!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Change from screen to screen doesn't work.

2008-10-20 Thread Ludwig
I do not think that you have given enough information for anyone to really
help you.
Navigating via intents is the primary (only?) way of moving from screen to
screen in Android, so you can safely assume that this works.
Looking at the log output in DDMS and the stack-trace in the debugger (plus
the information in the exception that is likely being thrown somewhere)
might give you an idea what you have done wrong.

A good start might be just looking at the examples in the samples/ApiDemos
directory of the SDK installation and have a look how it is done there.

Ludwig

2008/10/20 sush [EMAIL PROTECTED]


 Hello,

 I am trying to execute an Android application which will create a new
 activity (that will open a new UI screen) on a button click.
 I have stated the new activity as an intent in the main class and
 added it in the androidmanifest file as another activity.
 But when I execute this application I get an error in the emulator
 saying the application has stopped unxpectedly.

 Please help in this if there are some other way to navigate from one
 screen to another.

 Regards,
 Susama


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] not able to bind Contacts in drop down spinner

2008-10-20 Thread [EMAIL PROTECTED]

Hi,
I am trying to populate Contacts stored in phone in a drop down,But I
am getting null pointer exception while runnig it,There is data in
Phone and the permission is set in AndroidManifest.xml
Though i am able to see the contacts when i directly display them
using something like this:
name = cur.getString(nameColumn);


Below is the code:

 public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
setContentView(R.layout.main);


String[] projection = new String[] {
People._ID,
People.NAME,
People.NUMBER,
};


Uri mContacts = People.CONTENT_URI;


Cursor managedCursor = managedQuery( mContacts,//URI
projection, //Which columns to return.
null,   // WHERE clause--we won't specify.
null, //arguments to selection
People.NAME +  ASC); // Order-by clause.
Log.i(null, managedCursor);


   try{
  SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
R.layout.main, managedCursor, projection, null);
  Log.i(null, SimpleCursorAdapter);
  Spinner s1 = (Spinner) findViewById(R.id.contactDropDown);

 
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);

s1.setAdapter(adapter);
}catch(Exception e){
e.printStackTrace();
}



}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Inflate Exception... how to diagnose?

2008-10-20 Thread shailesh prakash

I don't know why you all complexing the problem. I t is just a missing
classname in provided namespace.
 As I can see there is no TextField in res/android namespace better
you try TextView.


On Mon, Oct 20, 2008 at 8:04 AM, DulcetTone [EMAIL PROTECTED] wrote:

 I have an XML file that causes an inflate exception with no
 discernible detail to help me diagnose what went wrong

 What is the best way to get Android to offer details on what was
 objectionable?

 tone

 FYI, here was the XML:

 ?xml version=1.0 encoding=utf-8?

 RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
 android
android:layout_width=fill_parent
android:layout_height=wrap_content
android:padding=10px

Spinner android:id=@+id/skin_name
android:layout_width=fill_parent
android:layout_height=wrap_content
android:drawSelectorOnTop=false/

TextField android:id=@+id/ospeed_label
android:text=Output Speed
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_below=@id/skin_name/

SeekBar android:id=@+id/ospeed
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_toRightOf=@id/ospeed_label/


CheckBox android:id=@+id/var_output
android:text=Do incoming VAR
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_below=@id/ospeed/


TextField android:id=@+id/ispeed_label
android:text=Input Speed
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_below=@id/var_output/

SeekBar android:id=@+id/ispeed
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_toRightOf=@id/ispeed_label/


Button android:id=@+id/ok
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_below=@id/ispeed
android:layout_alignParentRight=true
android:layout_marginLeft=10px
android:text=OK /

Button android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_toLeftOf=@id/ok
android:layout_alignTop=@id/ok
android:text=Cancel /
 /RelativeLayout


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] DiceDroid : my game is available

2008-10-20 Thread arnouf

Hello Everybody,

Just to announce that I published today my first application.
DiceDroid (http://www.dicedroid.com) is a clone of Yathzee dice game.
You have to do some combinations with 5 dice.
DiceDroid allow you to compare your highscore with others players :)

Enjoy it!

Regards
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Background music in application

2008-10-20 Thread TjerkW

On Oct 19, 2:09 pm, bins [EMAIL PROTECTED] wrote:
 hi...
 thanks for u r replay...

 Actually i am playing 2mb file ,,,which is have looping also.I am
 calling Media player Inside a thread,Actually i need play background
 music for my application,and it should not effect my application speed

Playing a file in the background needs resources (cpu cycles).
If you application is already using all the resources then the
background music WILL affect
your application speed.

By the way, i am also getting those error messages, i think
it has something to do with reading the file and sending it to
the audiobuffer. My emulator is rather slow, so maybe
my machine is not fast enough.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to import a new CA certificate

2008-10-20 Thread vel

Here is a way to configure to the SSLContext
TrustManager[] trustAllCerts = new TrustManager[] { new
X509TrustManager()
{
public java.security.cert.X509Certificate[]
getAcceptedIssuers()
{
return acceptedIssuers;
}

public void
checkClientTrusted( java.security.cert.X509Certificate[] certs, String
authType )
{
}

public void
checkServerTrusted( java.security.cert.X509Certificate[] certs, String
authType )
{
}
} };

// Install the all-trusting trust manager
try
{
sc = SSLContext.getInstance( TLS );
sc.init( null, trustAllCerts, new
java.security.SecureRandom() );
 
HttpsURLConnection.setDefaultSSLSocketFactory( sc.getSocketFactory() );
}
catch( Exception e )
{
e.printStackTrace();
}

Still i am not able to connect to any https connection
even though checkServerTrusted method is called...

java.io.IOException: Hostname sample.test.com was not verified
can any one help me

On Sep 24, 4:45 am, Megha Joshi [EMAIL PROTECTED] wrote:
 It is recommended to build an application-specific keystore with only the
 needed certificate(s) in it. If you have a specific server
 certificate you want to trust, even if it isn't part of a complete chain,
 put in into this store. Same for client certificates that might
 be need for authenticating the client. In the client application, configure
 the SSLContext appropriately. You  could point either the key manager or the
 trust manager to your application store. There's a method that allows to
 load the keystore contents from a stream.

 2008/9/8 maennel [EMAIL PROTECTED]



  Hi all,
  I am trying to connect with Android to a server which I develop
  myself. Now it should be possible to connect to that server using an
  encrypted connection (namely HTTPS).
  As I do not use this application in a commercial way I don't want to
  invest money to buy a real certificate. So, I try to test the system
  using a test certificate from thawte on server side.

  What happens:
  Because the CA that signed this test certificate is not stored on
  Android, it simply rejects the certificate and does not connect to the
  server by stopping the handshake procedure by a TCP-Fin-Ack. I tried
  to connect to other, public secured servers and there the connection
  is established without any problem (tests done with HttpClient and
  HttpMethod).

  Is there any possibility to add the two certificates (test
  intermediate CA  test root CA) to the Android keystore in order to
  have an effect as if the certificate I use was a real one?
  Or does anybody knows if there are other possibilities to connect to
  test servers?

  Thank you for responding,
  maennel


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Implementing collision detection (Game)

2008-10-20 Thread Robert Green

Something like that.  Play around with it and I'm sure you'll find a
way to make it work.

Here's how I do mine:

When initializing the game/map, I load the map resource and draw it
onto a bitmap.

My Main Loop:

update()
draw()

My update method does:

updatePhysics (moves players, checks collisions)
updateAI (figures out next move for AI players)
updateState (for state transitions)
updateAnimations
updateSound

My draw method does:

draws background/map bitmap to surface canvas
draws objects or anything under the players to canvas
draws players to surface canvas
draws FX, explosions, etc over players to surface canvas
draws scores, text or anything on the very top to surface canvas

I've been very careful to write efficient math for physics, AI and
collisions.  I also was careful so as to draw the absolute minimum as
2d drawing is a little expensive in android.  Overall I get a
framerate around 40-45 FPS on my emulator.

Also - if you're not already, use a SurfaceView.

On Oct 19, 6:37 pm, mscwd01 [EMAIL PROTECTED] wrote:
 Thanks for your reply,

 So just to recap...
 I draw the main maze png background image and then have another image
 I draw on top of this which is fully transparent apart from lines of
 non transparent pixels which represent the maze walls. That sounds
 nice and easy.

 To make this work I'd need to find out the center point (coordinates)
 of the screen, determine which coordinates the playing piece current
 fills (i.e. y,x,y+10,x+10) and then check to see whether any of these
 pixels are also occupied by the mask walls layer.

 Could you let me know the best way to implement multiples layers, i.e.
 the maze background image, the mask walls image and the playing piece.

 Also could you let me know how you retrieve a section of pixels from
 an image, so I can determine whether the mask layer for example has
 walls in a section occupied by the playing piece.

 Many thanks!

 On Oct 19, 10:38 pm, Robert Green [EMAIL PROTECTED] wrote:

  How did you express your walls programmatically?  Did you use tiles or
  did you draw lines?

  If you used tiles, the collision detection is very easy.  If the next
  move will cause the player to enter the tile, game over.

  If you drew the walls on a full coordinate system, you have to keep
  the coordinates that you used in an array or list or wherever and
  write a little algorithm that checks to see if the position of the
  player on the next tick will intersect with a wall.

  I used the second method for my game and it works very well.

  I just wrote all this then reread and saw that you used a png
  background.  Here's what you can do to use that:

  Create a second background that is only black and white and masks the
  png background you have.  Load both but of course only draw your
  normal one.  Load the mask into a bitmap and for collision detection,
  just call bitmap.getPixel() for the next position of your player.  If
  it's the wall color (let's say you use white for walls), there is a
  collision.

  On Oct 19, 5:51 am, mscwd01 [EMAIL PROTECTED] wrote:

   I am fairly new to android, although I have been using Java for a
   while.

   I am creating a 2d maze based game which consists of a bunch of walls
   and a rotating player piece (which rotates 360 degrees), while trying
   to get from the entrance to the exit of the maze - without touching
   the walls.

   My question is, what is the best way to represent the walls of the
   maze and the playing piece (which rotates, hence doesn't always occupy
   the same location on screen) so that I can effectively check for
   collisions between the two entities?

   The level itself will be quite small so the maze will be a png
   background image which moves when the player moves up, down, left or
   right (the playing piece will remain at the center of the screen). I
   was thinking of drawing a polygon object over the walls of the png
   image and try to detect collisions between the rectangle playing piece
   and the polygon shape - is this possible?

   There may be a better way, if there is please let me know!

   Thanks- Hide quoted text -

  - Show quoted text -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Implementing collision detection (Game)

2008-10-20 Thread mscwd01

Thanks for the update...

I believe I am using a SurfaceView, I edited the LunarLander game
which has things like SurfaceHolders I am making use of. I use a
simple Canvas and draw onto it in much the same way you described,
i.e. base images first then draw another image on top. I was just
wondering whether Android had a layer manager much like J2ME does in
the GameCanvas class.

Anyway thanks for your help, I believe I can implement the game now.

Oh, one last question - why does my game run faster when the emulator
is in a portrait orientation? When I switch to landscape the game
slows by at least 20 FPS. Is this normal?

Thanks

On Oct 20, 3:55 pm, Robert Green [EMAIL PROTECTED] wrote:
 Something like that.  Play around with it and I'm sure you'll find a
 way to make it work.

 Here's how I do mine:

 When initializing the game/map, I load the map resource and draw it
 onto a bitmap.

 My Main Loop:

 update()
 draw()

 My update method does:

 updatePhysics (moves players, checks collisions)
 updateAI (figures out next move for AI players)
 updateState (for state transitions)
 updateAnimations
 updateSound

 My draw method does:

 draws background/map bitmap to surface canvas
 draws objects or anything under the players to canvas
 draws players to surface canvas
 draws FX, explosions, etc over players to surface canvas
 draws scores, text or anything on the very top to surface canvas

 I've been very careful to write efficient math for physics, AI and
 collisions.  I also was careful so as to draw the absolute minimum as
 2d drawing is a little expensive in android.  Overall I get a
 framerate around 40-45 FPS on my emulator.

 Also - if you're not already, use a SurfaceView.

 On Oct 19, 6:37 pm, mscwd01 [EMAIL PROTECTED] wrote:

  Thanks for your reply,

  So just to recap...
  I draw the main maze png background image and then have another image
  I draw on top of this which is fully transparent apart from lines of
  non transparent pixels which represent the maze walls. That sounds
  nice and easy.

  To make this work I'd need to find out the center point (coordinates)
  of the screen, determine which coordinates the playing piece current
  fills (i.e. y,x,y+10,x+10) and then check to see whether any of these
  pixels are also occupied by the mask walls layer.

  Could you let me know the best way to implement multiples layers, i.e.
  the maze background image, the mask walls image and the playing piece.

  Also could you let me know how you retrieve a section of pixels from
  an image, so I can determine whether the mask layer for example has
  walls in a section occupied by the playing piece.

  Many thanks!

  On Oct 19, 10:38 pm, Robert Green [EMAIL PROTECTED] wrote:

   How did you express your walls programmatically?  Did you use tiles or
   did you draw lines?

   If you used tiles, the collision detection is very easy.  If the next
   move will cause the player to enter the tile, game over.

   If you drew the walls on a full coordinate system, you have to keep
   the coordinates that you used in an array or list or wherever and
   write a little algorithm that checks to see if the position of the
   player on the next tick will intersect with a wall.

   I used the second method for my game and it works very well.

   I just wrote all this then reread and saw that you used a png
   background.  Here's what you can do to use that:

   Create a second background that is only black and white and masks the
   png background you have.  Load both but of course only draw your
   normal one.  Load the mask into a bitmap and for collision detection,
   just call bitmap.getPixel() for the next position of your player.  If
   it's the wall color (let's say you use white for walls), there is a
   collision.

   On Oct 19, 5:51 am, mscwd01 [EMAIL PROTECTED] wrote:

I am fairly new to android, although I have been using Java for a
while.

I am creating a 2d maze based game which consists of a bunch of walls
and a rotating player piece (which rotates 360 degrees), while trying
to get from the entrance to the exit of the maze - without touching
the walls.

My question is, what is the best way to represent the walls of the
maze and the playing piece (which rotates, hence doesn't always occupy
the same location on screen) so that I can effectively check for
collisions between the two entities?

The level itself will be quite small so the maze will be a png
background image which moves when the player moves up, down, left or
right (the playing piece will remain at the center of the screen). I
was thinking of drawing a polygon object over the walls of the png
image and try to detect collisions between the rectangle playing piece
and the polygon shape - is this possible?

There may be a better way, if there is please let me know!

Thanks- Hide quoted text -

   - Show quoted text -
--~--~-~--~~~---~--~~

[android-developers] Re: not able to bind Contacts in drop down spinner

2008-10-20 Thread anirudh Bhatnagar
The NULL pointer was coming due to null TO field which i have changed to
new int[] {android.R.id.list}

However the error is removed ,But Still the contacts are not getting
loaded!! It displays a list of blank fields.

try{
 SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
R.layout.main, managedCursor, projection, null);

On Mon, Oct 20, 2008 at 8:01 PM, [EMAIL PROTECTED]
[EMAIL PROTECTED]wrote:


 Hi,
 I am trying to populate Contacts stored in phone in a drop down,But I
 am getting null pointer exception while runnig it,There is data in
 Phone and the permission is set in AndroidManifest.xml
 Though i am able to see the contacts when i directly display them
 using something like this:
 name = cur.getString(nameColumn);


 Below is the code:

  public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
setContentView(R.layout.main);


String[] projection = new String[] {
People._ID,
People.NAME,
People.NUMBER,
};


Uri mContacts = People.CONTENT_URI;


Cursor managedCursor = managedQuery( mContacts,//URI
projection, //Which columns to return.
null,   // WHERE clause--we won't specify.
null, //arguments to selection
People.NAME +  ASC); // Order-by clause.
Log.i(null, managedCursor);


   try{
  SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
 R.layout.main, managedCursor, projection, null);
  Log.i(null, SimpleCursorAdapter);
  Spinner s1 = (Spinner) findViewById(R.id.contactDropDown);



 adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);

s1.setAdapter(adapter);
}catch(Exception e){
e.printStackTrace();
}



}
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Tips for Orientation

2008-10-20 Thread Xolotl Loki

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

 The problem I'm having is what event to trap or how to go about
 determining which way the phone is being held.
 

The following should work from within an activity:

SensorManager sensors = (SensorManager)getSystemService(SENSOR_SERVICE);
sensors.registerListener(new SensorListener() {
@Override
public void onAccuracyChanged(int sensor, int accuracy) {
}

@Override
public void onSensorChanged(int sensor, float[] values) {
}

   }, SensorManager.SENSOR_ACCELEROMETER);

I have no idea what kinds of values will be passed to onSensorChanged,
so if you figure it out, let the rest of us know!

cheers,
- --
ᛏᚠᛖᚾᚱᛁᛊᚢᛚᚠᚱᛏ
ᛏᚢᛚᚠᛊᛚᛖᛁᚠᚨᚱᛏ
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkj8qFQACgkQNig/07RbnEs0XQCeNodNI7BRjZ2zsIJA7sesA7yf
hOMAn3dIgYE3sbryei+DbHTXQFLQ5qZH
=eADV
-END PGP SIGNATURE-

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] (Multiple) Shape drawing with XML

2008-10-20 Thread Filipe Abrantes

Hi all,

I have been experimenting shape drawing through AIDL. My question is if 
it is possible to draw shapes inside shapes. This would be nice to 
create some more advanced button forms (adding lightning effects and 
that kind of stuff).

I did some experiments but was unable to create the desired effect.

I add this to res/drawables:

?xml version=1.0 encoding=utf-8?
layer-list xmlns:android=http://schemas.android.com/apk/res/android;
 item
   shape xmlns:android=http://schemas.android.com/apk/res/android;
android:shape=rectangle
stroke android:width=1dip android:color=#FBBB /
solid android:color=#6000/
layout_margin android:layout_margin=1dp/
corners
android:bottomRightRadius=18dip
android:bottomLeftRadius=6dip
android:topLeftRadius=6dip
android:topRightRadius=6dip/
 
/shape
shape xmlns:android=http://schemas.android.com/apk/res/android;
android:shape=rectangle
layout_margin android:layout_margin=1dp/
gradient   
android:angle=270
android:startColor=#6000
  android:endColor=#6fff /
padding
android:left=10dp
android:top=10dp
android:right=10dp
android:bottom=10dp /
/shape
/item
/layer-list

and then I set this drawable as the background of a textView. But the 
shapes end up completely overlapped. The padding on the second shape 
does not produce any effect.

Is it possible to make the second shape only fill a subarea of the first 
shape. How to do so?

Cheers,
Filipe

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Tips for Orientation

2008-10-20 Thread hackbod

I don't know what you mean by turn the view.  When the orientation
changes to switch from the dominant to secondary orientation (portrait
to landscape on the g1), the graphics of the entire screen are rotated
to result in the screen being shown in the new orientation.  As such,
there is no need to do anything yourself, at it looks like to the
application is that the size of the screen has changed to match the
new orientation.

For different resources, normally you also don't need to do anything,
because when the orientation changes the current activity is destroyed
and a new one started, and the new one is running with a configuration
matching the new orientation so will load the appropriate resources as
it creates and initializes itself.

The only except is if you are using android:configChanges to avoid
being restarted due to a configuration change...  which is one of the
reasons why it is strongly encouraged not to do this, and certainly if
you are changing layouts due to the orientation I would really suggest
letting the normal destroy/recreate path execute.  If you really
really do want to mix the two, you will need to override
onConfigurationChanged() and re-inflate your view hierarchy and re-
initialize anything else depending on that or changing resources at
that point.

On Oct 20, 5:19 am, Mark Hansen [EMAIL PROTECTED] wrote:
 I've actually created layouts for both vertical and horizontal views,
 I've had some people testing it and it turns out Android doesn't turn
 the view, I guess it has to be detected?

 I was curious how to go about doing that detection.. I know I can also
 set the view with:

 setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_*);

 The problem I'm having is what event to trap or how to go about
 determining which way the phone is being held.

 On Oct 20, 12:13 am, hackbod [EMAIL PROTECTED] wrote:

  Use the android:screenOrientation attribute when declaring your
  manifest:

 http://code.google.com/android/reference/android/R.styleable.html#And...

 http://code.google.com/android/reference/android/R.styleable.html#And...

  On Oct 19, 3:23 pm, Mark Hansen [EMAIL PROTECTED] wrote:

   I was thinking Android switched orientation automatically based on the
   phones position but I'm finding from users this is not the case.

   Anyone have some sample code on how to switch screen orientation based
   on the position of the phone?

   Thanks,

   Mark
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] (Multiple) Shape drawing with XML

2008-10-20 Thread Filipe Abrantes

Hi all,

I have been experimenting shape drawing through AIDL. My question is if
it is possible to draw shapes inside shapes. This would be nice to
create some more advanced button forms (adding lightning effects and
that kind of stuff).

I did some experiments but was unable to create the desired effect.

I add this to res/drawables:

?xml version=1.0 encoding=utf-8?
layer-list xmlns:android=http://schemas.android.com/apk/res/android;
 item
   shape xmlns:android=http://schemas.android.com/apk/res/android;
android:shape=rectangle
stroke android:width=1dip android:color=#FBBB /
solid android:color=#6000/
layout_margin android:layout_margin=1dp/
corners
android:bottomRightRadius=18dip
android:bottomLeftRadius=6dip
android:topLeftRadius=6dip
android:topRightRadius=6dip/

/shape
 /item
shape xmlns:android=http://schemas.android.com/apk/res/android;
android:shape=rectangle
layout_margin android:layout_margin=1dp/
gradient
android:angle=270
android:startColor=#6000
  android:endColor=#6fff /
padding
android:left=10dp
android:top=10dp
android:right=10dp
android:bottom=10dp /
/shape
/item
/layer-list

and then I set this drawable as the background of a textView. But the
shapes end up completely overlapped. The padding on the second shape
does not produce any effect.

Is it possible to make the second shape only fill a subarea of the first
shape. How to do so?

Cheers,
Filipe

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How can I get help on /system/bin ash commands?

2008-10-20 Thread hackbod

No, none of those things are included in a normal device.

On Oct 20, 3:30 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Please tell me if you find AWK.

 On Oct 19, 7:54 am, [EMAIL PROTECTED]

 [EMAIL PROTECTED] wrote:
  I have tried

  # man
  # help
  # ?
  # ls -help

  and searched far and wide.

  I am also wondering if find and grep are supported on the device?

  Thanks again
  Satya
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Power issue of the location aware background process

2008-10-20 Thread hackbod

On Oct 20, 1:18 am, Zen [EMAIL PROTECTED] wrote:
 1. How to make a background process, like a service?

Use the Service class.

 2. Will I need to set to phone power always on to make this work?

You can use wake locks with the PowerManager to control when the CPU
is running.

 3. If the phone goes to sleep mode, will the gps position changing
 event wake it up? I guess only if the gps chip has a interrupt you can
 set to...

The GPS position is changing (slightly) all of the time, so no it
won't wake up the phone just for that.

You need to be really, really careful about how you do this in the
background so you don't kill the user's device.  First, if you are
going to continually monitor the GPS...  don't.  You can expect
battery life of 5 hours or less if you do that.  So you need to set
the AlarmManager to wake you up at some slow interval (not less than
every 10 seconds) at which point you sample the current position and
go back to sleep.  You'll want to play around with this on a real
device to tune it to have good performance, and definitely want to let
the user know this is happening and allow them to stop your background
monitoring.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Inflate Exception... how to diagnose?

2008-10-20 Thread hackbod

Because it is far better to tell someone how to diagnose their own
problem, than to just tell them how to fix this problem, so they know
how to deal with any such problems in the future.

On Oct 19, 11:38 pm, shailesh prakash [EMAIL PROTECTED] wrote:
 I don't know why you all complexing the problem. I t is just a missing
 classname in provided namespace.
  As I can see there is no TextField in res/android namespace better
 you try TextView

 On Mon, Oct 20, 2008 at 11:55 AM, for android [EMAIL PROTECTED] wrote:
  This post might help you also.

 http://groups.google.com/group/android-developers/browse_thread/threa...

  Also if you have done a sample for inflation.Could share a code snippet.I
  also need it.

  Thanks

  On Mon, Oct 20, 2008 at 8:07 AM, Romain Guy [EMAIL PROTECTED] wrote:

  In the Logcat view of Eclipse (or from a shell, type adb logcat), you
  will see the full stack trace with the explanation of what's wrong.

  On Sun, Oct 19, 2008 at 7:34 PM, DulcetTone [EMAIL PROTECTED] wrote:

   I have an XML file that causes an inflate exception with no
   discernible detail to help me diagnose what went wrong

   What is the best way to get Android to offer details on what was
   objectionable?

   tone

   FYI, here was the XML:

   ?xml version=1.0 encoding=utf-8?

   RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
   android
                  android:layout_width=fill_parent
                  android:layout_height=wrap_content
                  android:padding=10px

          Spinner android:id=@+id/skin_name
                          android:layout_width=fill_parent
                          android:layout_height=wrap_content
                          android:drawSelectorOnTop=false/

          TextField android:id=@+id/ospeed_label
                          android:text=Output Speed
                          android:layout_width=wrap_content
                          android:layout_height=wrap_content
                          android:layout_below=@id/skin_name/

          SeekBar android:id=@+id/ospeed
                          android:layout_width=wrap_content
                          android:layout_height=wrap_content
                          android:layout_toRightOf=@id/ospeed_label/

          CheckBox android:id=@+id/var_output
                          android:text=Do incoming VAR
                          android:layout_width=wrap_content
                          android:layout_height=wrap_content
                          android:layout_below=@id/ospeed/

          TextField android:id=@+id/ispeed_label
                          android:text=Input Speed
                          android:layout_width=wrap_content
                          android:layout_height=wrap_content
                          android:layout_below=@id/var_output/

          SeekBar android:id=@+id/ispeed
                          android:layout_width=wrap_content
                          android:layout_height=wrap_content
                          android:layout_toRightOf=@id/ispeed_label/

      Button android:id=@+id/ok
              android:layout_width=wrap_content
              android:layout_height=wrap_content
              android:layout_below=@id/ispeed
              android:layout_alignParentRight=true
              android:layout_marginLeft=10px
              android:text=OK /

      Button android:layout_width=wrap_content
              android:layout_height=wrap_content
              android:layout_toLeftOf=@id/ok
              android:layout_alignTop=@id/ok
              android:text=Cancel /
   /RelativeLayout

  --
  Romain Guy
 www.curious-creature.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Inflate Exception... how to diagnose?

2008-10-20 Thread shailesh prakash

Hey hackbod,

 You should not use sword if needle is required.

On Mon, Oct 20, 2008 at 9:54 PM, hackbod [EMAIL PROTECTED] wrote:

 Because it is far better to tell someone how to diagnose their own
 problem, than to just tell them how to fix this problem, so they know
 how to deal with any such problems in the future.

 On Oct 19, 11:38 pm, shailesh prakash [EMAIL PROTECTED] wrote:
 I don't know why you all complexing the problem. I t is just a missing
 classname in provided namespace.
  As I can see there is no TextField in res/android namespace better
 you try TextView

 On Mon, Oct 20, 2008 at 11:55 AM, for android [EMAIL PROTECTED] wrote:
  This post might help you also.

 http://groups.google.com/group/android-developers/browse_thread/threa...

  Also if you have done a sample for inflation.Could share a code snippet.I
  also need it.

  Thanks

  On Mon, Oct 20, 2008 at 8:07 AM, Romain Guy [EMAIL PROTECTED] wrote:

  In the Logcat view of Eclipse (or from a shell, type adb logcat), you
  will see the full stack trace with the explanation of what's wrong.

  On Sun, Oct 19, 2008 at 7:34 PM, DulcetTone [EMAIL PROTECTED] wrote:

   I have an XML file that causes an inflate exception with no
   discernible detail to help me diagnose what went wrong

   What is the best way to get Android to offer details on what was
   objectionable?

   tone

   FYI, here was the XML:

   ?xml version=1.0 encoding=utf-8?

   RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
   android
  android:layout_width=fill_parent
  android:layout_height=wrap_content
  android:padding=10px

  Spinner android:id=@+id/skin_name
  android:layout_width=fill_parent
  android:layout_height=wrap_content
  android:drawSelectorOnTop=false/

  TextField android:id=@+id/ospeed_label
  android:text=Output Speed
  android:layout_width=wrap_content
  android:layout_height=wrap_content
  android:layout_below=@id/skin_name/

  SeekBar android:id=@+id/ospeed
  android:layout_width=wrap_content
  android:layout_height=wrap_content
  android:layout_toRightOf=@id/ospeed_label/

  CheckBox android:id=@+id/var_output
  android:text=Do incoming VAR
  android:layout_width=wrap_content
  android:layout_height=wrap_content
  android:layout_below=@id/ospeed/

  TextField android:id=@+id/ispeed_label
  android:text=Input Speed
  android:layout_width=wrap_content
  android:layout_height=wrap_content
  android:layout_below=@id/var_output/

  SeekBar android:id=@+id/ispeed
  android:layout_width=wrap_content
  android:layout_height=wrap_content
  android:layout_toRightOf=@id/ispeed_label/

  Button android:id=@+id/ok
  android:layout_width=wrap_content
  android:layout_height=wrap_content
  android:layout_below=@id/ispeed
  android:layout_alignParentRight=true
  android:layout_marginLeft=10px
  android:text=OK /

  Button android:layout_width=wrap_content
  android:layout_height=wrap_content
  android:layout_toLeftOf=@id/ok
  android:layout_alignTop=@id/ok
  android:text=Cancel /
   /RelativeLayout

  --
  Romain Guy
 www.curious-creature.org
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How do I 'convert' web apps into Java apps that don't need to access the net?

2008-10-20 Thread BikingBill

Thank you.  If anyone has an example, I'd appreciate it.

On Oct 20, 4:07 am, TjerkW [EMAIL PROTECTED] wrote:
 I think this is easy, just get a resource from your bundle and show it
 in the webview.
 See the api for the correct methods.

 On Oct 19, 11:55 pm, William D. Volk [EMAIL PROTECTED] wrote:

  I understand that I can replace the main view in an Eclipse generated  
  application with a WebView, and point it to my content, enable  
  javascript and then have a web based (javascript) application that can  
  be treated as a Java app (App Market etc...).

  My question is simply this, how can I supply the HTML and Javascript  
  for this app from Java so that it doesn't need to access the network  
  every time it's run?  That is the HTML, Javascipt, and picture files.

  Anyone know if this is possible?  Are there any tools that automate  
  this?

  Thanks,

  Bill
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] GPS Code Sample

2008-10-20 Thread nick fox


Are there any gps code samples? I was looking through the
documentation but didn't find anything.

thanks
Nick
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Android Rap Song

2008-10-20 Thread phandroid

Just thought all the Developers would enjoy this:
http://www.youtube.com/watch?v=9bk9aImCTqE
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] [Timing] How to measure time interval for certain process?

2008-10-20 Thread Andy Quan

Hi all,
Anybody knows how to measure time interval for certain process rather
than CPU elapsed time?

I have noticed there is a class named android.os.SystemClock, but
according to its description, it is for CPU timing. And what if I want
to measure CPU cost of applications like MediaPlayer?

I'd appreciate if there is any comment

Thanks,
Andy

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Not able to return to Home Screen by pressing 'Home' key from any application

2008-10-20 Thread Dipen

Group,

I can not return to Home Screen by pressing 'Home' key from any
application. Any troubleshooting ideas?

Thanks,
Dipen

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Update in Content Provider

2008-10-20 Thread jtaylor


If I don't need the Update method in a Content Provider, how do I
alert others using it? I can just leave the method empty, but what
other precautions should I take?


- Juan T.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Implementing collision detection (Game)

2008-10-20 Thread Robert Green

Thoughts on why you are seeing slowdown:

1) Perhaps you don't have save/restore state implemented correctly and
the OS is starting a second instance of your game when you switch
perspectives?  (the 2 running at once theory)

2)  Perhaps you are drawing more somehow in landscape?

3)  Perhaps you are resizing a portrait background into landscape
every frame?  (This is the one I'd look at first.  Make sure you are
drawing bitmaps 1-to-1 and not stretching or resizing every frame.  If
you are going to need to rotate, resize, etc use a Transform, but make
sure not to do anything computationally intensive frame-by-frame
unless you have to - EG if you need to scale your background to fit
the new orientation, do that _once_ onto a new canvas/bitmap and
redraw that bitmap onto the surface.

On Oct 20, 10:43 am, mscwd01 [EMAIL PROTECTED] wrote:
 Thanks for the update...

 I believe I am using a SurfaceView, I edited the LunarLander game
 which has things like SurfaceHolders I am making use of. I use a
 simple Canvas and draw onto it in much the same way you described,
 i.e. base images first then draw another image on top. I was just
 wondering whether Android had a layer manager much like J2ME does in
 the GameCanvas class.

 Anyway thanks for your help, I believe I can implement the game now.

 Oh, one last question - why does my game run faster when the emulator
 is in a portrait orientation? When I switch to landscape the game
 slows by at least 20 FPS. Is this normal?

 Thanks

 On Oct 20, 3:55 pm, Robert Green [EMAIL PROTECTED] wrote:

  Something like that.  Play around with it and I'm sure you'll find a
  way to make it work.

  Here's how I do mine:

  When initializing the game/map, I load the map resource and draw it
  onto a bitmap.

  My Main Loop:

  update()
  draw()

  My update method does:

  updatePhysics (moves players, checks collisions)
  updateAI (figures out next move for AI players)
  updateState (for state transitions)
  updateAnimations
  updateSound

  My draw method does:

  draws background/map bitmap to surface canvas
  draws objects or anything under the players to canvas
  draws players to surface canvas
  draws FX, explosions, etc over players to surface canvas
  draws scores, text or anything on the very top to surface canvas

  I've been very careful to write efficient math for physics, AI and
  collisions.  I also was careful so as to draw the absolute minimum as
  2d drawing is a little expensive in android.  Overall I get a
  framerate around 40-45 FPS on my emulator.

  Also - if you're not already, use a SurfaceView.

  On Oct 19, 6:37 pm, mscwd01 [EMAIL PROTECTED] wrote:

   Thanks for your reply,

   So just to recap...
   I draw the main maze png background image and then have another image
   I draw on top of this which is fully transparent apart from lines of
   non transparent pixels which represent the maze walls. That sounds
   nice and easy.

   To make this work I'd need to find out the center point (coordinates)
   of the screen, determine which coordinates the playing piece current
   fills (i.e. y,x,y+10,x+10) and then check to see whether any of these
   pixels are also occupied by the mask walls layer.

   Could you let me know the best way to implement multiples layers, i.e.
   the maze background image, the mask walls image and the playing piece.

   Also could you let me know how you retrieve a section of pixels from
   an image, so I can determine whether the mask layer for example has
   walls in a section occupied by the playing piece.

   Many thanks!

   On Oct 19, 10:38 pm, Robert Green [EMAIL PROTECTED] wrote:

How did you express your walls programmatically?  Did you use tiles or
did you draw lines?

If you used tiles, the collision detection is very easy.  If the next
move will cause the player to enter the tile, game over.

If you drew the walls on a full coordinate system, you have to keep
the coordinates that you used in an array or list or wherever and
write a little algorithm that checks to see if the position of the
player on the next tick will intersect with a wall.

I used the second method for my game and it works very well.

I just wrote all this then reread and saw that you used a png
background.  Here's what you can do to use that:

Create a second background that is only black and white and masks the
png background you have.  Load both but of course only draw your
normal one.  Load the mask into a bitmap and for collision detection,
just call bitmap.getPixel() for the next position of your player.  If
it's the wall color (let's say you use white for walls), there is a
collision.

On Oct 19, 5:51 am, mscwd01 [EMAIL PROTECTED] wrote:

 I am fairly new to android, although I have been using Java for a
 while.

 I am creating a 2d maze based game which consists of a bunch of walls
 and a rotating player piece (which rotates 360 degrees), while trying

[android-developers] Re: Tips for Orientation

2008-10-20 Thread Mark Hansen

From what I was told by a user of my application, that it did not
change view, even when the keyboard was opened for text entry.

I've built two set's of layout files, and stored them in layout and
layout-land for when the view changes.  In emulator mode they work
fine, CTRL-F12 works fine.. but, and I may be misinformed here, it
appears the actual phone itself is not rotating the screen based on
the keyboard of position of the actual phone.

He even stated many of the default Google application aren't rotating
as well, and that very few actually change based on the way the device
is being held.



On Oct 20, 12:21 pm, hackbod [EMAIL PROTECTED] wrote:
 I don't know what you mean by turn the view.  When the orientation
 changes to switch from the dominant to secondary orientation (portrait
 to landscape on the g1), the graphics of the entire screen are rotated
 to result in the screen being shown in the new orientation.  As such,
 there is no need to do anything yourself, at it looks like to the
 application is that the size of the screen has changed to match the
 new orientation.

 For different resources, normally you also don't need to do anything,
 because when the orientation changes the current activity is destroyed
 and a new one started, and the new one is running with a configuration
 matching the new orientation so will load the appropriate resources as
 it creates and initializes itself.

 The only except is if you are using android:configChanges to avoid
 being restarted due to a configuration change...  which is one of the
 reasons why it is strongly encouraged not to do this, and certainly if
 you are changing layouts due to the orientation I would really suggest
 letting the normal destroy/recreate path execute.  If you really
 really do want to mix the two, you will need to override
 onConfigurationChanged() and re-inflate your view hierarchy and re-
 initialize anything else depending on that or changing resources at
 that point.

 On Oct 20, 5:19 am, Mark Hansen [EMAIL PROTECTED] wrote:

  I've actually created layouts for both vertical and horizontal views,
  I've had some people testing it and it turns out Android doesn't turn
  the view, I guess it has to be detected?

  I was curious how to go about doing that detection.. I know I can also
  set the view with:

  setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_*);

  The problem I'm having is what event to trap or how to go about
  determining which way the phone is being held.

  On Oct 20, 12:13 am, hackbod [EMAIL PROTECTED] wrote:

   Use the android:screenOrientation attribute when declaring your
   manifest:

  http://code.google.com/android/reference/android/R.styleable.html#And...

  http://code.google.com/android/reference/android/R.styleable.html#And...

   On Oct 19, 3:23 pm, Mark Hansen [EMAIL PROTECTED] wrote:

I was thinking Android switched orientation automatically based on the
phones position but I'm finding from users this is not the case.

Anyone have some sample code on how to switch screen orientation based
on the position of the phone?

Thanks,

Mark


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Tips for Orientation

2008-10-20 Thread hackbod

Your user is confused.  The standard orientation policy is to select
the orientation based on the keyboard: when the keyboard is closed it
is portrait, when open it is landscape.  Pressing Ctrl+F12 in the
emulator is exactly the same as sliding the keyboard out on the G1.

On Oct 20, 11:57 am, Mark Hansen [EMAIL PROTECTED] wrote:
 From what I was told by a user of my application, that it did not
 change view, even when the keyboard was opened for text entry.

 I've built two set's of layout files, and stored them in layout and
 layout-land for when the view changes.  In emulator mode they work
 fine, CTRL-F12 works fine.. but, and I may be misinformed here, it
 appears the actual phone itself is not rotating the screen based on
 the keyboard of position of the actual phone.

 He even stated many of the default Google application aren't rotating
 as well, and that very few actually change based on the way the device
 is being held.

 On Oct 20, 12:21 pm, hackbod [EMAIL PROTECTED] wrote:

  I don't know what you mean by turn the view.  When the orientation
  changes to switch from the dominant to secondary orientation (portrait
  to landscape on the g1), the graphics of the entire screen are rotated
  to result in the screen being shown in the new orientation.  As such,
  there is no need to do anything yourself, at it looks like to the
  application is that the size of the screen has changed to match the
  new orientation.

  For different resources, normally you also don't need to do anything,
  because when the orientation changes the current activity is destroyed
  and a new one started, and the new one is running with a configuration
  matching the new orientation so will load the appropriate resources as
  it creates and initializes itself.

  The only except is if you are using android:configChanges to avoid
  being restarted due to a configuration change...  which is one of the
  reasons why it is strongly encouraged not to do this, and certainly if
  you are changing layouts due to the orientation I would really suggest
  letting the normal destroy/recreate path execute.  If you really
  really do want to mix the two, you will need to override
  onConfigurationChanged() and re-inflate your view hierarchy and re-
  initialize anything else depending on that or changing resources at
  that point.

  On Oct 20, 5:19 am, Mark Hansen [EMAIL PROTECTED] wrote:

   I've actually created layouts for both vertical and horizontal views,
   I've had some people testing it and it turns out Android doesn't turn
   the view, I guess it has to be detected?

   I was curious how to go about doing that detection.. I know I can also
   set the view with:

   setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_*);

   The problem I'm having is what event to trap or how to go about
   determining which way the phone is being held.

   On Oct 20, 12:13 am, hackbod [EMAIL PROTECTED] wrote:

Use the android:screenOrientation attribute when declaring your
manifest:

   http://code.google.com/android/reference/android/R.styleable.html#And...

   http://code.google.com/android/reference/android/R.styleable.html#And...

On Oct 19, 3:23 pm, Mark Hansen [EMAIL PROTECTED] wrote:

 I was thinking Android switched orientation automatically based on the
 phones position but I'm finding from users this is not the case.

 Anyone have some sample code on how to switch screen orientation based
 on the position of the phone?

 Thanks,

 Mark
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Tips for Orientation

2008-10-20 Thread Tauno T

And that's why he want's to set the orientation programmatically - the
users expect that when the phone is turned sideways then the picture
is also turned sideways:) The user is not confused - he just thinks
that Android has a feature that it does not have (sadly).

As for the solution - Xolotl Lokis solution will works just fine - you
only have to figure out which sensor reading corresponds to the phone
being held sideways and then change the layout using
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_*);


Tauno

On Oct 20, 10:39 pm, hackbod [EMAIL PROTECTED] wrote:
 Your user is confused.  The standard orientation policy is to select
 the orientation based on the keyboard: when the keyboard is closed it
 is portrait, when open it is landscape.  Pressing Ctrl+F12 in the
 emulator is exactly the same as sliding the keyboard out on the G1.

 On Oct 20, 11:57 am, Mark Hansen [EMAIL PROTECTED] wrote:

  From what I was told by a user of my application, that it did not
  change view, even when the keyboard was opened for text entry.

  I've built two set's of layout files, and stored them in layout and
  layout-land for when the view changes.  In emulator mode they work
  fine, CTRL-F12 works fine.. but, and I may be misinformed here, it
  appears the actual phone itself is not rotating the screen based on
  the keyboard of position of the actual phone.

  He even stated many of the default Google application aren't rotating
  as well, and that very few actually change based on the way the device
  is being held.

  On Oct 20, 12:21 pm, hackbod [EMAIL PROTECTED] wrote:

   I don't know what you mean by turn the view.  When the orientation
   changes to switch from the dominant to secondary orientation (portrait
   to landscape on the g1), the graphics of the entire screen are rotated
   to result in the screen being shown in the new orientation.  As such,
   there is no need to do anything yourself, at it looks like to the
   application is that the size of the screen has changed to match the
   new orientation.

   For different resources, normally you also don't need to do anything,
   because when the orientation changes the current activity is destroyed
   and a new one started, and the new one is running with a configuration
   matching the new orientation so will load the appropriate resources as
   it creates and initializes itself.

   The only except is if you are using android:configChanges to avoid
   being restarted due to a configuration change...  which is one of the
   reasons why it is strongly encouraged not to do this, and certainly if
   you are changing layouts due to the orientation I would really suggest
   letting the normal destroy/recreate path execute.  If you really
   really do want to mix the two, you will need to override
   onConfigurationChanged() and re-inflate your view hierarchy and re-
   initialize anything else depending on that or changing resources at
   that point.

   On Oct 20, 5:19 am, Mark Hansen [EMAIL PROTECTED] wrote:

I've actually created layouts for both vertical and horizontal views,
I've had some people testing it and it turns out Android doesn't turn
the view, I guess it has to be detected?

I was curious how to go about doing that detection.. I know I can also
set the view with:

setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_*);

The problem I'm having is what event to trap or how to go about
determining which way the phone is being held.

On Oct 20, 12:13 am, hackbod [EMAIL PROTECTED] wrote:

 Use the android:screenOrientation attribute when declaring your
 manifest:

http://code.google.com/android/reference/android/R.styleable.html#And...

http://code.google.com/android/reference/android/R.styleable.html#And...

 On Oct 19, 3:23 pm, Mark Hansen [EMAIL PROTECTED] wrote:

  I was thinking Android switched orientation automatically based on 
  the
  phones position but I'm finding from users this is not the case.

  Anyone have some sample code on how to switch screen orientation 
  based
  on the position of the phone?

  Thanks,

  Mark


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Video and Audio format supported in Android SDK 1.0

2008-10-20 Thread zl25drexel

mp4 and 3gp are supported. you need to make sure your video is android
compatible however, (i.e, able to play it on other platform such as
iphone does not means it's also playable on android).

try on linux to encode your video with $MP4Box test.mp4 -hint

On Oct 20, 4:13 am, Nan.YE [EMAIL PROTECTED] wrote:
 Hi all,

 What video and audio format are supported in Android SDK 1.0 and T-
 mobile G1 devices?
 Could anyone give me a brief conclusion?

 And does Android platform support codec extension? That means
 developer can import some new codes into the system to support new
 media formats?

 Best regards,
 Nan YE
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] What is callback function to catch text entered into search box

2008-10-20 Thread Billsen

hi,

I tried to find a callback function that could catch text entered in
search box, but could not find it. In my application, I started local
search and entered text in search box. What I want to do is to catch
text entered in my app.

Anybody can help?

Thanks,
Billsen
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: What is callback function to catch text entered into search box

2008-10-20 Thread Andrew Stadler

Billsen -

When the user enters the search UI and types enter or clicks the
search button, the ACTION_SEARCH intent will be sent.  At least one
activity within your application must be configured (using an
intent-filter) to receive and handle this Intent.

For more information, please see:
http://code.google.com/android/reference/android/app/SearchManager.html
http://code.google.com/android/samples/ApiDemos/src/com/example/android/apis/app/

Hope this helps.
--Andy

On Mon, Oct 20, 2008 at 1:20 PM, Billsen [EMAIL PROTECTED] wrote:

 hi,

 I tried to find a callback function that could catch text entered in
 search box, but could not find it. In my application, I started local
 search and entered text in search box. What I want to do is to catch
 text entered in my app.

 Anybody can help?

 Thanks,
 Billsen
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Browser based installation fails on G1

2008-10-20 Thread InC

Here's the adb logcat output from the exception -

I/ActivityManager(   53): Displayed activity
com.android.packageinstaller/.InstallAppProgress: 157 ms
D/asset   (   53): failed to open Zip archive '/data/app/
vmdl17815.tmp'
W/PackageParser(   53): Unable to read AndroidManifest.xml of /data/
app/vmdl17815.tmp
W/PackageParser(   53): java.io.FileNotFoundException:
AndroidManifest.xml
W/PackageParser(   53): at
android.content.res.AssetManager.openXmlAssetNative(Native Method)
W/PackageParser(   53): at
android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:
471)
W/PackageParser(   53): at
android.content.res.AssetManager.openXmlResourceParser(AssetManager.java:
439)
W/PackageParser(   53): at
android.content.pm.PackageParser.parsePackageName(PackageParser.java:
436)
W/PackageParser(   53): at
com.android.server.PackageManagerService.installPackageLI(PackageManagerService.java:
3102)
W/PackageParser(   53): at
com.android.server.PackageManagerService
$4.run(PackageManagerService.java:3008)
W/PackageParser(   53): at
android.os.Handler.handleCallback(Handler.java:542)
W/PackageParser(   53): at
android.os.Handler.dispatchMessage(Handler.java:86)
W/PackageParser(   53): at android.os.Looper.loop(Looper.java:
123)
W/PackageParser(   53): at
android.os.HandlerThread.run(HandlerThread.java:60)
E/PackageManager(   53): Couldn't find a package name in : /data/app/
vmdl17815.tmp
I/installd(   36): unlink /data/dalvik-cache/
[EMAIL PROTECTED]@[EMAIL PROTECTED]
I/InstallAppProgress(  806): Sleeping for 5 seconds to display screen

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Apps for Democracy Contest $20,000 in Prizes

2008-10-20 Thread Mark Hansen

Looks like spec work, which I implore other devs to avoid:

See http://www.no-spec.com/ for more information.





On Oct 19, 5:56 pm, corbett3000 [EMAIL PROTECTED] wrote:
 So we're hosting an app dev challenge here in DC (anyone from anywhere
 can enter) and our first submission was an iphone app.

 I'm hoping you guys will be interested to check out Apps for Democracy
 and see if an Android app would be useful for visualizing DC's public
 data. here's the info:

 Apps for Democracy will feature 60 cash prizes from $2000 to $100
 dollars for a total of $20,000 in prizes. Developers and designers
 will compete by creating web applications, widgets, Google Maps mash-
 ups, iPhone apps, Facebook apps, and other digital utilities that
 visualize DC.gov’s Data Catalog (http://data.octo.dc.gov), which
 provides real-time data from multiple agencies to citizens — a
 catalyst ensuring agencies operate as more responsive, better
 performing organizations.

 More athttp://www.appsfordemocracy.org

 -Peter (@corbett3000)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Tips for Orientation

2008-10-20 Thread hackbod

Don't do that, or moving between your app and others will be flicker.
Just use android:screenOrientation=sensor.

On Oct 20, 12:47 pm, Tauno T [EMAIL PROTECTED] wrote:
 And that's why he want's to set the orientation programmatically - the
 users expect that when the phone is turned sideways then the picture
 is also turned sideways:) The user is not confused - he just thinks
 that Android has a feature that it does not have (sadly).

 As for the solution - Xolotl Lokis solution will works just fine - you
 only have to figure out which sensor reading corresponds to the phone
 being held sideways and then change the layout using
 setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_*);

 Tauno

 On Oct 20, 10:39 pm, hackbod [EMAIL PROTECTED] wrote:

  Your user is confused.  The standard orientation policy is to select
  the orientation based on the keyboard: when the keyboard is closed it
  is portrait, when open it is landscape.  Pressing Ctrl+F12 in the
  emulator is exactly the same as sliding the keyboard out on the G1.

  On Oct 20, 11:57 am, Mark Hansen [EMAIL PROTECTED] wrote:

   From what I was told by a user of my application, that it did not
   change view, even when the keyboard was opened for text entry.

   I've built two set's of layout files, and stored them in layout and
   layout-land for when the view changes.  In emulator mode they work
   fine, CTRL-F12 works fine.. but, and I may be misinformed here, it
   appears the actual phone itself is not rotating the screen based on
   the keyboard of position of the actual phone.

   He even stated many of the default Google application aren't rotating
   as well, and that very few actually change based on the way the device
   is being held.

   On Oct 20, 12:21 pm, hackbod [EMAIL PROTECTED] wrote:

I don't know what you mean by turn the view.  When the orientation
changes to switch from the dominant to secondary orientation (portrait
to landscape on the g1), the graphics of the entire screen are rotated
to result in the screen being shown in the new orientation.  As such,
there is no need to do anything yourself, at it looks like to the
application is that the size of the screen has changed to match the
new orientation.

For different resources, normally you also don't need to do anything,
because when the orientation changes the current activity is destroyed
and a new one started, and the new one is running with a configuration
matching the new orientation so will load the appropriate resources as
it creates and initializes itself.

The only except is if you are using android:configChanges to avoid
being restarted due to a configuration change...  which is one of the
reasons why it is strongly encouraged not to do this, and certainly if
you are changing layouts due to the orientation I would really suggest
letting the normal destroy/recreate path execute.  If you really
really do want to mix the two, you will need to override
onConfigurationChanged() and re-inflate your view hierarchy and re-
initialize anything else depending on that or changing resources at
that point.

On Oct 20, 5:19 am, Mark Hansen [EMAIL PROTECTED] wrote:

 I've actually created layouts for both vertical and horizontal views,
 I've had some people testing it and it turns out Android doesn't turn
 the view, I guess it has to be detected?

 I was curious how to go about doing that detection.. I know I can also
 set the view with:

 setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_*);

 The problem I'm having is what event to trap or how to go about
 determining which way the phone is being held.

 On Oct 20, 12:13 am, hackbod [EMAIL PROTECTED] wrote:

  Use the android:screenOrientation attribute when declaring your
  manifest:

 http://code.google.com/android/reference/android/R.styleable.html#And...

 http://code.google.com/android/reference/android/R.styleable.html#And...

  On Oct 19, 3:23 pm, Mark Hansen [EMAIL PROTECTED] wrote:

   I was thinking Android switched orientation automatically based 
   on the
   phones position but I'm finding from users this is not the case.

   Anyone have some sample code on how to switch screen orientation 
   based
   on the position of the phone?

   Thanks,

   Mark
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Browser based installation fails on G1

2008-10-20 Thread Mark Hansen

Did you set the mime types .apk files on your webserver?

application/vnd.android.package-archive



On Oct 20, 4:41 pm, InC [EMAIL PROTECTED] wrote:
 Here's the adb logcat output from the exception -

 I/ActivityManager(   53): Displayed activity
 com.android.packageinstaller/.InstallAppProgress: 157 ms
 D/asset   (   53): failed to open Zip archive '/data/app/
 vmdl17815.tmp'
 W/PackageParser(   53): Unable to read AndroidManifest.xml of /data/
 app/vmdl17815.tmp
 W/PackageParser(   53): java.io.FileNotFoundException:
 AndroidManifest.xml
 W/PackageParser(   53):         at
 android.content.res.AssetManager.openXmlAssetNative(Native Method)
 W/PackageParser(   53):         at
 android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:
 471)
 W/PackageParser(   53):         at
 android.content.res.AssetManager.openXmlResourceParser(AssetManager.java:
 439)
 W/PackageParser(   53):         at
 android.content.pm.PackageParser.parsePackageName(PackageParser.java:
 436)
 W/PackageParser(   53):         at
 com.android.server.PackageManagerService.installPackageLI(PackageManagerService.java:
 3102)
 W/PackageParser(   53):         at
 com.android.server.PackageManagerService
 $4.run(PackageManagerService.java:3008)
 W/PackageParser(   53):         at
 android.os.Handler.handleCallback(Handler.java:542)
 W/PackageParser(   53):         at
 android.os.Handler.dispatchMessage(Handler.java:86)
 W/PackageParser(   53):         at android.os.Looper.loop(Looper.java:
 123)
 W/PackageParser(   53):         at
 android.os.HandlerThread.run(HandlerThread.java:60)
 E/PackageManager(   53): Couldn't find a package name in : /data/app/
 vmdl17815.tmp
 I/installd(   36): unlink /data/dalvik-cache/
 [EMAIL PROTECTED]@[EMAIL PROTECTED]
 I/InstallAppProgress(  806): Sleeping for 5 seconds to display screen
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Screen orientation from code / Permissions to use Surface.SetOrientation

2008-10-20 Thread Peter Bradshaw

I am foolish, I just needed to call
Activity.setRequestedOrientation(int).

http://code.google.com/android/reference/android/app/Activity.html#setRequestedOrientation(int)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Browser based installation fails on G1

2008-10-20 Thread InC

No I didn't. However, would that be root cause, since it actually went
through the permissions approval screen and started to install. I'm
assuming if it hadn't read the manifest file, it would have failed
even before that step.

Anyway I'll configure the mime-type on the webserver and give it a
shot.



On Oct 20, 2:44 pm, Mark Hansen [EMAIL PROTECTED] wrote:
 Did you set the mime types .apk files on your webserver?

 application/vnd.android.package-archive

 On Oct 20, 4:41 pm, InC [EMAIL PROTECTED] wrote:

  Here's the adb logcat output from the exception -

  I/ActivityManager(   53): Displayed activity
  com.android.packageinstaller/.InstallAppProgress: 157 ms
  D/asset   (   53): failed to open Zip archive '/data/app/
  vmdl17815.tmp'
  W/PackageParser(   53): Unable to read AndroidManifest.xml of /data/
  app/vmdl17815.tmp
  W/PackageParser(   53): java.io.FileNotFoundException:
  AndroidManifest.xml
  W/PackageParser(   53):         at
  android.content.res.AssetManager.openXmlAssetNative(Native Method)
  W/PackageParser(   53):         at
  android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:
  471)
  W/PackageParser(   53):         at
  android.content.res.AssetManager.openXmlResourceParser(AssetManager.java:
  439)
  W/PackageParser(   53):         at
  android.content.pm.PackageParser.parsePackageName(PackageParser.java:
  436)
  W/PackageParser(   53):         at
  com.android.server.PackageManagerService.installPackageLI(PackageManagerService.java:
  3102)
  W/PackageParser(   53):         at
  com.android.server.PackageManagerService
  $4.run(PackageManagerService.java:3008)
  W/PackageParser(   53):         at
  android.os.Handler.handleCallback(Handler.java:542)
  W/PackageParser(   53):         at
  android.os.Handler.dispatchMessage(Handler.java:86)
  W/PackageParser(   53):         at android.os.Looper.loop(Looper.java:
  123)
  W/PackageParser(   53):         at
  android.os.HandlerThread.run(HandlerThread.java:60)
  E/PackageManager(   53): Couldn't find a package name in : /data/app/
  vmdl17815.tmp
  I/installd(   36): unlink /data/dalvik-cache/
  [EMAIL PROTECTED]@[EMAIL PROTECTED]
  I/InstallAppProgress(  806): Sleeping for 5 seconds to display screen


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ADB via USB

2008-10-20 Thread vol

Actually, to clarify, I'm using ubuntu 8.04. I tried adb -d shell, adb
-p /dev/sdb shell, adb shell. Android automounted on /dev/sdb, though
when I specified debug mode it seemed to unmount itself.

On Oct 20, 8:09 pm, vol [EMAIL PROTECTED] wrote:
 In a move sure to spark envy, my G1 was delivered today. I wanted to
 play with an app I have been developing on my phone, so I plugged in
 my USB cable, set the Debug when USB plugged in option, and tried to
 use adb. No joy. No setting I used seemed to do anything. Is there a
 special allow adb access command on the G1?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] ADB via USB

2008-10-20 Thread vol

In a move sure to spark envy, my G1 was delivered today. I wanted to
play with an app I have been developing on my phone, so I plugged in
my USB cable, set the Debug when USB plugged in option, and tried to
use adb. No joy. No setting I used seemed to do anything. Is there a
special allow adb access command on the G1?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Tips for Orientation

2008-10-20 Thread Mark Hansen

That looks like it! Thanks!

On Oct 20, 6:37 pm, hackbod [EMAIL PROTECTED] wrote:
 Don't do that, or moving between your app and others will be flicker.
 Just use android:screenOrientation=sensor.

 On Oct 20, 12:47 pm, Tauno T [EMAIL PROTECTED] wrote:

  And that's why he want's to set the orientation programmatically - the
  users expect that when the phone is turned sideways then the picture
  is also turned sideways:) The user is not confused - he just thinks
  that Android has a feature that it does not have (sadly).

  As for the solution - Xolotl Lokis solution will works just fine - you
  only have to figure out which sensor reading corresponds to the phone
  being held sideways and then change the layout using
  setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_*);

  Tauno

  On Oct 20, 10:39 pm, hackbod [EMAIL PROTECTED] wrote:

   Your user is confused.  The standard orientation policy is to select
   the orientation based on the keyboard: when the keyboard is closed it
   is portrait, when open it is landscape.  Pressing Ctrl+F12 in the
   emulator is exactly the same as sliding the keyboard out on the G1.

   On Oct 20, 11:57 am, Mark Hansen [EMAIL PROTECTED] wrote:

From what I was told by a user of my application, that it did not
change view, even when the keyboard was opened for text entry.

I've built two set's of layout files, and stored them in layout and
layout-land for when the view changes.  In emulator mode they work
fine, CTRL-F12 works fine.. but, and I may be misinformed here, it
appears the actual phone itself is not rotating the screen based on
the keyboard of position of the actual phone.

He even stated many of the default Google application aren't rotating
as well, and that very few actually change based on the way the device
is being held.

On Oct 20, 12:21 pm, hackbod [EMAIL PROTECTED] wrote:

 I don't know what you mean by turn the view.  When the orientation
 changes to switch from the dominant to secondary orientation (portrait
 to landscape on the g1), the graphics of the entire screen are rotated
 to result in the screen being shown in the new orientation.  As such,
 there is no need to do anything yourself, at it looks like to the
 application is that the size of the screen has changed to match the
 new orientation.

 For different resources, normally you also don't need to do anything,
 because when the orientation changes the current activity is destroyed
 and a new one started, and the new one is running with a configuration
 matching the new orientation so will load the appropriate resources as
 it creates and initializes itself.

 The only except is if you are using android:configChanges to avoid
 being restarted due to a configuration change...  which is one of the
 reasons why it is strongly encouraged not to do this, and certainly if
 you are changing layouts due to the orientation I would really suggest
 letting the normal destroy/recreate path execute.  If you really
 really do want to mix the two, you will need to override
 onConfigurationChanged() and re-inflate your view hierarchy and re-
 initialize anything else depending on that or changing resources at
 that point.

 On Oct 20, 5:19 am, Mark Hansen [EMAIL PROTECTED] wrote:

  I've actually created layouts for both vertical and horizontal 
  views,
  I've had some people testing it and it turns out Android doesn't 
  turn
  the view, I guess it has to be detected?

  I was curious how to go about doing that detection.. I know I can 
  also
  set the view with:

  setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_*);

  The problem I'm having is what event to trap or how to go about
  determining which way the phone is being held.

  On Oct 20, 12:13 am, hackbod [EMAIL PROTECTED] wrote:

   Use the android:screenOrientation attribute when declaring your
   manifest:

  http://code.google.com/android/reference/android/R.styleable.html#And...

  http://code.google.com/android/reference/android/R.styleable.html#And...

   On Oct 19, 3:23 pm, Mark Hansen [EMAIL PROTECTED] wrote:

I was thinking Android switched orientation automatically based 
on the
phones position but I'm finding from users this is not the case.

Anyone have some sample code on how to switch screen 
orientation based
on the position of the phone?

Thanks,

Mark
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Disappearing Zoom Controls

2008-10-20 Thread David C

I have added ZoomControls to a MapView using addView(). When my
activity loads the controls appear briefly but then disappear, never
to be seen again. There only seems to be one discussion on this group
but it didn't explicitly address this issue.

Can anyone explain why this happens, and how it can be avoided so the
controls persist? Also, is the mechanism that causes this documented
anywhere (so for example, the delay to disappearance could be
controlled)? There's nothing mentioned in the ZoomControls docs or its
super-classes (that I've found)

I've been going round in circles for more than a day on this with no
success.

Thanks!
David
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Disappearing Zoom Controls

2008-10-20 Thread Mark Murphy

David C wrote:
 I have added ZoomControls to a MapView using addView(). When my
 activity loads the controls appear briefly but then disappear, never
 to be seen again. There only seems to be one discussion on this group
 but it didn't explicitly address this issue.
 
 Can anyone explain why this happens, and how it can be avoided so the
 controls persist? 

Since we can't see your code, it's a little tough to answer your 
question. So let me tell you what works for me:

1. Put something in your layout for the zoom controls:

RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_width=fill_parent
android:layout_height=fill_parent
com.google.android.maps.MapView android:id=@+id/map
android:layout_width=fill_parent
android:layout_height=fill_parent
android:apiKey=NooYawk
android:clickable=true /
LinearLayout android:id=@+id/zoom
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_alignParentBottom=true
android:layout_alignParentLeft=true /
/RelativeLayout

2. Add the actual zoom controls to your container:

ViewGroup zoom=(ViewGroup)findViewById(R.id.zoom);

zoom.addView(map.getZoomControls());

When I click in the area for the zoom controls (lower left in the 
example shown above), the controls appear for ~2 seconds, or ~2 seconds 
after I last interact with them (if I'm actually working the controls). 
And they reappear the same way.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Video and Audio format supported in Android SDK 1.0

2008-10-20 Thread Nan.YE

So, how about audio formats? mp3, midi and wav?

On Oct 21, 3:54 am, zl25drexel [EMAIL PROTECTED] wrote:
 mp4 and 3gp are supported. you need to make sure your video is android
 compatible however, (i.e, able to play it on other platform such as
 iphone does not means it's also playable on android).

 try on linux to encode your video with $MP4Box test.mp4 -hint

 On Oct 20, 4:13 am, Nan.YE [EMAIL PROTECTED] wrote:

  Hi all,

  What video and audio format are supported in Android SDK 1.0 and T-
  mobile G1 devices?
  Could anyone give me a brief conclusion?

  And does Android platform support codec extension? That means
  developer can import some new codes into the system to support new
  media formats?

  Best regards,
  Nan YE
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Positioning of ImageView

2008-10-20 Thread Yav

Hi, this is a very simplistic question, however, after struggling for
an hour I've decided to ask here.
Basically, I have a login form composed of a Relative Layout, some
Text Fields and Buttons. I would like to add an ImageView and position
it in the middle of the width with margin of the top of 20 px. The
positioning has to be constant so that when the screen is rotated the
Image remains in the middle of the screen's width and 20 px off the
top. Any suggestions how to achieve that? Thanks.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Apps for Democracy Contest $20,000 in Prizes

2008-10-20 Thread Shane Isbell
+1 for democracy
+1 for capitalism, -1 for spec-work

On Mon, Oct 20, 2008 at 2:39 PM, Mark Hansen [EMAIL PROTECTED] wrote:


 Looks like spec work, which I implore other devs to avoid:

 See http://www.no-spec.com/ for more information.





 On Oct 19, 5:56 pm, corbett3000 [EMAIL PROTECTED] wrote:
  So we're hosting an app dev challenge here in DC (anyone from anywhere
  can enter) and our first submission was an iphone app.
 
  I'm hoping you guys will be interested to check out Apps for Democracy
  and see if an Android app would be useful for visualizing DC's public
  data. here's the info:
 
  Apps for Democracy will feature 60 cash prizes from $2000 to $100
  dollars for a total of $20,000 in prizes. Developers and designers
  will compete by creating web applications, widgets, Google Maps mash-
  ups, iPhone apps, Facebook apps, and other digital utilities that
  visualize DC.gov's Data Catalog (http://data.octo.dc.gov), which
  provides real-time data from multiple agencies to citizens — a
  catalyst ensuring agencies operate as more responsive, better
  performing organizations.
 
  More athttp://www.appsfordemocracy.org
 
  -Peter (@corbett3000)
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Disappearing Zoom Controls

2008-10-20 Thread David C

Thanks for the response Mark. I hadn't made the map clickable so had
no way to return the controls. Fixing that solved the problem.

It still seems a bit odd that the behaviour is neither configurable
nor documented.

Oh well - I suppose I could always design my own controls if needed.

Thanks again!
David


On Oct 20, 5:48 pm, Mark Murphy [EMAIL PROTECTED] wrote:
 David C wrote:
  I have added ZoomControls to a MapView using addView(). When my
  activity loads the controls appear briefly but then disappear, never
  to be seen again. There only seems to be one discussion on this group
  but it didn't explicitly address this issue.

  Can anyone explain why this happens, and how it can be avoided so the
  controls persist?

 Since we can't see your code, it's a little tough to answer your
 question. So let me tell you what works for me:

 1. Put something in your layout for the zoom controls:

 RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android;
         android:layout_width=fill_parent
         android:layout_height=fill_parent
         com.google.android.maps.MapView android:id=@+id/map
                 android:layout_width=fill_parent
                 android:layout_height=fill_parent
                 android:apiKey=NooYawk
                 android:clickable=true /
         LinearLayout android:id=@+id/zoom
                 android:layout_width=wrap_content
                 android:layout_height=wrap_content
                 android:layout_alignParentBottom=true
                 android:layout_alignParentLeft=true /
 /RelativeLayout

 2. Add the actual zoom controls to your container:

 ViewGroup zoom=(ViewGroup)findViewById(R.id.zoom);

 zoom.addView(map.getZoomControls());

 When I click in the area for the zoom controls (lower left in the
 example shown above), the controls appear for ~2 seconds, or ~2 seconds
 after I last interact with them (if I'm actually working the controls).
 And they reappear the same way.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com

 Android Training on the Ranch! -- Mar 16-20, 
 2009http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to measure time interval for certain process?

2008-10-20 Thread JP

Not Android-specific; perhaps
 System.currentTimeMillis()
delivers for you.


On Oct 20, 5:53 am, Andy Quan [EMAIL PROTECTED] wrote:
 Hi all,
 Anybody knows how to measure time interval for certain process rather
 than CPU elapsed time?

 I have noticed there is a class named android.os.SystemClock, but
 according to its description, it is for CPU timing. And what if I want
 to measure CPU cost of applications like MediaPlayer?

 I'd appreciate if there is any comment

 Thanks,
 Andy
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Browser based installation fails on G1

2008-10-20 Thread InC

Actually, the mime-type did the trick. Thanks Mark.

On Oct 20, 4:35 pm, InC [EMAIL PROTECTED] wrote:
 No I didn't. However, would that be root cause, since it actually went
 through the permissions approval screen and started to install. I'm
 assuming if it hadn't read the manifest file, it would have failed
 even before that step.

 Anyway I'll configure the mime-type on the webserver and give it a
 shot.

 On Oct 20, 2:44 pm, Mark Hansen [EMAIL PROTECTED] wrote:

  Did you set the mime types .apk files on your webserver?

  application/vnd.android.package-archive

  On Oct 20, 4:41 pm, InC [EMAIL PROTECTED] wrote:

   Here's the adb logcat output from the exception -

   I/ActivityManager(   53): Displayed activity
   com.android.packageinstaller/.InstallAppProgress: 157 ms
   D/asset   (   53): failed to open Zip archive '/data/app/
   vmdl17815.tmp'
   W/PackageParser(   53): Unable to read AndroidManifest.xml of /data/
   app/vmdl17815.tmp
   W/PackageParser(   53): java.io.FileNotFoundException:
   AndroidManifest.xml
   W/PackageParser(   53):         at
   android.content.res.AssetManager.openXmlAssetNative(Native Method)
   W/PackageParser(   53):         at
   android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:
   471)
   W/PackageParser(   53):         at
   android.content.res.AssetManager.openXmlResourceParser(AssetManager.java:
   439)
   W/PackageParser(   53):         at
   android.content.pm.PackageParser.parsePackageName(PackageParser.java:
   436)
   W/PackageParser(   53):         at
   com.android.server.PackageManagerService.installPackageLI(PackageManagerService.java:
   3102)
   W/PackageParser(   53):         at
   com.android.server.PackageManagerService
   $4.run(PackageManagerService.java:3008)
   W/PackageParser(   53):         at
   android.os.Handler.handleCallback(Handler.java:542)
   W/PackageParser(   53):         at
   android.os.Handler.dispatchMessage(Handler.java:86)
   W/PackageParser(   53):         at android.os.Looper.loop(Looper.java:
   123)
   W/PackageParser(   53):         at
   android.os.HandlerThread.run(HandlerThread.java:60)
   E/PackageManager(   53): Couldn't find a package name in : /data/app/
   vmdl17815.tmp
   I/installd(   36): unlink /data/dalvik-cache/
   [EMAIL PROTECTED]@[EMAIL PROTECTED]
   I/InstallAppProgress(  806): Sleeping for 5 seconds to display screen


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Apps for Democracy Contest $20,000 in Prizes

2008-10-20 Thread corbett3000

I can see how this would be percieved as being spec work - though for
it to be spec work that would imply that there would be a 'full
budget' outside of this to pay for this kind of development.

There isn't. The contest is structured to support the DC tech
community and beyond...it's the first time The District's CTO is
opening up to letting individuals and small companies provide
solutions to their big challenges in an open manner rather than
issuing a multimillion dollar contact to a big contractor like IBM or
Lockheed or something.

The last point I'd add is that this is about 'saving our own
money'...we pay taxes and those taxes are unwisely spent by the
government in paying way to much for crappy IT projects...so if we as
a community of developers in DC (or outside of it) can provide a
better way to get things like this done...is this 'spec work'? No.
It's a better way of innovating for .gov and a great way for .gov to
support tech communities.

On Oct 20, 9:48 pm, Shane Isbell [EMAIL PROTECTED] wrote:
 +1 for democracy
 +1 for capitalism, -1 for spec-work

 On Mon, Oct 20, 2008 at 2:39 PM, Mark Hansen [EMAIL PROTECTED] wrote:

  Looks like spec work, which I implore other devs to avoid:

  Seehttp://www.no-spec.com/for more information.

  On Oct 19, 5:56 pm, corbett3000 [EMAIL PROTECTED] wrote:
   So we're hosting an app dev challenge here in DC (anyone from anywhere
   can enter) and our first submission was an iphone app.

   I'm hoping you guys will be interested to check out Apps for Democracy
   and see if an Android app would be useful for visualizing DC's public
   data. here's the info:

   Apps for Democracy will feature 60 cash prizes from $2000 to $100
   dollars for a total of $20,000 in prizes. Developers and designers
   will compete by creating web applications, widgets, Google Maps mash-
   ups, iPhone apps, Facebook apps, and other digital utilities that
   visualize DC.gov's Data Catalog (http://data.octo.dc.gov), which
   provides real-time data from multiple agencies to citizens — a
   catalyst ensuring agencies operate as more responsive, better
   performing organizations.

   More athttp://www.appsfordemocracy.org

   -Peter (@corbett3000)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problem Starting new ActivityForResult

2008-10-20 Thread StevePotell

Two quick possible errors here:

1.  was CustomerAddEdit added to the manifest as an activity?

2.  if createCustomer() is called inside a button click new
Intent(this, .. might be referencing the button listener.  Try new
Intent(MyForm.this, .. instead.



On Oct 19, 11:26 pm, fahadlala [EMAIL PROTECTED] wrote:
 Using Eclipse 3.4  ADT Plugin to Debug;

 I have followed the NotePadv2 Tutorial and created 2 activities, the
 First ListActivity works fine and shows No Notes/Customers Yet, but
 when launching Second activity through Add Notes/Customers  I get
 the following error: The applciation has stopped unexpectedly.Please
 try again.

 This is the Step where this occurs:

    private void createCustomer() {
         Intent i = new Intent(this, CustomerAddEdit.class);
          startActivityForResult(i, ACTIVITY_CREATE);   // -- Error after
 this inside threads
     }

 The logcat produces no messages.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Is there a way to mount the emulator or the device as a hard drive on your local machine?

2008-10-20 Thread marstein

The device (the G1) can be plugged into the USB port and the PC can
see the files on the SD card. But then the SD card is not accessible
from the device any more :-(


On Oct 19, 6:15 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 This would let me examine the files etc with the tools that are on the
 local os.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Motorola Q skin now available for Android Emulator!

2008-10-20 Thread Tea Vui Huang

Motorola Q skin now available for Android Emulator!
http://teavuihuang.com/android

To install, download and unzip QVGA-L-MOTQ.zip to the Android skin
directory, e.g. C:\android-sdk-windows-1.0_r1\tools\lib\images
\skins. To run the Android emulator with this Motorola Q skin, enter
this on the command line: emulator -skin QVGA-L-MOTQ.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How do I update my activity on receiving intent in BroadcastReceiver

2008-10-20 Thread Abraham

HI ,

I'm trying the understand how an application can receive intent in
BroadcastReceiver  how it can inform the Activity abt the information
received in the intent.

For this purpose I have created an activity which has a TextView. In
OnCreate of the Activity I'm using AlarmManager to start sending
intents every 10 sec to broadcast receiver of my application. On
receiving this intent I would like to update the text view with the
current time.

From the documention I understand that we need to be using the
NotificationManager instead of trying to directly updating the UI.

Can some one pls let me know how I can achieve this.

Code snippets:
public class myFaves extends Activity
{
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mCurrentTime = (TextView) findViewById(R.id.curtime_label);
   startUpdatingCurrentTime();
}

protected void onPause()
{
super.onPause();
cancelUpdatingCurrentTime();
}

private void startUpdatingCurrentTime()
{
Intent intent = new Intent(MyTimer.this, MyTimerReceiver.class);
PendingIntent sender = PendingIntent.getBroadcast(MyTimer.this, 0,
intent, 0);

 // We want the alarm to go off every second from now.
 long firstTime = SystemClock.elapsedRealtime();
 firstTime += 1;

 // Schedule the alarm!
 AlarmManager am = (AlarmManager)getSystemService(ALARM_SERVICE);
 am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime,
1, sender);

 Calendar calendar = Calendar.getInstance();
 calendar.setTimeInMillis(System.currentTimeMillis());
 mCurrentTime.setText( calendar.getTime().toString());
}

public void cancelUpdatingCurrentTime()
{
Intent intent = new Intent(MyTimer.this, MyTimerReceiver.class);
PendingIntent sender = PendingIntent.getBroadcast(MyTimer.this, 0,
intent, 0);

// And cancel the alarm.
AlarmManager am = (AlarmManager)getSystemService(ALARM_SERVICE);
am.cancel(sender);
}
}


public class MyTimerReceiver extends BroadcastReceiver
{
protected static final String LOG_TAG = MyTimer;


@Override
public void onReceive(Context context, Intent intent)
{
Log.d(LOG_TAG, onReceive);
// How do I update the TextView with
current time in my activity?
}

}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---