[android-developers] Re: One activity per view

2009-06-25 Thread bsbi...@googlemail.com

thanks. it works fine now

On Jun 23, 2:12 am, 张飞  wrote:
> Maybe u can write youe AndroidManifest.xml  like this:
>
> android:label="@string/app_name">
>
> android:name="android.intent.action.MAIN" />
> android:name="android.intent.category.LAUNCHER" />
>
> 
>
>
> android:label="@string/
> app_name">
>
>
> 2009/6/22 bsbi...@googlemail.com 
>
>
>
>
>
> > Hi,
>
> > Thanks.
>
> > I have currently have three pages and have three activities. The
> > problem is that when I deploy the app on my phone I see three app
> > icons
>
> > Any ideas?
>
> > How do I say activityOne is the default activity and the other two are
> > sub-activities of activityOne?
>
> >  >android:label="@string/app_name">
> >
> > > android:name="android.intent.action.MAIN" />
> > > android:name="android.intent.category.LAUNCHER" />
> >
>
> > > android:label="@string/
> > app_name">
> >
> > > android:label="@string/
> > app_name">
> >
>
> > On Jun 22, 12:49 pm, Mark Murphy  wrote:
> >  > bsbi...@googlemail.com wrote:
> > > > I am developing an app with there pages (views). Would each page be a
> > > > separate activity?
>
> > > Possibly. You can go either way. I usually assume separate activities
> > > until something forces my hand to go to multiple "pages" in one activity.
>
> > > --
> > > Mark Murphy (a Commons Guy)http://commonsware.com|
> >http://twitter.com/commonsguy
>
> > > Looking for Android opportunties?http://wiki.andmob.org/hado
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Errors In Android Run time I need suggestions

2009-06-25 Thread Desu Vinod Kumar
06-25 12:59:19.997: ERROR/AndroidRuntime(825): Uncaught handler: thread main
exiting due to uncaught exception
06-25 12:59:20.318: ERROR/AndroidRuntime(825): java.lang.StackOverflowError
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
java.lang.String.getChars(String.java:1065)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
java.io.Writer.write(Writer.java:138)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.kxml2.io.KXmlSerializer.check(KXmlSerializer.java:93)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.kxml2.io.KXmlSerializer.startTag(KXmlSerializer.java:363)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
Source)
06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
org.ksoap

[android-developers] Re: Errors In Android Run time I need suggestions

2009-06-25 Thread Daniel Janev

Hi,

The default stack size of Android threads is 8K which is not enough for
your purpose. All you have to do is to start this operation in separate
thread using the constructor with stack size. IMHO 64K will be enough
for you.

Desu Vinod Kumar wrote:
> 06-25 12:59:19.997: ERROR/AndroidRuntime(825): Uncaught handler: thread
> main exiting due to uncaught exception
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): java.lang.StackOverflowError
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> java.lang.String.getChars(String.java:1065)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> java.io.Writer.write(Writer.java:138)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.kxml2.io.KXmlSerializer.check(KXmlSerializer.java:93)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.kxml2.io.KXmlSerializer.startTag(KXmlSerializer.java:363)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
> Source)
> 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
> Source)
> 06-25 12:

[android-developers] xmlpullparser input xml?

2009-06-25 Thread brilliant winger

HI

/
XmlPullParserFactory factory = XmlPullParserFactory.newInstance
();
factory.setNamespaceAware(true);
XmlPullParser xpp = factory.newPullParser();

xpp.setInput( new StringReader ( "Hello World!" ) );
int eventType = xpp.getEventType();
...
...
...
...


I found this code in android developers site.

How can I use "res/xml/*.xml",  instead of ""Hello World!" ?


--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: WebView

2009-06-25 Thread Sukitha Udugamasooriya

Thanks Mark Murphy, Works well. Genies piece... :)
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: 6502 Emulator

2009-06-25 Thread ndatta

Oh, I see. Any particular reason? Is a JIT planned in a future
release? Thanks.

On Jun 22, 10:42 pm, fadden  wrote:
> On Jun 22, 3:20 am, ndatta  wrote:
>
> > Isn't the JITter smart enough to convert (1) to (2) above?
>
> There is no JIT in the current software release.
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to get the media files stored in sdcard?

2009-06-25 Thread manoj

Hi,

I want to show the list of media files (.mp3, .mp4...etc) available in
sdcard.

How can I do this?

Thanks,
Manoj.
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to enable Android WAP PUSH SMS ?

2009-06-25 Thread Light

Have you add suitalbe mineType for WAP_PUSH_RECEIVED in your
AndroidManifest.xml ?

On 6月17日, 下午10時36分, BigMM  wrote:
> Hi, All:
>   I have a question aboutWAPPUSHSMS on Android. In Mobile
> device, if you want to receive aWAPPUSHSMS, you need to degrade the
> SMS security policy level. Then you can acturally receive it. But I
> have no idea about how to do this on Android? I try to modify the
> androidmanifest.xml that contains
> "android.permission.RECEIVE_WAP_PUSH" and change the permission from
> dangerous to normal. But there is too many androidmanifest.xml, I
> don't know where the exact path I should be modify? Does any one know
> how to do that or my thought is wrong? thanks all.
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Recreate PopupWindow onRestoreInstanceState

2009-06-25 Thread extrapedestrian

Thanks for reply.

But, it still crashes with same error.
Run is executed before activity screen is displayed (it takes some
time: 200~300ms)
Only way I made it work is through timer delay set to 500ms, but it is
not good solution.

Any other ideas?


--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Example on shared memory usage

2009-06-25 Thread GAYET Thierry
Hi, i need to share one important key information between one service and some 
application.

My first question is about the usage of the shared memory on Android. Is there 
a way to secure it for only one service and some selected application ?

 Cordialement


Thierry GAYET
NextInnovation.org
+33(0)663.849.589



  
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Establishing a TLS tunner from a custom certificate

2009-06-25 Thread GAYET Thierry
Hi, I have the certificate provided by a server and i wanna make a TLS tunnel 
using this custom certificate.

IS it possible to have a source code starting (or any API) that i can use for ?

I think i have ever seen one question around that topic but didn't find it ... 
sorry for the spam.

 Cordialement


Thierry GAYET
NextInnovation.org
+33(0)663.849.589



  
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Recreate PopupWindow onRestoreInstanceState

2009-06-25 Thread extrapedestrian

I also tried with sending message to Handler, which then displays
popup - but its not working too.
Same problem.

On Jun 25, 11:13 am, extrapedestrian 
wrote:
> Thanks for reply.
>
> But, it still crashes with same error.
> Run is executed before activity screen is displayed (it takes some
> time: 200~300ms)
> Only way I made it work is through timer delay set to 500ms, but it is
> not good solution.
>
> Any other ideas?
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] list of fonts installed

2009-06-25 Thread Saurav Mukherjee
is there any way to find out all the fonts available in the phone... is
there a contentprovider for trhe same?

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Getting ESN number of a Phone

2009-06-25 Thread swapnil

Hello All,

Is it possible to get :
The ESN Number of a phone
The Hardware version
The Software version of a phone.


Is there any way to get this stuff.


Thanks in advance.


Swapnil Dalal.



--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: xmlpullparser input xml?

2009-06-25 Thread Neil

Context.getResources().getXml(int id)

Neil



On Jun 25, 10:02 am, brilliant winger  wrote:
> HI
>
> /
>         XmlPullParserFactory factory = XmlPullParserFactory.newInstance
> ();
>         factory.setNamespaceAware(true);
>         XmlPullParser xpp = factory.newPullParser();
>
>         xpp.setInput( new StringReader ( "Hello World! foo>" ) );
>         int eventType = xpp.getEventType();
> ...
> ...
> ...
> ...
> 
>
> I found this code in android developers site.
>
> How can I use "res/xml/*.xml",  instead of ""Hello World! foo>" ?
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Design

2009-06-25 Thread Peli

One possibility is to do it as the Market app (or also the Bing search
engine for images)
You first download a number of elements, and as soon as the user
scrolls down to a certain point,
you download more items and add them dynamically to the list.

Peli
www.openintents.org

On Jun 24, 10:55 pm, Andy_Sthml  wrote:
> Thanks for good thoughts! What I did not explain was that my idea is
> to eventually publish my app. Then servers of other users will be
> returning data to the app - and possibly returning much more data
> (list items). I do not have access to a "huge" worst-case data-source
> and I do not know how to simulate one.
>
> Here is where my questions arose: Is there a way to find a suitable
> "happy medium" without trial and error testing on a huge database?
>
> Some reflections on your ideas:
>
> - Prefetch and cache: It would be perfectly ok for the user to wait a
> few secs for "loading" at application startup. I have been thinking
> about reading the complete data from the server, and filling a
> background array of custom data-objects with it. Then the listView
> could be fed and filled from the background array independently of
> what the user-selection might be (different content depending on
> selection). However, I get back to the same question: How do I know
> there is enough memory to hold the complete background array, and if
> not - what the "happy medium" is?
>
> - Reusing: If only enough items for one display is loaded (added to
> the ArrayAdapter) - won't this then interrupt the nice sliding feel /
> momentum feel of the scrolling listview?
>
> - XML: No plans for XML, however, the data returned by the server is a
> huge long URL-encoded text string, So after parsing out the single
> elemnts with String-methods, I am currently using the URLDecoder-class
> and the decode-method to get the pretty-printed strings out. I do not
> see a way around this.
>
> - Load and decompress in a non-UI thread: I understand what you mean,
> and also sense this might be a good solution. Though, I do not have
> any idea how to begin with this. Links to any guidelines would be
> appreciated.
>
> Thanks! /Andy
>
> On 24 Juni, 19:33, "Yusuf T. Mobile"  wrote:
>
> > Hi Andy. Some ideas are:
> > - implement the simplest design first (i.e., load everything into
> > memory) and profile early and often
> > - iff (if and only if) and wherre (where and only where - I made that
> > one up:) it croaks, some possible optimizations are:
> >     - don't put thousands of items on one list. Sublists may be an
> > alternative.
> >     - prefetch and cache data - especially the images, rather than
> > loading them real-time from URLs. Loading everything is in theory the
> > most efficient, but may make the user wait at first, which ruins
> > responsiveness. Depending on the data characterization and use cases,
> > you will have to find a happy medium.
> >     - reuse objects rather than incur the cost of memory allocation
> > and GC. For example, if you have a custom list item class, only create
> > as many as are needed to display on the screen, and update their data
> > as the user scrolls up and down, rather than creating lots of new ones
> > and abandoning old ones as the user scrolls.
> >     - don't use XML, it has many advantages, but bandwidth and parsing
> > efficiency are not among them. Use a streaming (rather than tree)
> > parser, with a compressed protocol. Google's protobuf may be an
> > option.
> >     - load and decompress in a non-UI thread. You don't have to wait
> > until everything is loaded and decompressed to show something, you can
> > do so selectively depending on what the user is looking at and may
> > soon be looking at.
>
> > Yusuf Saib
> > Android
> > ·T· · ·Mobile· stick together
> > The views, opinions and statements in this email are those of the
> > author solely in their individual capacity, and do not necessarily
> > represent those of T-Mobile USA, Inc.
>
> > On Jun 23, 2:06 pm, Andy_Sthml  wrote:
>
> > > This is mainly a design question :
>
> > > My app connects to a server from where data is retrieved and presented
> > > in a listview. Depending on user-selection different data is retreived
> > > and filled in the list. A typical list item consists of a text string
> > > of up to some 50 or 60 characters depending what the server returns.
> > > Additionally, a small image icon is shown next to each string. The
> > > server may return any number of items from 0 up to many hundred or
> > > even thousands. It is possble to ask the server to iteratively return
> > > subsets of the content. The images are actually links to http-
> > > addresses, but I guess this still requires/allocates memory for the
> > > listview by Android.
>
> > > How do I design for efficiency and responsiveness, considering memory
> > > consumption?
> > > Are there any generic guide lines on how many list items, Strings or
> > > Bytes to keep in memory?
>
> > > On the one hand I would like to have as many items 

[android-developers] Re: How to create toggle buttons that have 'jointed' appereance?

2009-06-25 Thread Peli

You would have to create custom drawables and assign them to the
buttons.

Peli
www.openintents.org

On Jun 24, 1:51 pm, fhucho  wrote:
> Hi,
> how can I create a group of 3 toggle buttons that look like there are
> a single widget (they look 'jointed').
> If it is not clear what I mean, look at the bottom buttons in iPhone
> map application.
> Or the buttons for choosing car/walk/transit directions in the new
> maps for android app.
>
> 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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: list of fonts installed

2009-06-25 Thread Mark Murphy

Saurav Mukherjee wrote:
> is there any way to find out all the fonts available in the phone...

http://developer.android.com/reference/android/graphics/Typeface.html

There are only three fonts: normal (Droid Sans), serif (Droid Serif),
and monospace (Droid Sans Mono).

While there may be additional fonts buried in WebKit somewhere, they
appear to be inaccessible to developers outside of WebKit. :-(

The only other fonts are any TrueType ones you bundle with your application.

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

Android Development Wiki: http://wiki.andmob.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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: list of fonts installed

2009-06-25 Thread Saurav Mukherjee
thanks...

On Thu, Jun 25, 2009 at 4:31 PM, Mark Murphy wrote:

>
> Saurav Mukherjee wrote:
> > is there any way to find out all the fonts available in the phone...
>
> http://developer.android.com/reference/android/graphics/Typeface.html
>
> There are only three fonts: normal (Droid Sans), serif (Droid Serif),
> and monospace (Droid Sans Mono).
>
> While there may be additional fonts buried in WebKit somewhere, they
> appear to be inaccessible to developers outside of WebKit. :-(
>
> The only other fonts are any TrueType ones you bundle with your
> application.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> Android Development Wiki: http://wiki.andmob.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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: use multiple files to store string values

2009-06-25 Thread Odessa Silverberg



On Jun 23, 10:56 pm, fry  wrote:
> Hi,
>
> Is it possible to store strings values in multiple files? Eg,
> strings.xml, strings1.xml, strings2.xml etc.
>
> I do not mean localized versions of the same file - those multiple
> files should contain different string ids in the same language, so in
> code they would be refered like:
>
> R.strings1.my_string_1
> R.strings1.my_string_2
> R.strings2.my_string_3
> etc.

As far as i know, the file name doesn't matter. You can have multiple
strings-n.xml files, but they all will still be refered as
R.strings.my_string.

It's not the file name that decides the part between R and the string
identifier, it's the xml element.

Scroll down to "Strings and Styled Text"
http://developer.android.com/guide/topics/resources/available-resources.html

It says: "Resource source file location: res/values/strings.xml (file
name is arbitrary)"

For example:

   Welcome!
   We are so glad
to see you.


the  element decides the part after R. and you can't
change that.

> So, "strings1", "strings2", "strings3" would be a kind of namespace
> for them.
>
> Or, another way is to have multiple R classes inside one project,
> which would deal with different stringsXXX.xml files.
>
> Like, currently we can refer to "my.name.space.R" and to "android.R"
> at the same time, so is it possible to have:
>
> android.R
> my.name.space1.R
> my.name.space2.R
> etc
>
> at the same time inside single project?
iirc you can't do that neither. More interesting question would be:
Why would you need seperated namespaces for resources? usually this
can be done in one single R file and have all the strings in
R.strings. Maybe you're just having some bad design which can be
solved otherwise? like i.e. by selecting proper naming of your string
resource ids?

Instead of having
R.string.name_label
R.string.surname_label

you could have
R.string.label_name
R.string.label_surname
etc.
or even
R.string.activity1_label_name
R.string.activity1_label_surname etc.

This would make it much easier to organize a big amount of strings
than using multiple R.xxx.my_string instances (which could also lead
to error, if you swap R.string1.my_string1 with R.string2.my_string1.
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Got media player error in sdk 1.5 r2

2009-06-25 Thread manoj

Hi friends,

I have written a small media player app which plays media files stored
in sdcard.

For audio files I got the following exception:

E/MediaPlayerService(   35): Couldn't open fd for
content://media/KeypressReturn.ogg/audio/media
E/MediaPlayer( 3813): Unable to to create media player
E/MediaPlayerDemo( 3813): error: setDataSource failed.:
status=0x8000
E/MediaPlayerDemo( 3813): java.io.IOException: setDataSource failed.:
status=0x8000
E/MediaPlayerDemo( 3813):   at android.media.MediaPlayer.setDataSource
(Native Method)
E/MediaPlayerDemo( 3813):   at android.media.MediaPlayer.setDataSource
(MediaPlayer.java:610)
E/MediaPlayerDemo( 3813):   at
com.blumedialab.mediaplayer.AudioPlayerNew$6.run(AudioPlayerNew.java:
207)
E/MediaPlayerDemo( 3813):   at java.lang.Thread.run(Thread.java:1058)


For video files, I got the following exception:

E/MediaPlayerService(   35): Couldn't open fd for
content://media/664771_dl_qcif.mp4/video/media
E/MediaPlayer( 3813): Unable to to create media player
W/VideoView( 3813): Unable to open content: 
content://media/664771_dl_qcif.mp4/video/media
W/VideoView( 3813): java.io.IOException: setDataSource failed.:
status=0x8000
W/VideoView( 3813): at android.media.MediaPlayer.setDataSource(Native
Method)
W/VideoView( 3813): at android.media.MediaPlayer.setDataSource
(MediaPlayer.java:610)
W/VideoView( 3813): at android.widget.VideoView.openVideo
(VideoView.java:195)
W/VideoView( 3813): at android.widget.VideoView.access$1700
(VideoView.java:48)
W/VideoView( 3813): at android.widget.VideoView$6.surfaceCreated
(VideoView.java:418)
W/VideoView( 3813): at android.view.SurfaceView.updateWindow
(SurfaceView.java:352)
W/VideoView( 3813): at android.view.SurfaceView.dispatchDraw
(SurfaceView.java:259)
W/VideoView( 3813): at android.view.View.draw(View.java:5841)
W/VideoView( 3813): at android.view.SurfaceView.draw(SurfaceView.java:
247)
W/VideoView( 3813): at android.view.ViewGroup.drawChild
(ViewGroup.java:1486)
W/VideoView( 3813): at android.view.ViewGroup.dispatchDraw
(ViewGroup.java:1228)
W/VideoView( 3813): at android.view.View.draw(View.java:5841)
W/VideoView( 3813): at android.view.ViewGroup.drawChild
(ViewGroup.java:1486)
W/VideoView( 3813): at android.view.ViewGroup.dispatchDraw
(ViewGroup.java:1228)
W/VideoView( 3813): at android.view.View.draw(View.java:5841)
W/VideoView( 3813): at android.widget.FrameLayout.draw
(FrameLayout.java:352)
W/VideoView( 3813): at android.view.ViewGroup.drawChild
(ViewGroup.java:1486)
W/VideoView( 3813): at android.view.ViewGroup.dispatchDraw
(ViewGroup.java:1228)
W/VideoView( 3813): at android.view.View.draw(View.java:5841)
W/VideoView( 3813): at android.widget.FrameLayout.draw
(FrameLayout.java:352)
W/VideoView( 3813): at com.android.internal.policy.impl.PhoneWindow
$DecorView.draw(PhoneWindow.java:1847)
W/VideoView( 3813): at android.view.ViewRoot.draw(ViewRoot.java:1217)
W/VideoView( 3813): at android.view.ViewRoot.performTraversals
(ViewRoot.java:1030)
W/VideoView( 3813): at android.view.ViewRoot.handleMessage
(ViewRoot.java:1482)
W/VideoView( 3813): at android.os.Handler.dispatchMessage
(Handler.java:99)
W/VideoView( 3813): at android.os.Looper.loop(Looper.java:123)
W/VideoView( 3813): at android.app.ActivityThread.main
(ActivityThread.java:3948)
W/VideoView( 3813): at java.lang.reflect.Method.invokeNative(Native
Method)
W/VideoView( 3813): at java.lang.reflect.Method.invoke(Method.java:
521)
W/VideoView( 3813): at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:782)
W/VideoView( 3813): at com.android.internal.os.ZygoteInit.main
(ZygoteInit.java:540)
W/VideoView( 3813): at dalvik.system.NativeStart.main(Native Method)

Can any one please help me solve this problem.

Thanks,
Manoj.

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problem using Debug.setAllocationLimit

2009-06-25 Thread StefanK

Thanks for the reply.

I did read that this must be enabled in VM but for some reason I
thought this can be enabled at runtime by something like
VMDebug.startAllocCounting() or some other call.
Either way this does not appear to be enabled by default in the
emulator or the device. Does that mean that most of the the allocation
tracking methods in the Debug classes do not work either?

As far as the allocation tracking tool in DDMS - it is useful but I
find it to be very "verbose" - it captures many allocations some that
are related to my code but most are outside it. May be I don't know
how to use it, but it is very difficult to find what allocations occur
in a given function. (What I also find odd is that if I just start and
immediately stop tracking - it captures bunch of allocations without
my application actually doing anything.)

What I am trying to track down is an excessive number of garbage
collections that occur during a list view scroll. When I build my
items I load images, format text, dates and numbers. Some of those
calls turn out to be expensive in terms of allocations (for example
string.Format). The result of the allocations is multiple garbage
collections during scroll that make the view stutter.
So far unfortunately the only empiric (and somewhat reliable) way to
find what code is responsible for the allocations has been to comment
some of the code and see how often the garbage collection kicks in.

Is there a better way or procedure to find what allocations occur
between 2 points.

Stefan


On Jun 24, 6:27 pm, fadden  wrote:
> On Jun 24, 12:20 pm, Stefan  wrote:
>
> > I am trying to track some excessive memory allocations in my
> > application. For some reason the use of
> > Debug.setAllocationLimit  or VMDebug.setAllocationLimit  appears to
> > have no effect.
>
> DroidDoc sayeth:
>
>      * The feature may be disabled in the VM configuration.  If so,
> this
>      * call has no effect, and always returns -1.
>
> You can tell whether or not it's enabled by running "adb shell
> dalvikvm -help" and looking for the configuration line:
>
>   Configured with: debugger profiler hprof extra_gc_checks
> dalvik_assert show_exception=1
>
> If "alloc_limits" doesn't appear, it's not enabled in the VM you're
> running.  Because it has small but nonzero performance consequences,
> and didn't actually get used for much internally, it's disabled by
> default.
>
> You'd need to enable WITH_ALLOC_LIMITS in dalvik/vm/Android.mk and
> rebuild the VM before you can use it.
>
> In any event, it's more useful for regression tests (e.g. you declare
> that some piece of code doesn't allocate memory, and let the alloc
> limit fire if that changes).  The "allocation tracker" in the stand-
> alone DDMS is probably more useful, though you need to insert some
> pause-points in your app to give you a chance to manually start/update
> the tracker around a specific piece of code.
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Draggable UI Elements

2009-06-25 Thread Tez

Hi,

I want to build a draggable interface. To be explicit, i want to be
able to drag an image from one location to another. For this, I have
implemented a small class that contains the image and its current co-
ordinates. To move around, I extend a View and intercept the 'Touch'
events. Hence, i am able to drag an element around.
Now, the problem is that when i drop the dragged image, i want to be
able to verify that the dropped location is legal(according to a
certain set of guidelines) or not. How may i accomplish this?

Cheers,
Earlence

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Delete assets at runtime

2009-06-25 Thread nuno

Hi all,

I have a large (900kb) asset in the assets directory which is only
used once by the app at initialization time. Is there way for me to
delete this file at runtime?
If not delete change it's contents to "0" and effectively reduce its
size to almost nothing.
There isn't really any point of having this take space on the phone's
limited memory.

Thanks for the help.

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Errors In Android Run time I need suggestions

2009-06-25 Thread Desu Vinod Kumar
Hi

06-25 17:41:35.920: ERROR/NetworkStateTracker(53):
net.tcp.buffersize.unknown not found in system properties. Using defaults
06-25 17:41:35.959: ERROR/NetworkStateTracker(53): Can't set tcp buffer
sizes:java.io.FileNotFoundException: /sys/kernel/ipv4/tcp_rmem_min
06-25 17:41:36.099: ERROR/NetworkStateTracker(53):
net.tcp.buffersize.unknown not found in system properties. Using defaults
06-25 17:41:36.439: ERROR/NetworkStateTracker(53): Can't set tcp buffer
sizes:java.io.FileNotFoundException: /sys/kernel/ipv4/tcp_rmem_min


what are this errors regarding ..
any connection problem

On Thu, Jun 25, 2009 at 1:21 PM, Daniel Janev  wrote:

>
>Hi,
>
> The default stack size of Android threads is 8K which is not enough for
> your purpose. All you have to do is to start this operation in separate
> thread using the constructor with stack size. IMHO 64K will be enough
> for you.
>
> Desu Vinod Kumar wrote:
> > 06-25 12:59:19.997: ERROR/AndroidRuntime(825): Uncaught handler: thread
> > main exiting due to uncaught exception
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825):
> java.lang.StackOverflowError
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> > java.lang.String.getChars(String.java:1065)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> > java.io.Writer.write(Writer.java:138)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> > org.kxml2.io.KXmlSerializer.check(KXmlSerializer.java:93)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> > org.kxml2.io.KXmlSerializer.startTag(KXmlSerializer.java:363)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> >
> org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
> > Source)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> > org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
> > Source)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> > org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
> > Source)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> >
> org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
> > Source)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> > org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
> > Source)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> > org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
> > Source)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> >
> org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
> > Source)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> > org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
> > Source)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> > org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
> > Source)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> >
> org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
> > Source)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> > org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
> > Source)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> > org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
> > Source)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> >
> org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
> > Source)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> > org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
> > Source)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> > org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
> > Source)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> >
> org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
> > Source)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> > org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
> > Source)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> > org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
> > Source)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> >
> org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
> > Source)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> > org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
> > Source)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> > org.ksoap2.serialization.SoapSerializationEnvelope.writeProperty(Unknown
> > Source)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> >
> org.ksoap2.serialization.SoapSerializationEnvelope.writeObjectBody(Unknown
> > Source)
> > 06-25 12:59:20.318: ERROR/AndroidRuntime(825): at
> > org.ksoap2.serialization.SoapSerializationEnvelope.writeElement(Unknown
> > Source)
> > 06-25 12:59:

[android-developers] Re: testing uses-permission

2009-06-25 Thread Odessa Silverberg

If you run tasks you know need a certain permissions and have no
crash.

iirc you can see in the package manager which permissions you
application has. You wont get any popups asking for permission after
the application was installed. The only time you have to check the
permissions is when the application is installed. At this time your
only choice is: "Install the application and allow all the necessary
permissions" or "Don't install the application and disallow all
permissions (no installed app = no permissions of course :P)".

You won't be asked every time you access the camera if you want to
allow it like on regular Java mobile phones

On Jun 24, 10:08 am, Sheado  wrote:
> howdy,
>
> i'm prepping my first app for publishing and am a bit confused about
> how to properly test my  tags.. if i don't specify
> any permissions my app runs with no complaints on my G1. I tried
> installing it via "adb install" as well as with the eoeAppInstaller
> (as somebody had recommended). Also, the app is signed with my own
> certificate (not the debug cert).
>
> given that it works fine with no permissions (btw, it accesses camera
> and sd card), how will I know if I've set all of the proper  permission> tags?
>
> what's the proper way to test  tags?
>
> thank you!!
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Delete assets at runtime

2009-06-25 Thread Mark Murphy

nuno wrote:
> I have a large (900kb) asset in the assets directory which is only
> used once by the app at initialization time. Is there way for me to
> delete this file at runtime?

No.

> If not delete change it's contents to "0" and effectively reduce its
> size to almost nothing.

No.

> There isn't really any point of having this take space on the phone's
> limited memory.

That may be true, but the APK is signed and cannot be modified at runtime.

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

_Beginning Android_ from Apress Now Available!

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Delete assets at runtime

2009-06-25 Thread nuno

Thanks Mark,
I though that was the answer. I'll have to live with the file.
Cheers,

Nuno

On Jun 25, 1:39 pm, Mark Murphy  wrote:
> nuno wrote:
> > I have a large (900kb) asset in the assets directory which is only
> > used once by the app at initialization time. Is there way for me to
> > delete this file at runtime?
>
> No.
>
> > If not delete change it's contents to "0" and effectively reduce its
> > size to almost nothing.
>
> No.
>
> > There isn't really any point of having this take space on the phone's
> > limited memory.
>
> That may be true, but the APK is signed and cannot be modified at runtime.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> _Beginning Android_ from Apress Now Available!
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Sense Orientation

2009-06-25 Thread kalyan simhan
hi all..
im trying to change the orientation of my screen dynamically as the user
changes the position of the phone i.e from portrait to landscape..im trying
to
do this on a openmoko freerunner.. im doing it this way..

sensorMgr = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
sensorListen = new SensorListener() {

@Override
public void onAccuracyChanged(int sensor, int accuracy) {
}

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

x.setText("x=" + values[0]);
y.setText("y=" + values[1]);
z.setText("z=" + values[2]);
setContentView(linear);  // linear is a LinearLayout
containing 3 textviews
if (sensor == SensorManager.SENSOR_ORIENTATION) {
// check the values array and change orientation
}
}
};
sensorMgr.registerListener(sensorListen,
SensorManager.SENSOR_ORIENTATION);

}

I dont get any values for x,y,z... why is it.. am i doing it the right way..
please please help!
Thanks in advance!

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Sense Orientation

2009-06-25 Thread Mark Murphy

kalyan simhan wrote:
> hi all..
> im trying to change the orientation of my screen dynamically as the user
> changes the position of the phone i.e from portrait to landscape..im
> trying to
> do this on a openmoko freerunner.. im doing it this way..
> 
> sensorMgr = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
> sensorListen = new SensorListener() {
> 
> @Override
> public void onAccuracyChanged(int sensor, int accuracy) {
> }
> 
> @Override
> public void onSensorChanged(int sensor, float[] values) {
>
> x.setText("x=" + values[0]);
> y.setText("y=" + values[1]);
> z.setText("z=" + values[2]);
> setContentView(linear);  // linear is a LinearLayout
> containing 3 textviews
> if (sensor == SensorManager.SENSOR_ORIENTATION) {
> // check the values array and change orientation
> }
> }
> };   
> sensorMgr.registerListener(sensorListen,
> SensorManager.SENSOR_ORIENTATION);   
>
> }
> 
> I dont get any values for x,y,z... why is it.. am i doing it the right
> way.. please please help!
> Thanks in advance!

If this is just an ordinary screen, use
android:screenOrientation="sensor" in your manifest:

http://androidguys.com/?p=2914

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

_Beginning Android_ from Apress Now Available!

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Is a five-way navigation key a mandatory requirement?

2009-06-25 Thread Delta Foxtrot
2009/6/25 JC 

> Actually I meant if there is no five-navigation key or trackball, only
> reserve 5 app keys, any potential risk or problem may have? thank you
> for answering.
>

Are you talking about making everything touch screen by any chance?

If so you'd need to do a lot of coding to work round the current physical
requirements.

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Sense Orientation

2009-06-25 Thread kalyan

thanks for the prompt reply but my objective is to make it as
a background application and do it for all screens... how do i
do it.. can u please guide me..
thanks in advance!

On Jun 25, 5:46 pm, Mark Murphy  wrote:
> kalyan simhan wrote:
> > hi all..
> > im trying to change the orientation of my screen dynamically as the user
> > changes the position of the phone i.e from portrait to landscape..im
> > trying to
> > do this on a openmoko freerunner.. im doing it this way..
>
> > sensorMgr = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
> >         sensorListen = new SensorListener() {
>
> >             @Override
> >             public void onAccuracyChanged(int sensor, int accuracy) {
> >             }
>
> >             @Override
> >             public void onSensorChanged(int sensor, float[] values) {
>
> >                 x.setText("x=" + values[0]);
> >                 y.setText("y=" + values[1]);
> >                 z.setText("z=" + values[2]);
> >                 setContentView(linear);  // linear is a LinearLayout
> > containing 3 textviews
> >                 if (sensor == SensorManager.SENSOR_ORIENTATION) {
> >                     // check the values array and change orientation
> >                 }
> >             }
> >         };      
> >         sensorMgr.registerListener(sensorListen,
> > SensorManager.SENSOR_ORIENTATION);      
>
> >     }
>
> > I dont get any values for x,y,z... why is it.. am i doing it the right
> > way.. please please help!
> > Thanks in advance!
>
> If this is just an ordinary screen, use
> android:screenOrientation="sensor" in your manifest:
>
> http://androidguys.com/?p=2914
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> _Beginning Android_ from Apress Now Available!
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to get the Xml response from the nusoap PHp web services

2009-06-25 Thread android.vinny

Hi

How to gett he Xml response form nusoap php webservices

can any help me regarding this how to get the xml response .


thanks in advance
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Parsing SOAP request

2009-06-25 Thread Desu Vinod Kumar
Hi

How can i get the XML response from the Nusoap php web server

any idea about that

On Wed, Jun 24, 2009 at 11:21 PM, feda al-shahwan wrote:

> Thank you for your response but could you please give me more details
> because my soap envelope doesnot contain a method it is just hello and what
> to put in the property field?
> Thanks
>
> On Tue, Jun 23, 2009 at 5:25 AM, sagar.indianic 
> wrote:
>
>>
>> You dont need to parse manually...
>> First get the "ksoap2-j2se-full-2.1.2.jar".. Search you will get it..
>>
>> then use the following code..
>>
>> private static String SOAP_ACTION = "namespace/FunName";
>>private static String METHOD_NAME = "method_name";
>>private static final String NAMESPACE = "namespace";
>>private static final String URL = "Url of web service";
>>
>> SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
>>request.addProperty("field of web service", variable);
>>
>>SoapSerializationEnvelope envelope = new
>> SoapSerializationEnvelope(SoapEnvelope.VER11);
>>envelope.setOutputSoapObject(request);  // same as
>> envelope.bodyOut = request;
>>
>>HttpTransportSE httpTransport = new HttpTransportSE(URL);
>>httpTransport.call(SOAP_ACTION, envelope); //This sends a soap
>> request and response will be in envelope only.
>>
>> Now check for envelope.bodyIn will give you response from webservice.
>> This will give you SoapObject. Retrieve response strings from the
>> SoapObject method.
>>
>>
>> On Jun 22, 10:17 am, Desu Vinod Kumar  wrote:
>> > Hi  everyone
>> >
>> > i am looking for soap web services in android. my hand also will help to
>> u
>> >
>> > actually i need to connect the PHP soap web services in android
>> >
>> > i need to get the response from the PHP server and should return it in
>> xml
>> > format.
>> >
>> > can any body give me suggestions regarding this
>> >
>> > i have tried some small code but it is unexpectedly quiting
>> >
>> > if any android runtime errors in log cat is any problem
>> >
>> > how can i clear that android runtime errors in log cat what i am getting
>> ...
>> >
>> > Here is my code
>> >
>> > protected void onCreate(Bundle icicle)
>> > {
>> >
>> > super.onCreate(icicle);
>> >
>> > // SOAP Request for the FindServiceSOAP.GetRatingInfo web service
>> > String soapRequestXML = "> encoding=\"utf-8\"?>\n" +
>> > "> http://schemas.xmlsoap.org/soap/envelope/\"; " +
>> > "   xmlns:xsi=\"
>> http://www.w3.org/2001/XMLSchema-instance\"; " +
>> > "   xmlns:xsd=\"
>> http://www.w3.org/2001/XMLSchema\";>\n" +
>> > "http://tempuri.org
>> \">\n"
>> > +
>> > "\n" +
>> > "  \n" +
>> > "";
>> >
>> > String url = "http://www.hasdhs.com/ask.php";;
>> > HttpClient client = new HttpClient();
>> >
>> > PostMethod postMethod = new PostMethod(url);
>> >
>> >  // Construct a SOAP request by hand
>> > StringBuffer request = new StringBuffer();
>> > request.append(soapRequestXML);
>> >
>> > postMethod.setRequestBody(request.toString());
>> > postMethod.setRequestHeader("Content-Type","text/xml;
>> charset=utf-8");
>> > postMethod.setRequestHeader("SOAPAction",
>> >  "\"http://tempuri.org\"";);
>> >
>> > int statusCode = 0;
>> > try {
>> > statusCode = client.executeMethod(postMethod);
>> > } catch (IOException e) {
>> > Log.d("ReverseGeoCoder", e.toString(), e);
>> > }
>> >
>> >  // Parse the SOAP Response
>> > MyContentHandler myContentHandler = new MyContentHandler();
>> > try {
>> > SAXParser parser =
>> SAXParserFactory.newInstance().newSAXParser();
>> >
>> > } catch (Exception e) {
>> > Log.d("ISizzle", e.toString(), e);
>> > }
>> >
>> > // Display the response details.
>> > List list = myContentHandler.getRating();
>> > String[] items = new String[list.size()];
>> > for (int i = 0; i < list.size(); i++)
>> > {
>> > MyContentHandler.GetRating rating = (MyContentHandler.GetRating)
>> > list.get(i);
>> > }
>> >  // Show the data in the list view
>> > ListView listView = (ListView) findViewById(R.id.data);
>> > listView.setAdapter(new ArrayAdapter(this,
>> > android.R.layout.simple_list_item_1,
>> > items));
>> > postMethod.releaseConnection();
>> > }
>> >
>> > }
>> >
>> > thanks in advance
>> >
>> >
>> >
>> > On Sat, Jun 20, 2009 at 8:08 PM, fifi  wrote:
>> >
>> > > I would like to parse a soap envelope using KSOAP2 how can  I start
>> I
>> > > am new and I tried the following code but i couldnot. Also I would
>> > > like to display the parsed elements on the screen?Thanks
>> >
>> > > package parsingsteps;
>> >
>> > > import java.io.*;
>> > > import org.ksoap2.SoapEnve

[android-developers] LinearLayout in LinearLayout

2009-06-25 Thread Mr.No

Hi folks,
ive  a little problem:

Why is the following code causing an exception?
The Code throws a "mBaselineAlignedChildIndex of LinearLayout set to
an index that is out of bounds" exception.


 public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

   LinearLayout l1 = new LinearLayout(this);
LinearLayout l2 = new LinearLayout(this);
l1.addView(l2);
this.setContentView(l1);






}

If l2 is dont added to l1 than it works.
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: list add item error

2009-06-25 Thread Odessa Silverberg

On Jun 24, 2:18 pm, tstanly  wrote:
> hi all,
>
> it's so strange!!
>
> i have a list decleared:
> public static List list1=new ArrayList();
> and use
>
> list1.add(str);
> it is ok!
>
> but use
> list1.add(index,str);
> program will be error

You probably tried to write at an index which doesn't exist's yet.

This could happen, when index is out of bound. For example if index
starts with 1.

public static List list1=new ArrayList();

int index = 1;
list1.add(index, str); // -> Trying to add before the object on
position 1. But as you don't have added any strings before it, there
is no object at position 1 (remember: It's a zero based index, this
means first object has the index 0, second object has the index 1
etc).

public static List list1=new ArrayList();

int index = 0;
list1.add(index, str); // should work



--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to make chat window?

2009-06-25 Thread Gulfam

Hi everybody,

Currently I am working on chat messenger and I want to make chat
window. any one can help me regarding this
any use full link for this.
thanks in advance

Gulfam
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Notification Flag: "FLAG_ONLY_ALERT_ONCE" not working?

2009-06-25 Thread polzifer

"FLAG_ONLY_ALERT_ONCE" sems to be not working.

Does anyone else experience the same Problem?

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Notification Flag: "FLAG_ONLY_ALERT_ONCE" not working?

2009-06-25 Thread polzifer

The "FLAG_ONLY_ALERT_ONCE" seems to be not working for Notifications,
as the notification.sound and the notification.vibrate doesn't play
once, but loop?

Does anyone else experience the same Problem?

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] android crash when volume up

2009-06-25 Thread l hx
who know why?

D/VolumePanel(  652): onVolumeChanged(streamType: 2, flags: 4)
E/AudioFlinger(  635): no more track names availlable
E/AudioTrack(  652): AudioFlinger could not create track, status: -12
E/ToneGenerator(  652): AudioTrack->initCheck failed
E/ToneGenerator(  652): ToneGenerator init failed
W/dalvikvm(  652): threadid=15: thread exiting with uncaught exception
(group=0x4000fe70)
E/AndroidRuntime(  652): Uncaught handler: thread
android.server.ServerThread exiting due to uncaugh
t exception
E/AndroidRuntime(  652): *** EXCEPTION IN SYSTEM PROCESS.  System will
crash.
E/AndroidRuntime(  652): java.ladirect key: 114
ng.RuntimeException: Init failed
E/AndroidRuntime(  652):  at android.media.ToneGenerator.native_setup(Native
Method)
E/AndroidRuntime(  652):  at
android.media.ToneGenerator.(ToneGenerator.java:225)
E/AndroidRuntime(  652):  at
android.view.VolumePanel.getOrCreateToneGenerator(VolumePanel.jav
a:312)
E/AndroidRuntime(  652):  at
android.view.VolumePanel.onPlaySound(VolumePanel.java:276)
E/AndroidRuntime(  652):  at
android.view.VolumePanel.handleMessage(VolumePanel.java:405)
E/AndroidRuntime(  652):  at
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(  652):  at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(  652):  at
com.android.server.ServerThread.run(SystemServer.java:405)
I/Process (  652): Sending signal. PID: 652 SIG: 9
binder: release proc 652, transaction 59755, not freed
I/ActivityThread(  728): Removing dead content provider: settings
I/ActivityThread(  702): Removing dead content provider: settings
I/ActivityThread(  735): Removing dead content provider: settings
I/ActivityThread(  789): Removing dead content provider: settings
I/ActivityThread( 1061): Removing dead content provider: settings
I/ActivityThread(  696): Removing dead content provider: settings
I/ActivityThread(  938): Removing dead content provider: settings
I/ServiceManager(  629): service 'meminfo' died
I/ServiceManager(  629): service 'activity' died
I/ServiceManager(  629): service 'package' died
I/ServiceManager(  629): service 'SurfaceFlinger' died
I/ServiceManager(  629): service 'activity.broadcasts' died
I/ServiceManager(  629): servicedirect key: 114
 'activity.services' died
I/ServiceManager(  629): service 'activity.senders' died
I/ServiceManager(  629): service 'activity.providers' died
I/ServiceManager(  629): service 'permission' died
I/ServiceManager(  629): service 'cpuinfo' died
I/ServiceManager(  629): service 'batteryinfo' died
I/ServiceManager(  629): service 'power' died
I/ServiceManager(  629): service 'telephony.registry' died
I/ServiceManager(  629): service 'battery' died
I/ServiceManager(  629): service 'hardware' died
I/ServiceManager(  629): service 'usagestats' died
I/ServiceManager(  629): service 'alarm' died
I/ServiceManager(  629): service 'content' died
I/ServiceManager(  629): service 'sensor' died
I/ServiceManager(  629): service 'bluetooth' died
I/ServiceManager(  629): service 'bluetooth_a2dp' died
I/ServiceManager(  629): service 'window' died
I/ServiceManager(  629): service 'statusbar' died
I/ServiceManager(  629): service 'clipboard' died
I/ServiceManager(  629): service 'input_method' died
I/ServiceManager(  629): service 'netstat' died
I/ServiceManager(  629): service 'wifi' died
I/ServiceManager(  629): service 'devicestoragemonitor' died
I/ServiceManager(  629): service 'connectivity' died
I/ServiceManager(  629): service 'notification' died
I/ServiceManager(  629): service 'mount' died
I/ServiceManager(  629): service 'location' died
I/ServiceManager(  629): service 'search' died
I/ServiceManager(  629): service 'checkin' died
I/ServiceManager(  629): service 'wallpaper' died
I/ServiceManager(  629): service 'audio' died
I/ServiceManager(  629): service 'appwidget' died
E/installd(  639): eof
E/installd(  639): failed to read size
I/installd(  639): closing connection
W/RILC(  633): EOS.  Closing command socket.
android_power: wakeup (0->0) at 960051635742 (2009-06-25 11:26:15.195194825
UTC)
I/Zygote  (  634): Exit zygote because system server (652) has terminated
init: untracked pid 696 exited
init: untracked pid 735 exited
init: untracked pid 764 exited
I/ServiceManager(  629): service 'simphonebook' died
I/ServiceManager(  629): service 'isms' died
init: untracked pid 702 exited
init: untracked pid 789 exited
init: untracked pid 798 exited
init: untracked pid 938 exited
I/ServiceManager(  629): service 'iphonesubinfo' died
I/ServiceManager(  629): service 'stk' died
I/ServiceManager(  629): service 'phone' died
init: untracked pid 728 exited
init: untracked pid 775 exited
init: untracked pid 1061 exited
direct key: 114
D/AndroidRuntime( 1079):
D/AndroidRuntime( 1079): >> AndroidRuntime START <<

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-develop

[android-developers] Re: help with onchildclick in ExpandableListView

2009-06-25 Thread polzifer

-SOLVED-

longclickenabled="false" was set in XML.

removed that at it's working

On 17 Jun., 12:40, polzifer  wrote:
> i wanted to add the the longclick is starting the contextmenue and
> working.
>
> On 17 Jun., 12:11, polzifer  wrote:
>
> > I need a solution how to get the OnChildClick working for my
> > ExpanableListActivity.
>
> > when starting of this project the Listener was working, but now i get
> > nothing out of it?
>
> > i tried setting the listener through:
>
> > "getExpandableListView().setOnChildClickListener(this);"
> > at several point, but it isn't responding.
>
> > Here's the source code:
>
> > import java.util.ArrayList;
> > import java.util.HashMap;
> > import java.util.List;
>
> > import android.app.Dialog;
> > import android.app.NotificationManager;
> > import android.app.ProgressDialog;
> > import android.content.ComponentName;
> > import android.content.Intent;
> > import android.content.ServiceConnection;
> > import android.net.Uri;
> > import android.os.Bundle;
> > import android.os.Handler;
> > import android.os.IBinder;
> > import android.os.RemoteException;
> > import android.util.Log;
> > import android.view.ContextMenu;
> > import android.view.Menu;
> > import android.view.MenuInflater;
> > import android.view.MenuItem;
> > import android.view.View;
> > import android.widget.ExpandableListView;
> > import
> > android.widget.ExpandableListView.ExpandableListContextMenuInfo;
> > import de.hdmstuttgart.yaxim.IXMPPUiCallback.Stub;
> > import de.hdmstuttgart.yaxim.data.RosterItem;
> > import de.hdmstuttgart.yaxim.dialogs.AddRosterItemDialog;
> > import de.hdmstuttgart.yaxim.dialogs.ChangeStatusDialog;
> > import de.hdmstuttgart.yaxim.dialogs.MoveRosterItemToGroupDialog;
> > import de.hdmstuttgart.yaxim.dialogs.RemoveRosterItemDialog;
> > import de.hdmstuttgart.yaxim.dialogs.RenameRosterGroupDialog;
> > import de.hdmstuttgart.yaxim.dialogs.RenameRosterItemDialog;
> > import de.hdmstuttgart.yaxim.preferences.AccountPrefs;
> > import de.hdmstuttgart.yaxim.preferences.MainPrefs;
> > import de.hdmstuttgart.yaxim.service.XMPPService;
> > import de.hdmstuttgart.yaxim.util.AdapterConstants;
> > import de.hdmstuttgart.yaxim.util.ExpandableRosterAdapter;
>
> > public class MainWindow extends GenericExpandableListActivity {
>
> >         private static final int CONNECT = Menu.FIRST + 1;
> >         private static final int ADD_FRIEND = Menu.FIRST + 2;
> >         private static final int SHOW_HIDE = Menu.FIRST + 3;
> >         private static final int STATUS = Menu.FIRST + 4;
> >         private static final int EXIT = Menu.FIRST + 5;
> >         private static final int SETTINGS = Menu.FIRST + 6;
> >         private static final int ACC_SET = Menu.FIRST + 7;
>
> >         private static final int NOTIFY_ID = 0;
> >         private static final String TAG = "MainWindow";
> >         private static final int DIALOG_CONNECTING = 1;
>
> >         private Intent xmppServiceIntent;
> >         private ServiceConnection xmppServiceConnection;
> >         private NotificationManager notificationMGR;
> >         private XMPPServiceAdapter serviceAdapter;
> >         private Stub uiCallback;
> >         private List>> 
> > rosterEntryList;
> >         private List> rosterGroupList;
> >         private ExpandableRosterAdapter rosterListAdapter;
> >         private Handler mainHandler;
> >         private ProgressDialog progressDialog;
>
> >         @Override
> >         public void onCreate(Bundle savedInstanceState) {
> >                 super.onCreate(savedInstanceState);
> >                 mainHandler = new Handler();
> >                 rosterEntryList = new ArrayList > RosterItem>>>();
> >                 rosterGroupList = new ArrayList>();
>
> >                 registerXMPPService();
> >                 createUICallback();
> >                 setContentView(R.layout.main);
> >                 setNotificationManager();
> >                 registerForContextMenu(getExpandableListView());
> >         }
>
> >         @Override
> >         protected void onPause() {
> >                 super.onPause();
> >                 serviceAdapter.unregisterUICallback(uiCallback);
> >                 unbindXMPPService();
> >         }
>
> >         @Override
> >         protected void onResume() {
> >                 super.onResume();
> >                 notificationMGR.cancel(NOTIFY_ID);
> >                 bindXMPPService();
> >         }
>
> >         private void createRosterIfConnected() {
> >                 if ((serviceAdapter != null)
> >                                 && 
> > (serviceAdapter.isServiceAuthenticated())) {
> >                         createRoster();
> >                 }
> >         }
>
> >         public void updateRoster() {
> >                 if (serviceAdapter.isAuthenticated()
> >                                 && getExpandableListAdapter() != null) {
> >                         rosterEntryList.clear();
> >                         createRosterEntryList();
> >                  

[android-developers] AudioTrack create failure

2009-06-25 Thread l hx
who know why?

E/AudioFlinger(  635): not enough memory for AudioTrack size=262208
D/MemoryDealer(  635):   AudioTrack (0x23340, size=1048576)
D/MemoryDealer(  635): 0: 00023378 | 0x | 0x00040040 | A
D/MemoryDealer(  635): 1: 00023400 | 0x00040040 | 0x00040040 | A
D/MemoryDealer(  635): 2: 00023550 | 0x00080080 | 0x00040040 | A
D/MemoryDealer(  635): 3: 00023448 | 0x000C00C0 | 0x0003FF40 | F
D/MemoryDealer(  635):   size allocated: 786624 (768 KB)
D/AT  (  633): AT< +CRSM: 144, 0,

D/AT  (  633): AT< OK
D/RILJ(  696): [0187]< SIM_IO SimIoResponse sw1:0x90 sw2:0x0
D/RILJ(  696): [0188]> simIO: SIM_IO 0xb2 0x6f3a 84,4,28
D/RIL (  633): onRequest: SIM_IO
D/AT  (  633): AT> AT+CRSM=178,28474,84,4,28 [19:11:50]
direct key: 114
E/AudioTrack(  652): AudioFlinger could not create track, status: -12
E/SoundPool(  652): Error creating AudioTrack

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: LinearLayout in LinearLayout

2009-06-25 Thread Mr.No

Ive fixed it, but its strage, if i create it from xml file it dont
throws an exception.
Within the code i must  turn off the baseline alginment.

On 25 Jun., 15:28, "Mr.No"  wrote:
> Hi folks,
> ive  a little problem:
>
> Why is the following code causing an exception?
> The Code throws a "mBaselineAlignedChildIndex of LinearLayout set to
> an index that is out of bounds" exception.
>
>  public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.main);
>
>        LinearLayout l1 = new LinearLayout(this);
>         LinearLayout l2 = new LinearLayout(this);
>         l1.addView(l2);
>         this.setContentView(l1);
>
>     }
>
> If l2 is dont added to l1 than it works.
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to make chat window?

2009-06-25 Thread Peli

You can try DroidDraw to design the appearance of your chat window:
http://www.droiddraw.org/

Peli
www.openintents.org

On Jun 25, 3:52 pm, Gulfam  wrote:
> Hi everybody,
>
> Currently I am working on chat messenger and I want to make chat
> window. any one can help me regarding this
> any use full link for this.
> thanks in advance
>
> Gulfam
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: LinearLayout in LinearLayout

2009-06-25 Thread Peli

You have not set any layout parameters.
http://developer.android.com/reference/android/widget/LinearLayout.LayoutParams.html

l2.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
LayoutParams.WRAP_CONTENT));


Peli
www.openintents.org

On Jun 25, 3:28 pm, "Mr.No"  wrote:
> Hi folks,
> ive  a little problem:
>
> Why is the following code causing an exception?
> The Code throws a "mBaselineAlignedChildIndex of LinearLayout set to
> an index that is out of bounds" exception.
>
>  public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.main);
>
>        LinearLayout l1 = new LinearLayout(this);
>         LinearLayout l2 = new LinearLayout(this);
>         l1.addView(l2);
>         this.setContentView(l1);
>
>     }
>
> If l2 is dont added to l1 than it works.
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: LinearLayout in LinearLayout

2009-06-25 Thread Mr.No

Ive tried it with layoutparams its the same.
the default layoutarams will be assigned to the layout.

On 25 Jun., 16:26, Peli  wrote:
> You have not set any layout 
> parameters.http://developer.android.com/reference/android/widget/LinearLayout.La...
>
> l2.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
> LayoutParams.WRAP_CONTENT));
>
> Peliwww.openintents.org
>
> On Jun 25, 3:28 pm, "Mr.No"  wrote:
>
> > Hi folks,
> > ive  a little problem:
>
> > Why is the following code causing an exception?
> > The Code throws a "mBaselineAlignedChildIndex of LinearLayout set to
> > an index that is out of bounds" exception.
>
> >  public void onCreate(Bundle savedInstanceState) {
> >         super.onCreate(savedInstanceState);
> >         setContentView(R.layout.main);
>
> >        LinearLayout l1 = new LinearLayout(this);
> >         LinearLayout l2 = new LinearLayout(this);
> >         l1.addView(l2);
> >         this.setContentView(l1);
>
> >     }
>
> > If l2 is dont added to l1 than it works.
>
>
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] job oppurtunities now

2009-06-25 Thread bride

job oppurtunities now
http://unitedapperal.tripod.com/id24.html
click here above link and see more details about
job oppurtunities s, find more reliable things
about job.

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] how can i pass object in intent?

2009-06-25 Thread zeeshan

Hi Dear,

is it possible to pass an object to the intent so i can access that
object in my new 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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to get the media files stored in sdcard?

2009-06-25 Thread Marco Nelissen
Query the media content provider.


On Thu, Jun 25, 2009 at 2:04 AM, manoj  wrote:

>
> Hi,
>
> I want to show the list of media files (.mp3, .mp4...etc) available in
> sdcard.
>
> How can I do this?
>
> Thanks,
> Manoj.
> >
>

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Got media player error in sdk 1.5 r2

2009-06-25 Thread Marco Nelissen
On Thu, Jun 25, 2009 at 4:42 AM, manoj  wrote:

>
> Hi friends,
>
> I have written a small media player app which plays media files stored
> in sdcard.
>
> For audio files I got the following exception:
>
> E/MediaPlayerService(   35): Couldn't open fd for
> content://media/KeypressReturn.ogg/audio/media

(...)

> W/VideoView( 3813): Unable to open content:
> content://media/664771_dl_qcif.mp4/video/media

(...)

> Can any one please help me solve this problem.


Those media content URIs are bogus.
Since you seem to have gotten the names of the files already somehow, just
use setDataSource(String) to specify the paths to the files.

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: android crash when volume up

2009-06-25 Thread Marco Nelissen
Does this happen every time, or only after/while running a certain
application?


On Thu, Jun 25, 2009 at 6:56 AM, l hx  wrote:

> who know why?
>
> D/VolumePanel(  652): onVolumeChanged(streamType: 2, flags: 4)
> E/AudioFlinger(  635): no more track names availlable
> E/AudioTrack(  652): AudioFlinger could not create track, status: -12
> E/ToneGenerator(  652): AudioTrack->initCheck failed
> E/ToneGenerator(  652): ToneGenerator init failed
> W/dalvikvm(  652): threadid=15: thread exiting with uncaught exception
> (group=0x4000fe70)
> E/AndroidRuntime(  652): Uncaught handler: thread
> android.server.ServerThread exiting due to uncaugh
> t exception
> E/AndroidRuntime(  652): *** EXCEPTION IN SYSTEM PROCESS.  System will
> crash.
> E/AndroidRuntime(  652): java.ladirect key: 114
> ng.RuntimeException: Init failed
> E/AndroidRuntime(  652):  at
> android.media.ToneGenerator.native_setup(Native Method)
> E/AndroidRuntime(  652):  at
> android.media.ToneGenerator.(ToneGenerator.java:225)
> E/AndroidRuntime(  652):  at
> android.view.VolumePanel.getOrCreateToneGenerator(VolumePanel.jav
> a:312)
> E/AndroidRuntime(  652):  at
> android.view.VolumePanel.onPlaySound(VolumePanel.java:276)
> E/AndroidRuntime(  652):  at
> android.view.VolumePanel.handleMessage(VolumePanel.java:405)
> E/AndroidRuntime(  652):  at
> android.os.Handler.dispatchMessage(Handler.java:99)
> E/AndroidRuntime(  652):  at android.os.Looper.loop(Looper.java:123)
> E/AndroidRuntime(  652):  at
> com.android.server.ServerThread.run(SystemServer.java:405)
> I/Process (  652): Sending signal. PID: 652 SIG: 9
> binder: release proc 652, transaction 59755, not freed
> I/ActivityThread(  728): Removing dead content provider: settings
> I/ActivityThread(  702): Removing dead content provider: settings
> I/ActivityThread(  735): Removing dead content provider: settings
> I/ActivityThread(  789): Removing dead content provider: settings
> I/ActivityThread( 1061): Removing dead content provider: settings
> I/ActivityThread(  696): Removing dead content provider: settings
> I/ActivityThread(  938): Removing dead content provider: settings
> I/ServiceManager(  629): service 'meminfo' died
> I/ServiceManager(  629): service 'activity' died
> I/ServiceManager(  629): service 'package' died
> I/ServiceManager(  629): service 'SurfaceFlinger' died
> I/ServiceManager(  629): service 'activity.broadcasts' died
> I/ServiceManager(  629): servicedirect key: 114
>  'activity.services' died
> I/ServiceManager(  629): service 'activity.senders' died
> I/ServiceManager(  629): service 'activity.providers' died
> I/ServiceManager(  629): service 'permission' died
> I/ServiceManager(  629): service 'cpuinfo' died
> I/ServiceManager(  629): service 'batteryinfo' died
> I/ServiceManager(  629): service 'power' died
> I/ServiceManager(  629): service 'telephony.registry' died
> I/ServiceManager(  629): service 'battery' died
> I/ServiceManager(  629): service 'hardware' died
> I/ServiceManager(  629): service 'usagestats' died
> I/ServiceManager(  629): service 'alarm' died
> I/ServiceManager(  629): service 'content' died
> I/ServiceManager(  629): service 'sensor' died
> I/ServiceManager(  629): service 'bluetooth' died
> I/ServiceManager(  629): service 'bluetooth_a2dp' died
> I/ServiceManager(  629): service 'window' died
> I/ServiceManager(  629): service 'statusbar' died
> I/ServiceManager(  629): service 'clipboard' died
> I/ServiceManager(  629): service 'input_method' died
> I/ServiceManager(  629): service 'netstat' died
> I/ServiceManager(  629): service 'wifi' died
> I/ServiceManager(  629): service 'devicestoragemonitor' died
> I/ServiceManager(  629): service 'connectivity' died
> I/ServiceManager(  629): service 'notification' died
> I/ServiceManager(  629): service 'mount' died
> I/ServiceManager(  629): service 'location' died
> I/ServiceManager(  629): service 'search' died
> I/ServiceManager(  629): service 'checkin' died
> I/ServiceManager(  629): service 'wallpaper' died
> I/ServiceManager(  629): service 'audio' died
> I/ServiceManager(  629): service 'appwidget' died
> E/installd(  639): eof
> E/installd(  639): failed to read size
> I/installd(  639): closing connection
> W/RILC(  633): EOS.  Closing command socket.
> android_power: wakeup (0->0) at 960051635742 (2009-06-25 11:26:15.195194825
> UTC)
> I/Zygote  (  634): Exit zygote because system server (652) has terminated
> init: untracked pid 696 exited
> init: untracked pid 735 exited
> init: untracked pid 764 exited
> I/ServiceManager(  629): service 'simphonebook' died
> I/ServiceManager(  629): service 'isms' died
> init: untracked pid 702 exited
> init: untracked pid 789 exited
> init: untracked pid 798 exited
> init: untracked pid 938 exited
> I/ServiceManager(  629): service 'iphonesubinfo' died
> I/ServiceManager(  629): service 'stk' died
> I/ServiceManager(  629): service 'phone' died
> init: untracked pid 728 exited
> init: untracked pid 775 exited
> init: untracked pid 1061 exi

[android-developers] Update message - how to check whether app has run before?

2009-06-25 Thread Anna PS

Hi all,

I want to show an update message for a new release - the first time
the user opens the updated version of my app, a pop-up dialog should
appear, saying what's new, with an OK button. After the user has read
it once, it shouldn't appear again.

Is there any inbuilt Android variable I can check to see whether the
user has opened the app before?

Of course, I can define my own boolean in the app settings
("hasUserSeenUpdateMessage") to check each time the app runs - setting
it to false initially, and then true when the user clicks OK.

Just wondered if there was a slightly more sophisticated way of doing
it, or if that's the way to go :)

thanks!
Anna
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how to change a typeFace on a textView from remoteView

2009-06-25 Thread Rotor

How do i render the text to an image on the fly

On Jun 1, 10:55 am, Jeff Sharkey  wrote:
> Because widgets live in other processes, they can only use system
> typefaces, and not additional fonts that might be internal to your
> package.  One way around this would be to render your font onto a
> Bitmap in your process, and then push it across RemoteViews.
>
> j
>
>
>
>
>
> On Sun, May 31, 2009 at 7:48 PM,RTX wrote:
>
> > im trying to show font from my assets on a widget
> > but i dont know how to set the typeface from a remoteView
>
> > here is what i do now right now
>
> > RemoteViews updateViews = new RemoteViews(context.getPackageName(),
> > R.layout.Test);
> > updateViews.setTextViewText(R.id.TextView01, "test");
> > ComponentName thisWidget = new ComponentName(this, RSSWidget.class);
> > AppWidgetManager manager = AppWidgetManager.getInstance(this);
> > manager.updateAppWidget(thisWidget, updateViews);
>
> > how do i change the view font
>
> > thanks in advanced
>
> >RTX
>
> --
> Jeff Sharkey
> jshar...@android.com- 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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to save the logs from the phone to a file with out eclipse

2009-06-25 Thread Rotor

please someone ?

anyone...?

i realy need to colect problems from the field

On Jun 23, 12:45 pm, RTX  wrote:
> i want to let the users send me thelogsfrom the device
> i wonder how do i extract thelogsin to a file on the device ?
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Got media player error in sdk 1.5 r2

2009-06-25 Thread manoj

Actually, I got those uri's using ContentResolver.

On Jun 25, 8:10 pm, Marco Nelissen  wrote:
> On Thu, Jun 25, 2009 at 4:42 AM, manoj  wrote:
>
> > Hi friends,
>
> > I have written a small media player app which plays media files stored
> > in sdcard.
>
> > For audio files I got the following exception:
>
> > E/MediaPlayerService(   35): Couldn't open fd for
> > content://media/KeypressReturn.ogg/audio/media
>
> (...)
>
> > W/VideoView( 3813): Unable to open content:
> > content://media/664771_dl_qcif.mp4/video/media
>
> (...)
>
> > Can any one please help me solve this problem.
>
> Those media content URIs are bogus.
> Since you seem to have gotten the names of the files already somehow, just
> use setDataSource(String) to specify the paths to the files.
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: LinearLayout in LinearLayout

2009-06-25 Thread JdbcDroid

try to use l1.setOrientation(...) just before
l1.addView(...)


On Jun 25, 4:42 pm, "Mr.No"  wrote:
> Ive tried it with layoutparams its the same.
> the default layoutarams will be assigned to the layout.
>
> On 25 Jun., 16:26, Peli  wrote:
>
> > You have not set any layout 
> > parameters.http://developer.android.com/reference/android/widget/LinearLayout.La...
>
> > l2.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
> > LayoutParams.WRAP_CONTENT));
>
> > Peliwww.openintents.org
>
> > On Jun 25, 3:28 pm, "Mr.No"  wrote:
>
> > > Hi folks,
> > > ive  a little problem:
>
> > > Why is the following code causing an exception?
> > > The Code throws a "mBaselineAlignedChildIndex of LinearLayout set to
> > > an index that is out of bounds" exception.
>
> > >  public void onCreate(Bundle savedInstanceState) {
> > >         super.onCreate(savedInstanceState);
> > >         setContentView(R.layout.main);
>
> > >        LinearLayout l1 = new LinearLayout(this);
> > >         LinearLayout l2 = new LinearLayout(this);
> > >         l1.addView(l2);
> > >         this.setContentView(l1);
>
> > >     }
>
> > > If l2 is dont added to l1 than it works.
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Got media player error in sdk 1.5 r2

2009-06-25 Thread Marco Nelissen
How?

On Thu, Jun 25, 2009 at 8:20 AM, manoj  wrote:

>
> Actually, I got those uri's using ContentResolver.
>
> On Jun 25, 8:10 pm, Marco Nelissen  wrote:
> > On Thu, Jun 25, 2009 at 4:42 AM, manoj 
> wrote:
> >
> > > Hi friends,
> >
> > > I have written a small media player app which plays media files stored
> > > in sdcard.
> >
> > > For audio files I got the following exception:
> >
> > > E/MediaPlayerService(   35): Couldn't open fd for
> > > content://media/KeypressReturn.ogg/audio/media
> >
> > (...)
> >
> > > W/VideoView( 3813): Unable to open content:
> > > content://media/664771_dl_qcif.mp4/video/media
> >
> > (...)
> >
> > > Can any one please help me solve this problem.
> >
> > Those media content URIs are bogus.
> > Since you seem to have gotten the names of the files already somehow,
> just
> > use setDataSource(String) to specify the paths to the files.
> >
>

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Accelerometer

2009-06-25 Thread kalyan simhan
hi all...
there seems to be some problem with my accelerometer...
the values of x,y,z fluctuate even when it is stationary.. kept
in one place... why is this.. how can i overcome it..
what is the unit of the value im getting.. im guessing 1 unit = 1g
where g= 9.8m/s2...
kindly help! thanks in advance!!

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Got media player error in sdk 1.5 r2

2009-06-25 Thread manoj

String[] videoProjection = new String[] {
android.provider.MediaStore.Video.Media._ID,
android.provider.MediaStore.Video.Media.TITLE,
android.provider.MediaStore.Video.Media.DATE_ADDED,
android.provider.MediaStore.Video.Media.SIZE,
android.provider.MediaStore.Video.Media.DISPLAY_NAME,
android.provider.MediaStore.Video.Media.MIME_TYPE};

Cursor videocursor1 =  cr.query
(android.provider.MediaStore.Video.Media.EXTERNAL_CONTENT_URI ,
videoProjection, null, null, null);

videocursor1.moveToFirst();

Uri uri = android.provider.MediaStore.Video.Media.getContentUri
(displayName);

Then I set the uri to MediaPlayer as:
/* initialize media player */
mediaPlayer.setDataSource(this,uri);  ---> I got exception here.


Thanks,
manoj.




On Jun 25, 8:22 pm, Marco Nelissen  wrote:
> How?
>
>
>
> On Thu, Jun 25, 2009 at 8:20 AM, manoj  wrote:
>
> > Actually, I got those uri's using ContentResolver.
>
> > On Jun 25, 8:10 pm, Marco Nelissen  wrote:
> > > On Thu, Jun 25, 2009 at 4:42 AM, manoj 
> > wrote:
>
> > > > Hi friends,
>
> > > > I have written a small media player app which plays media files stored
> > > > in sdcard.
>
> > > > For audio files I got the following exception:
>
> > > > E/MediaPlayerService(   35): Couldn't open fd for
> > > > content://media/KeypressReturn.ogg/audio/media
>
> > > (...)
>
> > > > W/VideoView( 3813): Unable to open content:
> > > > content://media/664771_dl_qcif.mp4/video/media
>
> > > (...)
>
> > > > Can any one please help me solve this problem.
>
> > > Those media content URIs are bogus.
> > > Since you seem to have gotten the names of the files already somehow,
> > just
> > > use setDataSource(String) to specify the paths to the files.
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Got media player error in sdk 1.5 r2

2009-06-25 Thread manoj

you can also try it experience the problem.

On Jun 25, 8:27 pm, manoj  wrote:
> String[] videoProjection = new String[] {
>                         android.provider.MediaStore.Video.Media._ID,
>                         android.provider.MediaStore.Video.Media.TITLE,
>                         android.provider.MediaStore.Video.Media.DATE_ADDED,
>                         android.provider.MediaStore.Video.Media.SIZE,
>                         android.provider.MediaStore.Video.Media.DISPLAY_NAME,
>                         android.provider.MediaStore.Video.Media.MIME_TYPE};
>
> Cursor videocursor1 =  cr.query
> (android.provider.MediaStore.Video.Media.EXTERNAL_CONTENT_URI ,
> videoProjection, null, null, null);
>
> videocursor1.moveToFirst();
>
> Uri uri = android.provider.MediaStore.Video.Media.getContentUri
> (displayName);
>
> Then I set the uri to MediaPlayer as:
> /* initialize media player */
> mediaPlayer.setDataSource(this,uri);  ---> I got exception here.
>
> Thanks,
> manoj.
>
> On Jun 25, 8:22 pm, Marco Nelissen  wrote:
>
>
>
> > How?
>
> > On Thu, Jun 25, 2009 at 8:20 AM, manoj  wrote:
>
> > > Actually, I got those uri's using ContentResolver.
>
> > > On Jun 25, 8:10 pm, Marco Nelissen  wrote:
> > > > On Thu, Jun 25, 2009 at 4:42 AM, manoj 
> > > wrote:
>
> > > > > Hi friends,
>
> > > > > I have written a small media player app which plays media files stored
> > > > > in sdcard.
>
> > > > > For audio files I got the following exception:
>
> > > > > E/MediaPlayerService(   35): Couldn't open fd for
> > > > > content://media/KeypressReturn.ogg/audio/media
>
> > > > (...)
>
> > > > > W/VideoView( 3813): Unable to open content:
> > > > > content://media/664771_dl_qcif.mp4/video/media
>
> > > > (...)
>
> > > > > Can any one please help me solve this problem.
>
> > > > Those media content URIs are bogus.
> > > > Since you seem to have gotten the names of the files already somehow,
> > > just
> > > > use setDataSource(String) to specify the paths to the files.
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How To Keep ListView Header From Scrolling With ListView Content

2009-06-25 Thread Mike

Thanks guys.  This does work provided the ListView and the header View
are within the same parent ViewGroup.

I would, however, like to request that the ListView be enhanced with
two new methods:

void addHeaderView(View v, Object data, boolean isSelectable, boolean
scrollsWithContent)
void addFooterView(View v, Object data, boolean isSelectable, boolean
scrollsWithContent)

This would allow a dev to leave management of the headers and footers
entirely with the ListView and provide the ability to have "sticky"
headers and footers that are owned by the ListView.

Regards,

- Mike

On Jun 24, 5:08 pm, Romain Guy  wrote:
> Just put theheaderoutside of theListView:)
>
> On Wed, Jun 24, 2009 at 3:44 PM, Mike wrote:
>
> > There must be a way to do this.   How can you tell aListViewthat has
> > aheaderto not scroll it when the user scrolls the contents?  I want
> > it to stay in a "stuck" position so that the user can always see what
> > column the content applies to.
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Got media player error in sdk 1.5 r2

2009-06-25 Thread Marco Nelissen

On Thu, Jun 25, 2009 at 8:27 AM, manoj wrote:
>
> String[] videoProjection = new String[] {
>                        android.provider.MediaStore.Video.Media._ID,
>                        android.provider.MediaStore.Video.Media.TITLE,
>                        android.provider.MediaStore.Video.Media.DATE_ADDED,
>                        android.provider.MediaStore.Video.Media.SIZE,
>                        android.provider.MediaStore.Video.Media.DISPLAY_NAME,
>                        android.provider.MediaStore.Video.Media.MIME_TYPE};
>
> Cursor videocursor1 =  cr.query
> (android.provider.MediaStore.Video.Media.EXTERNAL_CONTENT_URI ,
> videoProjection, null, null, null);
>
> videocursor1.moveToFirst();
>
> Uri uri = android.provider.MediaStore.Video.Media.getContentUri
> (displayName);

This is wrong. That method takes the volume name as its argument (i.e.
"internal" or "external"), not the display name of a file. You should
start with android.provider.MediaStore.Video.Media.EXTERNAL_CONTENT_URI,
and then append the _ID value. The final content Uri should look
something like "content://media/external/video/media/5"

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How To Keep ListView Header From Scrolling With ListView Content

2009-06-25 Thread Marco Nelissen
On Thu, Jun 25, 2009 at 8:46 AM, Mike wrote:

>
> Thanks guys.  This does work provided the ListView and the header View
> are within the same parent ViewGroup.


Can you give an example of when they would not be?


> I would, however, like to request that the ListView be enhanced with
> two new methods:
>
> void addHeaderView(View v, Object data, boolean isSelectable, boolean
> scrollsWithContent)
> void addFooterView(View v, Object data, boolean isSelectable, boolean
> scrollsWithContent)
>
> This would allow a dev to leave management of the headers and footers
> entirely with the ListView and provide the ability to have "sticky"
> headers and footers that are owned by the ListView.


What's the advantage of this over putting your headerview above the ListView
in a LinearLayout?

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: weird drawing on bitmap to canvas

2009-06-25 Thread Nightwolf

Try using the following:

Rect bounds = new Rect();
mFontPaint.getTextBounds(mText, 0, mText.length(), bounds);
mCanvasBitmap.drawText(mText, 0, bounds.height(), mFontPaint);

On Jun 25, 1:20 am, sleith  wrote:
> thx for reply
> did u mean font's paint?
> i believe it's not that the font is cannot be drawn.
> i think it's the position of the position 0,0 of the bitmap is not
> really 0,0 (it's out of bounds)
> because when i move the position of bitmap (bitmap.translate) with
> some x and y, i could see the text and text background is drawn.
>
> On Jun 24, 11:22 pm, MrChaz  wrote:
>
>
>
> > setTextSize() and setStyle() need to be called on the Paint object I
> > think.
>
> > On Jun 23, 4:37 pm, sleith  wrote:
>
> > > hi, i'm trying to draw bitmap in canvas.
> > > the bitmap is used to draw text and background using canvas (named
> > > canvasBitmap)
> > > but the text or background that are drown to bitmap is not displayed,
> > > as if it's out of bounds.
> > > i have to translate the canvasBitmap at some points to make it draw at
> > > right position.
> > > The problem is i don't know how many pixel i should translate to.
>
> > > here's the code example:
>
> > > public OnDraw(Canvas c){
>
> > >   Paint mBackgroundPaint = new Paint();
> > >   mBackgroundPaint.setColor(Color.RED);
>
> > >   String mText = "Testing";
>
> > >   Paint mFontPaint = new Paint();
> > >   mFontPaint.setColor(Color.WHITE);
>
> > >   //setting rect
> > >   Rect mBackgroundRect = new Rect();
> > >   mFontPaint.getTextBounds(mText, 0, mText.length(), mBackgroundRect);
>
> > >   //the bitmap to be drawn a text and backgroundRect
> > >   Bitmap mBitmap = Bitmap.createBitmap(mBackgroundRect.width(),
> > >                                 mBackgroundRect.height(), 
> > > Bitmap.Config.ARGB_);
> > >   Canvas mCanvasBitmap = new Canvas(mBitmap);
>
> > >   //draw text and background to bitmap
> > >   mCanvasBitmap.drawColor(Color.CYAN);
> > >   mCanvasBitmap.drawRect(mBackgroundRect, mBackgroundPaint);
> > >   mCanvasBitmap.drawText(mText, 0, 0, mFontPaint);
>
> > >   //draw bitmap to canvas
> > >   c.drawBitmap(mBitmap, 0, 0, null);
>
> > > }
>
> > > this will only drawn Cyan color, the text and red background is not
> > > displayed
> > > i have to translate for example :
> > > mCanvasBitmap.translate(0, mBackgroundRect.height())
>
> > > to make it displayed (but not 100% correctly position)
> > > please help >.<
> > > thx
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how can i pass object in intent?

2009-06-25 Thread Balwinder Kaur (T-Mobile)

If you make your object implement the Parcelable Interface, you can
pass it through the Intent Object

using putExtra(String name, Parcelable value). In your new activity
you can access the same object using getParcelableExtra(String name)

For more information pls refer to
http://developer.android.com/reference/android/os/Parcelable.html
http://developer.android.com/reference/android/content/Intent.html

Hope this helps,
Balwinder Kaur
Open Source Development Center
·T· · ·Mobile· stick together

The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

On Jun 25, 8:04 am, zeeshan  wrote:
> Hi Dear,
>
> is it possible to pass an object to the intent so i can access that
> object in my new 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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] click animation

2009-06-25 Thread tstanly

hi all,


when click a image button,
i want to the moment button can give a "light",
like we clicked the list items...
this can tell you,you already click.


how to do 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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Accelerometer

2009-06-25 Thread Delta Foxtrot
2009/6/26 kalyan simhan 

> there seems to be some problem with my accelerometer...
> the values of x,y,z fluctuate even when it is stationary.. kept
> in one place... why is this.. how can i overcome it..
> what is the unit of the value im getting.. im guessing 1 unit = 1g
>

9.8m/s^2 is an approximation, however the accelerometer is being influenced
by forces and noise, the only way to over come it would be to sample the
noise and then try to cancel it out.

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Sensor and Compass APIDemo failing on emulator 1.5

2009-06-25 Thread Mark Murphy

> Is there any update on this?
> I need to build a compuss application but the API Demo doesn't work in
> the emulator.

You will need actual hardware to test sensor-related applications. Partly,
this is due to the emulator bug.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Relative Layout XML attributes have no obvious programmatic equivalent.

2009-06-25 Thread Romain Guy

I don't know of any XML property that cannot be set via the Java API.

2009/6/24 Pavel Lahoda :
>
> Romain,
>
> I have a same question as John ? How can I access some properties
> (such as here in RelativeView, but there are plenty of others) through
> the Java API ? It seems that some properties are only possible to set
> when constructing the view from the XML : this is pretty strange. Can
> you comment on that ? Thanks.
>
> Pavel
>
>
>
> On 17 čvn, 19:03, Romain Guy  wrote:
>> You did not give an id to imageView1, so imageView1.getId() returns an
>> invalid id.
>>
>>
>>
>>
>>
>> On Tue, Jun 16, 2009 at 4:20 PM, JohnJYates  wrote:
>>
>> > If a RelativeLayout must be generated at run time, what are the
>> > equivalent API calls for the attributes set in the XML Layout editor?
>> > Take for example this very simple RelativeLayout that places the
>> > second ImageView to the right of the first ImageView:
>>
>> > 
>> > http://schemas.android.com/apk/res/
>> > android"
>> >   android:layout_width="fill_parent"
>> >   android:layout_height="fill_parent"
>> >   android:orientation="horizontal" android:background="@drawable/
>> > bg_sunrise" android:layout_gravity="center" android:gravity="center">
>>
>> > > > android:layout_width="wrap_content"
>> > android:layout_height="wrap_content" android:src="@drawable/icon">> > ImageView>
>>
>> > > > android:layout_width="wrap_content"
>> > android:layout_height="wrap_content" android:layout_toRightOf="@id/
>> > ImageView01" android:src="@drawable/icon">
>> > 
>>
>> > Of the many, many, many, many variations I tried, I had the most hope
>> > for this one, but it didn't work either:
>>
>> >       protected void onCreate(Bundle savedInstanceState) {
>> >               super.onCreate(savedInstanceState);
>> >               this.requestWindowFeature(Window.FEATURE_NO_TITLE);
>> >               RelativeLayout layout = new RelativeLayout(this);
>> >               layout.setLayoutParams( new
>> >                               ViewGroup.LayoutParams
>> > ( LayoutParams.FILL_PARENT,
>> >                               LayoutParams.FILL_PARENT ) );
>>
>> >           ImageView imageView1 = new ImageView(this);
>> >           imageView1.setImageResource(R.drawable.icon);
>> >           imageView1.setAdjustViewBounds(true); // set the ImageView
>> > bounds
>> > to match the Drawable's dimensions
>>
>> >               RelativeLayout.LayoutParams params1 = new
>> > RelativeLayout.LayoutParams
>> > (LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
>> >               params1.addRule(RelativeLayout.ALIGN_PARENT_TOP);
>> >           layout.addView(imageView1, params1);
>>
>> >           ImageView imageView2 = new ImageView(this);
>> >           imageView2.setImageResource(R.drawable.icon);
>> >           imageView2.setAdjustViewBounds(true); // set the ImageView
>> > bounds
>> > to match the Drawable's dimensions
>>
>> >               RelativeLayout.LayoutParams params2 = new
>> > RelativeLayout.LayoutParams
>> > (LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
>> >               params2.addRule(RelativeLayout.RIGHT_OF,
>> > imageView1.getId());
>> >           layout.addView(imageView2, params2);
>> >           this.setContentView(layout);
>> >       }
>>
>> > Can anyone offer the Java equivalent to the above XML?  Can anyone
>> > explain why there is no attribute, getter/setter, or method for
>> > accessing the properties that can be set in XML?  What is the most
>> > elegant solution for dynamically creating Layouts, Views, and other
>> > Resources on the Android platform when there is no Java programmatic
>> > equivalent?
>>
>> --
>> Romain Guy
>> Android framework engineer
>> romain...@android.com
>>
>> Note: please don't send private questions to me, as I don't have time to
>> provide private support.  All such questions should be posted on public
>> forums, where I and others can see and answer them
>
> >
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] RIL and datacall (CSD)

2009-06-25 Thread Mile Davidovic

Hello
I tried to establish datacall between android phone and other phone,
and I failed.

AFAIK, CSD is recognized using %CPI (call progress infromation),
looking in reference-ril.c:onUnsolicited it seems that RIL handle
following unsolicited commands:
* CTZV: Unsolicited result code for time zone change events
* CRING, RING, NO CARRIES, CCWA: - ringing, call waiting
* CMT: Notification of a directly delievered SMS message
* CREG: network registration
* CDS: sms
* CGEV: gprs

So, current RIL and probably jave framework can not recognize datacall
also framework does not support this.

Is there any plan for extending this functionality?

>From my point of view this functionality is must, what is proper way
for extending SW?

Best regards
Mile

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Using XMLBeans with 1.5 causes Dalvik errors

2009-06-25 Thread Robbie

Hi everyone,
Here's the situation: I have a schema that I put through XMLBeans and
generated the java sources from it. I want to take those java files
and use them in my 1.5 app, but when I try and build the project, I
get this error:

Conversion to Dalvik format failed: Unable to execute dex: null.

I did some looking around and I found that this error comes from the
use of external sources that aren't built against android. The thing
is, the java files haven't been built yet. When the app is built, then
the java files are built.

A few things to note: Yes, I have put the required XMLBeans jars on
the classpath; The generated schema is somewhere in the area of 1400
java files (it's a huge schema); and normally when I try and build the
jar with all those jars in eclipse, eclipse runs out of memory. I did
up the memory in eclipse and things worked better, but I still got
that error. I have read elsewhere that XMLBeans doesn't really work on
1.5, so I'm not sure if that is the problem here, or if this is
something else.

If anyone has any input on this or has run into this before, it would
be greatly appreciated.

Thanks,
Robbie

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] findViewById return null

2009-06-25 Thread sean guo
06-25 07:37:52.745: ERROR/AndroidRuntime(1722): Uncaught handler: thread
main exiting due to uncaught exception

06-25 07:37:52.774: ERROR/AndroidRuntime(1722): java.lang.RuntimeException:
Unable to start activity
ComponentInfo{goodteamstudio.rdc/goodteamstudio.rdc.MainMenu}:
java.lang.NullPointerException

06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2268)

06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2284)

06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)

06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)

06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
android.os.Handler.dispatchMessage(Handler.java:99)

06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
android.os.Looper.loop(Looper.java:123)

06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
android.app.ActivityThread.main(ActivityThread.java:3948)

06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
java.lang.reflect.Method.invokeNative(Native Method)

06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
java.lang.reflect.Method.invoke(Method.java:521)

06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)

06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)

06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
dalvik.system.NativeStart.main(Native Method)

06-25 07:37:52.774: ERROR/AndroidRuntime(1722): Caused by:
java.lang.NullPointerException

06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
goodteamstudio.rdc.MainMenu.onCreate(MainMenu.java:314)

06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)

06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2231)
06-25 07:37:52.774: ERROR/AndroidRuntime(1722): ... 11 more
===
XML

http://schemas.android.com/apk/res/android";
 xmlns:app="http://schemas.android.com/apk/res/goodteamstudio.rdc";
android:layout_width="fill_parent"
android:layout_height="fill_parent">



=

public class CMainRun extends View
{
 public CMainRun(Context contexts,AttributeSet attrs) {
  super(contexts);
  context = contexts;
……
}

===

setContentView(R.layout.main);

gamerun = (CMainRun)findViewById(R.id.mainmenu_id);

==
gamerun = null 

why??

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: findViewById returns null MapView when following maps tutorial

2009-06-25 Thread sean.guo

public class HelloMapView extends MapActivity
{
LinearLayout linearLayout;
MapView mapView;
ZoomControls mZoom;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);

 setContentView(R.layout.main);

linearLayout = (LinearLayout) findViewById
(R.id.zoomview);
mapView = (MapView) findViewById(R.id.mapview);
mZoom = (ZoomControls) mapView.getZoomControls();
linearLayout.addView(mZoom);
   }


@Override
protected boolean isRouteDisplayed() {
return false;
}



}


On Jun 5, 3:24 am, Daniel  wrote:
> I'm following this tutorial 
> here:http://developer.android.com/guide/tutorials/views/hello-mapview.html
>
> and am on point 11
>
> Here's the res/layout/main.xml:
>
> 
> http://schemas.android.com/apk/res/
> android"
>   android:id="@+id/mainlayout"
>   android:orientation="vertical"
>   android:layout_width="fill_parent"
>   android:layout_height="fill_parent" >
>
>        android:id="@+id/mapview"
>     android:layout_width="fill_parent"
>     android:layout_height="fill_parent"
>     android:clickable="true"
>     android:apiKey="hidden"
>   />
>
>        android:id="@+id/zoomview"
>     android:layout_width="wrap_content"
>     android:layout_height="wrap_content"
>     android:layout_alignBottom="@id/mapview"
>     android:layout_centerHorizontal="true"
>   />
>
> 
>
> Here's the code:
>
> package com.example.hellomapview;
>
> import android.app.Activity;
> import android.os.Bundle;
> import com.google.android.maps.*;
> import android.widget.LinearLayout;
> import android.widget.ZoomControls;
>
> public class HelloMapView extends MapActivity
> {
>         LinearLayout linearLayout;
>         MapView mapView;
>         ZoomControls mZoom;
>         /** Called when the activity is first created. */
>         @Override
>         public void onCreate(Bundle savedInstanceState)
>         {
>                 super.onCreate(savedInstanceState);
>                 linearLayout = (LinearLayout)findViewById
> (R.id.zoomview);
>                 mapView = (MapView)findViewById(R.id.mapview);
>                 mZoom = (ZoomControls) mapView.getZoomControls();
>                 linearLayout.addView(mZoom);
>                 setContentView(R.layout.main);
>         }
>
>         @Override
>         protected boolean isRouteDisplayed() {
>                 return false;
>         }
>
> }
>
> Here's the manifest:
>
> 
> http://schemas.android.com/apk/res/android";
>       package="com.example.hellomapview"
>       android:versionCode="1"
>       android:versionName="1.0">
>     
>     
>         
>                            android:label="@string/app_name">
>             
>                 
>                  android:name="android.intent.category.LAUNCHER" />
>             
>         
>     
> 
>
> I've built both this project and the avd I'm loading it to as target
> 3's, meaning they should have maps capability, and have acquired a
> proper Maps apiKey (which I've hidden in this post)
>
> If I back up to step 6 in the tutorial, everything works, which means
> the map loads and I can pan around, but when I try to reference the
> MapView in the xml with this line:
>                 mapView = (MapView)findViewById(R.id.mapview);
>
> the view returned is null.
>
> Here's the ant debug output:
>
> $ ant debug
> Buildfile: build.xml
>     [setup] Project Target: Google APIs
>     [setup] Vendor: Google Inc.
>     [setup] Platform Version: 1.5
>     [setup] API level: 3
>
> dirs:
>      [echo] Creating output directories if needed...
>
> resource-src:
>      [echo] Generating R.java / Manifest.java from the resources...
>
> aidl:
>      [echo] Compiling aidl files into Java classes...
>
> compile:
>     [javac] Compiling 2 source files to /home/doubleagent/Programming/
> ANDROID/HelloMapView/bin/classes
>     [javac] Note: /home/doubleagent/Programming/ANDROID/HelloMapView/
> src/com/example/hellomapview/HelloMapView.java uses or overrides a
> deprecated API.
>     [javac] Note: Recompile with -Xlint:deprecation for details.
>
> dex:
>      [echo] Converting compiled files and external libraries into bin/
> classes.dex...
>
> package-resources:
>      [echo] Packaging resources
>  [aaptexec] Creating full resource package...
>
> debug:
> [apkbuilder] Creating HelloMapView-debug.apk and signing it with a
> debug key...
> [apkbuilder] Using keystore: /home/doubleagent/.android/debug.keystore
>
> BUILD SUCCESSFUL
> Total time: 2 seconds
>
> Any idea what I could be doing wrong?

--~--~-~--~~~---~--~~
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

[android-developers] How to adjust large image automatically in WebView

2009-06-25 Thread treetop

Hi,

By using WebView, I have loaded some html content contains image(large
size, for example, 800*600) and text.
For text, it can perform line wrapping automatically.
But for image, it will enable the horizontal scroll even if
"setHorizontalScrollBarEnabled" is set to false.
Is there any method to force auto-fit in the WebView?
Thanks!

Jet

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Relative Layout XML attributes have no obvious programmatic equivalent.

2009-06-25 Thread Pavel Lahoda

Romain,

I have a same question as John ? How can I access some properties
(such as here in RelativeView, but there are plenty of others) through
the Java API ? It seems that some properties are only possible to set
when constructing the view from the XML : this is pretty strange. Can
you comment on that ? Thanks.

Pavel



On 17 čvn, 19:03, Romain Guy  wrote:
> You did not give an id to imageView1, so imageView1.getId() returns an
> invalid id.
>
>
>
>
>
> On Tue, Jun 16, 2009 at 4:20 PM, JohnJYates  wrote:
>
> > If a RelativeLayout must be generated at run time, what are the
> > equivalent API calls for the attributes set in the XML Layout editor?
> > Take for example this very simple RelativeLayout that places the
> > second ImageView to the right of the first ImageView:
>
> > 
> > http://schemas.android.com/apk/res/
> > android"
> >   android:layout_width="fill_parent"
> >   android:layout_height="fill_parent"
> >   android:orientation="horizontal" android:background="@drawable/
> > bg_sunrise" android:layout_gravity="center" android:gravity="center">
>
> >  > android:layout_width="wrap_content"
> > android:layout_height="wrap_content" android:src="@drawable/icon"> > ImageView>
>
> >  > android:layout_width="wrap_content"
> > android:layout_height="wrap_content" android:layout_toRightOf="@id/
> > ImageView01" android:src="@drawable/icon">
> > 
>
> > Of the many, many, many, many variations I tried, I had the most hope
> > for this one, but it didn't work either:
>
> >       protected void onCreate(Bundle savedInstanceState) {
> >               super.onCreate(savedInstanceState);
> >               this.requestWindowFeature(Window.FEATURE_NO_TITLE);
> >               RelativeLayout layout = new RelativeLayout(this);
> >               layout.setLayoutParams( new
> >                               ViewGroup.LayoutParams
> > ( LayoutParams.FILL_PARENT,
> >                               LayoutParams.FILL_PARENT ) );
>
> >           ImageView imageView1 = new ImageView(this);
> >           imageView1.setImageResource(R.drawable.icon);
> >           imageView1.setAdjustViewBounds(true); // set the ImageView
> > bounds
> > to match the Drawable's dimensions
>
> >               RelativeLayout.LayoutParams params1 = new
> > RelativeLayout.LayoutParams
> > (LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
> >               params1.addRule(RelativeLayout.ALIGN_PARENT_TOP);
> >           layout.addView(imageView1, params1);
>
> >           ImageView imageView2 = new ImageView(this);
> >           imageView2.setImageResource(R.drawable.icon);
> >           imageView2.setAdjustViewBounds(true); // set the ImageView
> > bounds
> > to match the Drawable's dimensions
>
> >               RelativeLayout.LayoutParams params2 = new
> > RelativeLayout.LayoutParams
> > (LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
> >               params2.addRule(RelativeLayout.RIGHT_OF,
> > imageView1.getId());
> >           layout.addView(imageView2, params2);
> >           this.setContentView(layout);
> >       }
>
> > Can anyone offer the Java equivalent to the above XML?  Can anyone
> > explain why there is no attribute, getter/setter, or method for
> > accessing the properties that can be set in XML?  What is the most
> > elegant solution for dynamically creating Layouts, Views, and other
> > Resources on the Android platform when there is no Java programmatic
> > equivalent?
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  All such questions should be posted on public
> forums, where I and others can see and answer them

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to attach a Bitmap when launching ACTION_SEND intend

2009-06-25 Thread hap 497
Hi,

I have this code:
 Intent intent = new Intent();
 intent.setAction(Intent.ACTION_SEND);
 startActivity(intent);

which successfully launches an Messaging App on android.

But how can i attach a Bitmap object when launching the intent?

I have read
http://developer.android.com/reference/android/content/Intent.html,
the closet thing to what i need is EXTRA_STREAM, like this:
intent2.putExtra(Intent.EXTRA_STREAM, _uri);

but my case, I have a reference of Bitmap object, not an URI of an
Bitmap.

Please tell me what can I do to attach a Bitmap object?

Thank you.

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to attach a Bitmap when launching ACTION_SEND intend

2009-06-25 Thread hap497

Hi,

I have this code:
 Intent intent = new Intent();
 intent.setAction(Intent.ACTION_SEND);
 startActivity(intent);

which successfully launch an Messaging App on android.

But how can i attach a Bitmap object when launching the intent?

I have read http://developer.android.com/reference/android/content/Intent.html,
the closet thing to what i need is EXTRA_STREAM, like this:
intent2.putExtra(Intent.EXTRA_STREAM, _uri);

but my case, I have a reference of Bitmap object, not an URI of an
Bitmap.

Please tell me what can I do to attach a Bitmap object?

Thank you.

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] RFCOMM API

2009-06-25 Thread Long

Hi,
   What is the latest status of the RFCOMM support in android?
   I'd like to write an application using RFCOMM to communicate with
PC. I don't want to
rebuild a custom image. I just want my application can run on a HTC
Magic. Is that doable now?

   I heard of there is an application bluex can transfer files with
obex. Obex is based on RFCOMM.
 So that indicates the rfcomm should be OK.

   But i am confused because lots of post on the list say RFCOMM is
not ready yet.


--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] media player that plays bbc radio (streaming)

2009-06-25 Thread sundrani

Does any one know (atleast i don't) of a media player that plays live
bbc radio? I have searched alot on android market but unable to fine
one.

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Efficiently drawing destructable terrain

2009-06-25 Thread Chris Stockton
Hello,

I am faced with a challenge of drawing destructable terrain. My current and
surely naive approach is as follows. Excuse formatting, posting from my g1
and don't have the code with me so the math in the rectf might be wrong be
advised, but it does work, visually; it is just a fps nerf.

Terrain is 720 px wide, terrain square is 4px, worst case total terrain
columns to be drawn is 720/4 = 180, currently I draw a 4x4 bitmap, using the
rectf arg to stretch/transform its height.

[code]
Static public float[] mapUpperBounds = ... 25.0f, 27.0f. 29.0f ... 150.0f,
148.0f ... 1.0f
Static public Rect mSourceRect = new Rect(0, 0, 4, 4);
...
For(int I = 0; I < 180; i++) {
// call my graphics lib, if opengl is avail
// it transforms the request into a matrix
// and draws it in a way identical to canvas
G.drawBitmap(handle, mRectSource, new RectF(
// each float is the upper boundary,
// with a width of 4 I just slowly
// crawl across the map from left to right
I*4,

// we strech the bitmap from the
// upper boundary down to the
// bottom of the map
canvasHeight - mapUpperBounds[I],
canvasWidth - ((I*4)+4),
mapUpperBounds[I]
)
);
}
[/code]

My thoughts :
-180 calls to the graphics lib is crazy furthermore the fact I draw a bitmap
might be bad too.
-Drawline perhaps is cheaper? Haven't tried it yet just came to mind
-when zoomed in closely this becomes more and more trival, I won't render if
it is out of the view point.
-Have the background image contain the 'tiles' and chunk into it as the
terrain explodes? Math might be a little complex, but if all explosions were
circular might be cheaper, question is how expensive is drawCircle (or
whatever method would be appropiate, I could see up to 400+ exploisons per
game)

I'm sure this problem has been solved before, just not by me :P thank you
for your patience.

Regards,

-Chris

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Does anyone know about CTS(Compatibility Test Suit)?

2009-06-25 Thread Zhiguo Cheng

Google said CTS(Compatibility Test Suit) would be released, while I
can not find it until now.
Does anyone know about CTS detail? and I wonder the requirement for
track ball in CTS.
Track ball is necessary for Android device? Can it pass the CTS?
 As we know, HTC G1, G2 consist of a track ball.

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Database

2009-06-25 Thread jiramot

How can i copy my database from res/raw to database path

I try

InputStram in = getResources().openRawResource(R.raw.mydata);
OutputStram out = new FileOutputStram("/data/data/mypackage/databases/
mydata/db");

byte[] buff = new byte[1];
int len;
while( (len = in.read(buff)) > 0){
  out.write(buff);
}
out.close();
int.close();

but i got an IOException with no message
I fond some reason about binary and unicode file but i don't know
about it


How can i do

Thank
Jiramot

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to attach a Bitmap when launching ACTION_SEND intend

2009-06-25 Thread hap497

Hi,

I have this code:
  Intent intent = new Intent();
  intent.setAction(Intent.ACTION_SEND);
  startActivity(intent);

which successfully launch an Messaging App on android.

But how can i attach a Bitmap object when launching the intent?

I have read http://developer.android.com/reference/android/content/Intent.html,
the closet thing to what i need is EXTRA_STREAM, like this:
intent2.putExtra(Intent.EXTRA_STREAM, _uri);

but my case, I have a reference of Bitmap object, not an URI of an
Bitmap.

Please tell me what can I do to attach a Bitmap object?

Thank you.

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Getting ESN number of a Phone

2009-06-25 Thread Ewan Benfield

Hi,

Take a look at android.os.Build.

You can find the code that runs when you look up this information via
Settings > About Phone from the home screen in
com.android.settings.DeviceInfoSettings.java in the Android sources.
(in
packages/apps/Settings/src/com/android/settings)

cheers,
Ewan

On Jun 25, 11:02 am, swapnil  wrote:
> Hello All,
>
> Is it possible to get :
> The ESN Number of a phone
> The Hardware version
> The Software version of a phone.
>
> Is there any way to get this stuff.
>
> Thanks in advance.
>
> Swapnil Dalal.

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Wat to buy???

2009-06-25 Thread Vinay Avasthi

HTC has launched HTC Magic in India yesterday. The price being quoted is 
approx Rs. 30K. You should get it in any store that sells HTC phones.

Sujay Krishna Suresh wrote:
> Hi everyone,
> i live in India and i wanna own an android phone...
> can anyone gimme suggestions as to wat phone i can buy, from where to 
> buy & wat'd be d approx cost???
> 
> -- 
> Regards,
> Sujay
> Laurence J. Peter 
>   - 
> "If two wrongs don't make a right, try three."
> > 



--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Null reference for ImageView

2009-06-25 Thread sean.guo

06-25 07:37:52.745: ERROR/AndroidRuntime(1722): Uncaught handler:
thread main exiting due to uncaught exception
06-25 07:37:52.774: ERROR/AndroidRuntime(1722):
java.lang.RuntimeException: Unable to start activity ComponentInfo
{goodteamstudio.rdc/goodteamstudio.rdc.MainMenu}:
java.lang.NullPointerException
06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2268)
06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
android.os.Handler.dispatchMessage(Handler.java:99)
06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
android.os.Looper.loop(Looper.java:123)
06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
android.app.ActivityThread.main(ActivityThread.java:3948)
06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
java.lang.reflect.Method.invokeNative(Native Method)
06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
java.lang.reflect.Method.invoke(Method.java:521)
06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
dalvik.system.NativeStart.main(Native Method)
06-25 07:37:52.774: ERROR/AndroidRuntime(1722): Caused by:
java.lang.NullPointerException
06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
goodteamstudio.rdc.MainMenu.onCreate(MainMenu.java:314)
06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1123)
06-25 07:37:52.774: ERROR/AndroidRuntime(1722): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2231)
06-25 07:37:52.774: ERROR/AndroidRuntime(1722): ... 11 more

===
XML

http://schemas.android.com/apk/res/android";
 xmlns:app="http://schemas.android.com/apk/res/goodteamstudio.rdc";
android:layout_width="fill_parent"
android:layout_height="fill_parent">



=

public class CMainRun extends View
{
 public CMainRun(Context contexts,AttributeSet attrs) {
  super(contexts);
  context = contexts;
……
}

===

setContentView(R.layout.main);

gamerun = (CMainRun)findViewById(R.id.mainmenu_id);

==
gamerun = null 

why??

On May 18, 6:52 pm, steve_macleod  wrote:
> Hi Dianne - yup knocking up a wee pacman game to learn android
> what gave it away? :)
>
> I was using standard drawables until I hit the issue of animating the
> drawables. Thats when I started looking at ImageViews.
> It was my understanding that I had to use an ImageView to achieve
> frame-by-frame animation. Can it be done without ImageViews? Are there
> any examples that I could look over?
>
> Thanks again
>
> On 18 May, 07:11, Dianne Hackborn  wrote:
>
>
>
> > Like I said in your other thread, you probably don't want to be doing this.
> > If I am to assume from your code-snippet that you have some kind of PacMan
> > game, where the game is implemented in a SurfaceView and the PacMan is an
> > ImageView...  seriously, you don't want to do this.
>
> > The purpose of SurfaceView is to give you a dedicated drawing surface, which
> > you can render to directly, independently of the  normal update mechanism of
> > the view hierarchy.  Using an ImageView to render things completely defeats
> > that purpose.  If you are writing a game, you should be drawing your
> > graphics into the SurfaceView yourself and not using the view hierarchy of
> > managing the element there.
>
> > On Sun, May 17, 2009 at 5:16 PM, steve_macleod
> > wrote:
>
> > > So if I had:
>
> > > http://schemas.android.com/apk/res/
> > > android"
> > >     android:layout_width="fill_parent"
> > >    android:layout_height="fill_parent">
>
> > >  > >      android:id="@+id/pacman_main_view"
> > >      android:layout_width="fill_parent"
> > >      android:layout_height="fill_parent">
> > > 
>
> > >  > >     android:src="@drawable/pac02"
> > >     android:layout_width="20px"
> > >     android:layout_height="20px"/>
> > > 
>
> > > How would I go about getting a reference to the ImageView from
> > > PamManMainView?
>
> > > Thanks again
>
> > > On 18 May, 00:56, Marco Nelissen  wrote:
> > > > If this is indeed the case, then the ImageView isn't actually there,
> > > > so you can't get a reference to it.
>
> > > > On Sun, May 17, 2009 at 4:45 PM, steve_macleod
>
> > > >  wrote:
>
> > > > > Thanks for the reply.
> > > > > Ill look into this. What is the best wa

[android-developers] Re: android 1.5: How do we use the AudioTrack class?

2009-06-25 Thread sasq

I get this to work fine through something like

audioTrack.setPositionNotificationPeriod(bufSize/8);
audioTrack.setPlaybackPositionUpdateListener(this);

...

public void onPeriodicNotification(AudioTrack track) {
int frames = track.getPositionNotificationPeriod();
track.write(samples, 0, frames*2);
}

However - the callback is *Not* called from the thread that created
the AudioTrack (as it says in the documentation) but from the UI
thread, so you have to make sure you never write so you fill the
buffer or the UI thread will block.



On May 5, 10:45 am, blindfold  wrote:
> On May 1, 6:43 pm, Jean-Michel  wrote:> Blindfold,
>
> Yes, with the marker set at 1000 I would now *sometimes* get the
> onMarkerReached() callback, but extremely rarely (maybe once in a
> hundred one-second 8-bit mono PCM sample playbacks on my ADP, which is
> why I had not even noticed it at first). It may depend on parameter
> settings, sample length, CPU load, whatever, but for my use it is
> totally unreliable and useless. At least it proves that my coding was
> not totally wrong, or else the callback would *never* have been
> invoked. :-)
>
> I think we need some feedback from the Android Team about how
> onMarkerReached() is supposed to behave or under what conditions it
> works. Some undocumented statement order that one has to adhere to?
> Timing assumptions? By contrast, MediaPlayer's OnCompletionListener()
> works just fine for me.
>
> 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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Getting ESN number of a Phone

2009-06-25 Thread Ewan Benfield

Hi,

Take a look at android.os.Build.

You can find the code that runs when you look up this information via
Settings > About Phone from the home screen in
com.android.settings.DeviceInfoSettings.java in the Android sources. (in
packages/apps/Settings/src/com/android/settings)

cheers,
Ewan

On Thu, 25 Jun 2009 11:02:29 +0100, swapnil 
wrote:

>
> Hello All,
>
> Is it possible to get :
> The ESN Number of a phone
> The Hardware version
> The Software version of a phone.
>
>
> Is there any way to get this stuff.
>
>
> Thanks in advance.
>
>
> Swapnil Dalal.
>
>
>
> >

-- 
Ewan Benfield

http://www.telesense.co.uk
tel: 0845 643 5691  (+44 845 643 5691)
mob: +44 (0) 77859 26477

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] android cannot parse return value when using xmlrpc

2009-06-25 Thread Arie Meir

Hi guys ,

I'm using pskink's xmlrpc library which is great piece of work.

I am trying to integrate the xmlrpc android client with my server side
written in java.

I've downloaded apache xmlrpc, and their client-server sample works
fine.
When i run their client vs. their server all works fine.

When i use android xmlrpc client, it crashes when
i try to return a complex data type as a return value.

I know it must be something i am doing wrong since python version
works, but cannot find it.

Could you advise what am i missing ?

Android client crashes with this message, perhaps it would ring a
bell.

D/dalvikvm(  706): GC freed 2808 objects / 206016 bytes in 105ms
W/System.err(  706): org.xmlrpc.android.XMLRPCException:
org.xmlpull.v1.XmlPullParserException: unexpected type (position:TEXT
barcel...@1:1
86 in java.io.inputstreamrea...@43450388)
W/System.err(  706):at org.xmlrpc.android.XMLRPCClient.callXMLRPC
(XMLRPCClient.java:380)
W/System.err(  706):at org.xmlrpc.android.XMLRPCClient.call
(XMLRPCClient.java:129)
W/System.err(  706):at android.rpc.rpcc$XMLRPCMethod.run(rpcc.java:
82)
W/System.err(  706): Caused by: org.xmlpull.v1.XmlPullParserException:
unexpected type (position:TEXT barcel...@1:186 in java.io.InputStream
rea...@43450388)
W/System.err(  706):at org.kxml2.io.KXmlParser.exception
(KXmlParser.java:243)
W/System.err(  706):at org.kxml2.io.KXmlParser.nextTag
(KXmlParser.java:1363)
W/System.err(  706):at
org.xmlrpc.android.XMLRPCSerializer.deserialize(XMLRPCSerializer.java:
115)
W/System.err(  706):at
org.xmlrpc.android.XMLRPCSerializer.deserialize(XMLRPCSerializer.java:
184)
W/System.err(  706):at org.xmlrpc.android.XMLRPCClient.callXMLRPC
(XMLRPCClient.java:356)

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Problem when set system clock using SystemClock.setCurrentTimeMillis

2009-06-25 Thread hunter

Hi, all:
   I want to set system clock by SystemClock.setCurrentTimeMillis, but
met following error:

W/SystemClock( 1287): Unable to open alarm driver: Permission denied

   So, can someone tell me which permission I should acquire and how
to acquire it?
   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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Strange TabHost NullPointerException

2009-06-25 Thread Explore Android

I am also facing the same issue, not sure this is framework issue or
application issue.
Any experts have a say on this issue?
(I am working with Android 1.5 SDK)

On Jun 17, 2:26 pm, roland  wrote:
> I just found a strange issue in my application which contains a
> ListView. When one item is clicked, a TabActivity will be launched, i
> got a NullPointerException when i press the item by using trackball.
> But it's fine when i press the item by using finger.
>
> This is the logcat message:
> D/AndroidRuntime(32224): Shutting down VM
> W/dalvikvm(32224): threadid=3: thread exiting with uncaught exception
> (group=0x4000fe70)
> E/AndroidRuntime(32224): Uncaught handler: thread main exiting due to
> uncaught exception
> E/AndroidRuntime(32224): java.lang.NullPointerException
> E/AndroidRuntime(32224):        at android.widget.TabHost.onTouchModeChanged
> (TabHost.java:178)
> E/AndroidRuntime(32224):        at
> android.view.ViewTreeObserver.dispatchOnTouchModeChanged
> (ViewTreeObserver.java:591)
> E/AndroidRuntime(32224):        at
> android.view.ViewRoot.ensureTouchModeLocally(ViewRoot.java:1736)
> E/AndroidRuntime(32224):        at android.view.ViewRoot.performTraversals
> (ViewRoot.java:667)
> E/AndroidRuntime(32224):        at android.view.ViewRoot.handleMessage
> (ViewRoot.java:1482)
> E/AndroidRuntime(32224):        at android.os.Handler.dispatchMessage
> (Handler.java:99)
> E/AndroidRuntime(32224):        at android.os.Looper.loop(Looper.java:123)
> E/AndroidRuntime(32224):        at android.app.ActivityThread.main
> (ActivityThread.java:3948)
> E/AndroidRuntime(32224):        at java.lang.reflect.Method.invokeNative
> (Native Method)
> E/AndroidRuntime(32224):        at java.lang.reflect.Method.invoke
> (Method.java:521)
> E/AndroidRuntime(32224):        at com.android.internal.os.ZygoteInit
> $MethodAndArgsCaller.run(ZygoteInit.java:782)
> E/AndroidRuntime(32224):        at com.android.internal.os.ZygoteInit.main
> (ZygoteInit.java:540)
> E/AndroidRuntime(32224):        at dalvik.system.NativeStart.main(Native
> Method)
>
> Has anyone met this kind of issue? Thanks for sharing your experience.

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Test on a real HTC Magic via the web

2009-06-25 Thread kolel

Hi,

I work for a company called Perfecto Mobile (used to be Nexperience).
See www.perfectomobile.com .
We enable access to real mobile devices via the web. You can install
your app on the device and test it as if you were holding the device
in your hands.
We just introduced the HTC Magic to our service and I thought it might
be interesting for you to check it out if you are having a hard time
getting a Magic. Simply register to the service and get the free trial
to start using it.

Enjoy!

Yossi

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Strange TabHost NullPointerException

2009-06-25 Thread nEx.Software

I get no errors when I use TrackBall click to select a tab in
TabActivity. Tested on my apps targeting each 1.1 SDK and 1.5 SDK.
Now, I am not using separate activities for my tab contents, so that
may make a difference.

On Jun 25, 2:21 am, Explore Android  wrote:
> I am also facing the same issue, not sure this is framework issue or
> application issue.
> Any experts have a say on this issue?
> (I am working with Android 1.5 SDK)
>
> On Jun 17, 2:26 pm, roland  wrote:
>
> > I just found a strange issue in my application which contains a
> > ListView. When one item is clicked, a TabActivity will be launched, i
> > got a NullPointerException when i press the item by using trackball.
> > But it's fine when i press the item by using finger.
>
> > This is the logcat message:
> > D/AndroidRuntime(32224): Shutting down VM
> > W/dalvikvm(32224): threadid=3: thread exiting with uncaught exception
> > (group=0x4000fe70)
> > E/AndroidRuntime(32224): Uncaught handler: thread main exiting due to
> > uncaught exception
> > E/AndroidRuntime(32224): java.lang.NullPointerException
> > E/AndroidRuntime(32224):        at android.widget.TabHost.onTouchModeChanged
> > (TabHost.java:178)
> > E/AndroidRuntime(32224):        at
> > android.view.ViewTreeObserver.dispatchOnTouchModeChanged
> > (ViewTreeObserver.java:591)
> > E/AndroidRuntime(32224):        at
> > android.view.ViewRoot.ensureTouchModeLocally(ViewRoot.java:1736)
> > E/AndroidRuntime(32224):        at android.view.ViewRoot.performTraversals
> > (ViewRoot.java:667)
> > E/AndroidRuntime(32224):        at android.view.ViewRoot.handleMessage
> > (ViewRoot.java:1482)
> > E/AndroidRuntime(32224):        at android.os.Handler.dispatchMessage
> > (Handler.java:99)
> > E/AndroidRuntime(32224):        at android.os.Looper.loop(Looper.java:123)
> > E/AndroidRuntime(32224):        at android.app.ActivityThread.main
> > (ActivityThread.java:3948)
> > E/AndroidRuntime(32224):        at java.lang.reflect.Method.invokeNative
> > (Native Method)
> > E/AndroidRuntime(32224):        at java.lang.reflect.Method.invoke
> > (Method.java:521)
> > E/AndroidRuntime(32224):        at com.android.internal.os.ZygoteInit
> > $MethodAndArgsCaller.run(ZygoteInit.java:782)
> > E/AndroidRuntime(32224):        at com.android.internal.os.ZygoteInit.main
> > (ZygoteInit.java:540)
> > E/AndroidRuntime(32224):        at dalvik.system.NativeStart.main(Native
> > Method)
>
> > Has anyone met this kind of issue? Thanks for sharing your experience.
>
>
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Playing recorded sounds in Android 1.5

2009-06-25 Thread Ericase Jang

Hi, I got the same problem.

Has anyone already solved 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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Accelerometer

2009-06-25 Thread Sundog


> 9.8m/s^2 is an approximation, however the accelerometer is being influenced
> by forces and noise, the only way to over come it would be to sample the
> noise and then try to cancel it out.

Or you can simply integrate the result over time.
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to add some animation on App Widget ?

2009-06-25 Thread Adam

fwiw just adding layoutAnimation tag to components causes them to
correctly animate the first time they are displayed in the widget:



  

which is vaguely pleasing the first time the widget is added -- but
i'd really like to be able to force the animation to play on content /
visibility updates... (to create a kind of slide effect when content
updates so it is less disorientating if the user happens to be looking
at it).

On Jun 2, 3:14 am, Advanceroot  wrote:
> Thank you for you help.  It's hard to migrate our old home application to
> cupcake now because of the animation.
> Does Google want to support this feature in future?
>
> 2009/6/2 Jeff Sharkey 
>
>
>
> > > To fix this, I define a MyViewAnimator (which most likely the
> > ViewAnimator
> > > in android) with @RemoteView tag in my project. Then use MyViewAnimator
> > > class in the layout xml file. But it failed, there was a exception that
> > > class loader cann't find MyViewAnimator class.
>
> > That's working correctly, because could be security issues if another
> > process runs code from your MyViewAnimator class.
>
> > > So the problem is: how to use any animation in the remote view?  Is it
> > > possible adding some visual effects on app widget?
>
> > View-level animation isn't available in the current widget framework.
> > Animations can be expensive, and showing them in widgets would impact
> > the users battery life.
>
> > --
> > Jeff Sharkey
> > jshar...@android.com

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to adjust large image automatically in WebView

2009-06-25 Thread treetop

Hi,

By using WebView, I have loaded some html content contains image(large
size, for example, 800*600) and text.
For text, it can perform line wrapping automatically.
But for image, it will enable the horizontal scroll even if
"setHorizontalScrollBarEnabled" is set to false.
Is there any method to force auto-fit in the WebView?
Thanks!

Jet

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Sensor and Compass APIDemo failing on emulator 1.5

2009-06-25 Thread Declan

Is there any update on this?
I need to build a compuss application but the API Demo doesn't work in
the emulator.

Thanks,
Declan
DeathStick.org

On May 29, 3:12 am, Sahil Arora  wrote:
> Hi,
> What do u mean by a virtual box??
>
> Regards,
> Zhubham.
>
> On Thu, May 28, 2009 at 7:00 PM, Brett Chabot wrote:
>
> > Yes, this is a known bug in the emulator.
>
> > On Wed, May 27, 2009 at 4:40 AM, sarang  wrote:
>
> >> I have been trying to use the OS->sensor and graphics->compass in the
> >> APIDEMO (through emulator 1.5) by directly browsing through the menu
> >> or through instrumentation, I have observed that for “sensor and
> >> compass” test the output is blank screen, but on virtual box the
> >> output is proper. Also note that proper output is seen in case of 1.1
> >> emulator.
>
> >> Is this a bug in emulator 1.5 ?

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: WebView Link with SDK 1.5

2009-06-25 Thread John

The same issue is posted at:

http://osdir.com/ml/AndroidDevelopers/2009-02/msg03441.html

Is it a SDK 1.5 bug??

On Jun 23, 3:59 pm, John  wrote:
> With previous SDK, clicking on the link of telephony number triggers
> the dialer. But it does not work with new SDK, is it right? Thanks!
>
> -John
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problem when set system clock using SystemClock.setCurrentTimeMillis

2009-06-25 Thread Mr.No

Try this permission:
android.permission.WRITE_SETTINGS

On 25 Jun., 13:26, hunter  wrote:
> Hi, all:
>    I want to set system clock by SystemClock.setCurrentTimeMillis, but
> met following error:
>
> W/SystemClock( 1287): Unable to open alarm driver: Permission denied
>
>    So, can someone tell me which permission I should acquire and how
> to acquire it?
>    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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



  1   2   >