[android-developers] Android tracing gives me errors: Please help.
Hello, I created a SD card image and mounted it to the emulator. I could see it mounted on the emulator. Then, in my onCreate method, i made a call to Debug.startMethodTracing(myTrace); When i install the application on the emulator, i get an error as shown below Am i doing something wrong ? --- 10-07 11:36:32.671: ERROR/AndroidRuntime(925): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.client/com.client.MyClientActivity}: *java.lang.RuntimeException: file open failed* 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.app.ActivityThread.access$2100(ActivityThread.java:116) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.os.Handler.dispatchMessage(Handler.java:99) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.os.Looper.loop(Looper.java:123) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.app.ActivityThread.main(ActivityThread.java:4203) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at java.lang.reflect.Method.invokeNative(Native Method) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at java.lang.reflect.Method.invoke(Method.java:521) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at dalvik.system.NativeStart.main(Native Method) *10-07 11:36:32.671: ERROR/AndroidRuntime(925): Caused by: java.lang.RuntimeException: file open failed* 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at dalvik.system.VMDebug.startMethodTracing(Native Method) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at dalvik.system.VMDebug.startMethodTracing(VMDebug.java:155) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.os.Debug.startMethodTracing(Debug.java:378) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.os.Debug.startMethodTracing(Debug.java:326) 10-07 11:36:32.671: ERROR/AndroidRuntime(925):* at com.client.MyClientActivity.onCreate(MyClientActivity.java:131)* 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): ... 11 more --~--~-~--~~~---~--~~ 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 tracing gives me errors: Please help.
If you are using 1.6 you need to ask for the permission to write on the sdcard. On Tue, Oct 6, 2009 at 11:15 PM, Android Development indodr...@gmail.com wrote: Hello, I created a SD card image and mounted it to the emulator. I could see it mounted on the emulator. Then, in my onCreate method, i made a call to Debug.startMethodTracing(myTrace); When i install the application on the emulator, i get an error as shown below Am i doing something wrong ? --- 10-07 11:36:32.671: ERROR/AndroidRuntime(925): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.client/com.client.MyClientActivity}: java.lang.RuntimeException: file open failed 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.app.ActivityThread.access$2100(ActivityThread.java:116) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.os.Handler.dispatchMessage(Handler.java:99) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.os.Looper.loop(Looper.java:123) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.app.ActivityThread.main(ActivityThread.java:4203) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at java.lang.reflect.Method.invokeNative(Native Method) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at java.lang.reflect.Method.invoke(Method.java:521) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at dalvik.system.NativeStart.main(Native Method) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): Caused by: java.lang.RuntimeException: file open failed 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at dalvik.system.VMDebug.startMethodTracing(Native Method) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at dalvik.system.VMDebug.startMethodTracing(VMDebug.java:155) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.os.Debug.startMethodTracing(Debug.java:378) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.os.Debug.startMethodTracing(Debug.java:326) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at com.client.MyClientActivity.onCreate(MyClientActivity.java:131) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): ... 11 more -- 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: Clickable URLs in EditText when using ArrowKeyMovementMethod
Answering my own post. This can be done like: mText.setMovementMethod(new ArrowKeyMovementMethod() { public boolean onTouchEvent(TextView widget, Spannable buffer, MotionEvent event) { // Code in onTouchEvent() of LinkMovementMethod except code to change selection } }); ~Abhilash On Oct 1, 5:37 pm, Abhilash abhilash.ramakris...@gmail.com wrote: *bump* On Sep 25, 9:13 am,Abhilashabhilash.ramakris...@gmail.com wrote: Is there a way to make URLs in a EditText clickable when the MovementMethod is set to ArrowKeyMovementMethod? ~Abhilash --~--~-~--~~~---~--~~ 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: ADC2 First Round Complete?
On Oct 6, 10:33 pm, CraigsRace craig...@gmail.com wrote: Allowing an app update would go against their own rules, so it would be very controversial. Having said that, IMO, I wouldn't mind if they did allow it for broken apps only (which I imagine are only a select few). It could be argued that judging apps on 1.6 is also against their own rules: 7. SUBMISSION PERIOD a. SUBMISSION OF ENTRIES: To qualify for a Prize, an Entry to the Challenge consists of an original application that is written using a version of the Android Software Development Kit (SDK) (available at http://developer.android.com) that validly executes on Android version 1.5. Not being in the US, I haven't been able to test my entry against 1.6 on an actual device yet, so I don't know if this affects me or not. I agree that this situation has been poorly managed, but acknowledge that Google is balancing competing interests here. IMHO, the best situation would be to allow EVERYONE in Round 2 a chance to update their apps. While this would obviously violate the TC, it's the only way that I can see to keep a level playing field. It also ignores the effect that 1.6 may have had on Round 1, but the overlap there was small enough that such effects were probably minimal. Having said that, Google has been largely silent to the other developer concerns about ADC2, so realistically, I don't expect that there will be any acknowledgement of this one either. String --~--~-~--~~~---~--~~ 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 tracing gives me errors: Please help.
Thanks for replying so quickly Romain. I am using 1.6 indeed. uses-permission android:name=android.permission.WRITE_EXTERNAL_STORAGE/ did the trick. Thanks. On Wed, Oct 7, 2009 at 12:12 PM, Romain Guy romain...@google.com wrote: If you are using 1.6 you need to ask for the permission to write on the sdcard. On Tue, Oct 6, 2009 at 11:15 PM, Android Development indodr...@gmail.com wrote: Hello, I created a SD card image and mounted it to the emulator. I could see it mounted on the emulator. Then, in my onCreate method, i made a call to Debug.startMethodTracing(myTrace); When i install the application on the emulator, i get an error as shown below Am i doing something wrong ? --- 10-07 11:36:32.671: ERROR/AndroidRuntime(925): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.client/com.client.MyClientActivity}: java.lang.RuntimeException: file open failed 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.app.ActivityThread.access$2100(ActivityThread.java:116) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.os.Handler.dispatchMessage(Handler.java:99) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.os.Looper.loop(Looper.java:123) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.app.ActivityThread.main(ActivityThread.java:4203) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at java.lang.reflect.Method.invokeNative(Native Method) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at java.lang.reflect.Method.invoke(Method.java:521) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at dalvik.system.NativeStart.main(Native Method) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): Caused by: java.lang.RuntimeException: file open failed 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at dalvik.system.VMDebug.startMethodTracing(Native Method) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at dalvik.system.VMDebug.startMethodTracing(VMDebug.java:155) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.os.Debug.startMethodTracing(Debug.java:378) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.os.Debug.startMethodTracing(Debug.java:326) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at com.client.MyClientActivity.onCreate(MyClientActivity.java:131) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364) 10-07 11:36:32.671: ERROR/AndroidRuntime(925): ... 11 more -- 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: Question about the appwidget update period
Thanks very much! On 10月4日, 下午8时28分, Mark Murphy mmur...@commonsware.com wrote: I need to provider an access for the user to customize theupdate period. But the appwidgetpoviderinfo just can be defined in XML. How to implement this? Step #1: Set updatePeriodMillis to be 0 Step #2: Use AlarmManager (and perhaps PowerManager.WakeLock) to set up your own alarm to invoke your code toupdatethewidget Step #3: There is no step #3 -- 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: What about examples and comments in the Android reference?
Thanks for the tip, Yusuf! The examples are nice! But as I said - they aren't at the right place when one searches the reference. I have not found these examples until you sent me the link. And again, if one finds a specific method in the reference he is left alone with the API reference, and he has to find examples in the Internet on his own. Anyway - I hope that the documentation will improve as the SDK does. I also think there is a way to integrate Android developers, e.g. by using a Wiki-like system. Regards Marc Reichelt || http://www.marcreichelt.de/ On 6 Okt., 23:01, Yusuf Saib (T-Mobile USA) yusuf.s...@t- Mobile.com wrote: Good point. FWIW, many people find the API demos useful:http://developer.android.com/guide/samples/ApiDemos/index.html 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 Oct 6, 6:07 am, Marc Reichelt mcreich...@googlemail.com wrote: Hi there! I have been using the Android documentation for a few days now, and it is quite good and easy to read. Apart from that I noticed that I missed something, and now I found out what it is: Examples and comments. If you look at the PHP documentation (e.g.http://www.php.net/manual/en/function.substr.php for the PHP substr() function) you will see many syntax-highlighted examples and comments by users. Of course there are examples in the Android documentation, especially in the Dev Guide category - they just are not at the right place if one searches the reference for a specific method or functionality. What do you think about this? @Google Team: I believe this means more work, but I also believe that it would improve the reference by all means. Maybe there is a compromise: The offline reference just contains the examples and hyperlinks guide to the online documentation for those who are looking for user comments. Regards Marc Reichelt || http://www.marcreichelt.de/ --~--~-~--~~~---~--~~ 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] linearlayouts in a linearlayout and alignments
hi guys! seems like I'm gona ask a noob question :D I've some horizontal linearLayout in a vertical one: [syntax=xml] LinearLayout android:layout_width = fill_parent android:layout_height = fill_parent android:orientation = vertical android:gravity=center_horizontal LinearLayout android:layout_width =wrap_content android:layout_height = wrap_content android:orientation = horizontal android:baselineAlignedChildIndex=2 TextView android:layout_width=wrap_content android:layout_height = wrap_content android:textColor=#88 android:textSize=15sp android:textStyle=bold android:text=@string/mystring /TextView View android:layout_width=15dp android:layout_height=wrap_content /View TextView android:id=@+id/myid android:layout_width=wrap_content android:layout_height = wrap_content android:textColor=#00 android:textSize=15sp /TextView /LinearLayout LinearLayout android:layout_width =wrap_content android:layout_height = wrap_content android:orientation = horizontal android:baselineAlignedChildIndex=2 TextView android:layout_width=wrap_content android:layout_height = wrap_content android:textColor=#88 android:textSize=15sp android:textStyle=bold android:text=@string/myString2 /TextView View android:layout_width=15dp android:layout_height=wrap_content /View TextView android:id=@+id/myId2 android:layout_width=wrap_content android:layout_height = wrap_content android:textColor=#00 android:textSize=15sp /TextView /LinearLayout /LinearLayout [/syntax] I want to align my horzontal layout according to their second child. (to get a right aligned first column for field names, a void space and a left aligned second column for displayed values) as you can see I tried to use the baselineAlignedChildIndex but I don't know how it works... can anybody help ? if someone can explain how should the baselineAlignedChildIndex argument be used ? --~--~-~--~~~---~--~~ 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: ADC2 Submission List
Hi Tom, i received the following error: There were problems with the following fields: * Url is too long (maximum is 75 characters) But there's no URL input field visible. (Using Firefox 3.5.3 on WinXP) On 6 Okt., 06:12, Tom tkhamil...@gmail.com wrote: Hello, Every since I submitted my app to the ADC I've been curious what other apps were submitted and what the competition looked like. Slogging through a bunch of apps through the judging application didn't seem like the most efficient way to do that. I've created a little app to add, view and comment on ADC2 submissions. I'm hoping this will be useful for all us ADC2 developers that are interested in what else is out there. Check it out and add your app if you haven't already! Also, if you want to chip in and add any apps you judge, that would be great! http://www.cakeforcerberus.com Thanks Tom --~--~-~--~~~---~--~~ 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] What about examples and comments in the Android reference?
Hello out there, I agree, the API samples are helful, however not complete. I struggeling right now with the basic function of a telephone, making calls. There is a Telephony API availiable since the very beginning however this API changes its contents from release to relaese with minimum information what has changed attached. Is there any information or sniplets availiable to help me to get deeper inside? Thanks a lot Konrad -Ursprüngliche Nachricht- Von: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] Im Auftrag von Marc Reichelt Gesendet: Mittwoch, 7. Oktober 2009 10:05 An: Android Developers Betreff: [android-developers] Re: What about examples and comments in the Android reference? Thanks for the tip, Yusuf! The examples are nice! But as I said - they aren't at the right place when one searches the reference. I have not found these examples until you sent me the link. And again, if one finds a specific method in the reference he is left alone with the API reference, and he has to find examples in the Internet on his own. Anyway - I hope that the documentation will improve as the SDK does. I also think there is a way to integrate Android developers, e.g. by using a Wiki-like system. Regards Marc Reichelt || http://www.marcreichelt.de/ On 6 Okt., 23:01, Yusuf Saib (T-Mobile USA) yusuf.s...@t- Mobile.com wrote: Good point. FWIW, many people find the API demos useful:http://developer.android.com/guide/samples/ApiDemos/index.html 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 Oct 6, 6:07 am, Marc Reichelt mcreich...@googlemail.com wrote: Hi there! I have been using the Android documentation for a few days now, and it is quite good and easy to read. Apart from that I noticed that I missed something, and now I found out what it is: Examples and comments. If you look at the PHP documentation (e.g.http://www.php.net/manual/en/function.substr.php for the PHP substr() function) you will see many syntax-highlighted examples and comments by users. Of course there are examples in the Android documentation, especially in the Dev Guide category - they just are not at the right place if one searches the reference for a specific method or functionality. What do you think about this? @Google Team: I believe this means more work, but I also believe that it would improve the reference by all means. Maybe there is a compromise: The offline reference just contains the examples and hyperlinks guide to the online documentation for those who are looking for user comments. Regards Marc Reichelt || http://www.marcreichelt.de/ --~--~-~--~~~---~--~~ 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: allowTaskReparenting=true. Will there be a single instance of the activity ?
hi Dianne, Thanks for the reply. One small clarification. From your response I understand the following: If the activity instance was created in a task for which it did not have an affinity and lets assume that this task goes in the background. After some time when the task comes back in the foreground, the activity would have been pushed out of the task (as it had a different affinity). In this case where will it reside if it has been pushed out ? would it reside in a new task created specifically to hold the pushed out task? or you meant the following: it would still remain in the task in which it was created (even though the affinity is not the same as that of the task). It would be pushed out of the task ONLY if the task goes in the background AND simultaneously there exists another task which has the same affinity as the activity being pushed out of task. Thanks Amitkeerti On Oct 7, 9:08 am, Dianne Hackborn hack...@android.com wrote: On Tue, Oct 6, 2009 at 8:42 PM, Amitkeerti amitkee...@gmail.com wrote: Basically the query is, if I make allowTaskReparenting to true, will there be a single instance of the activity that gets re-parented from one task to another ? No. New instances will be created as needed, like usual. All this does is allow the activity to be pushed out of a task it is in when that task is relaunched and it doesn't have he same affinity. (Or pulled into another task when that task is brought to the foreground and it has an affinity for it.) -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. 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] Drawing
Hi, just a simple question which i'm unsure how would be implemented. Say you have an int called X which is constantly changing, X could equal 0, 10, 20, 30, 40, 50. Now when X is equal to 0, I want it to draw a circle at the bottom if the screen, when X is equal to 50 it will draw an circle at the top of screen, and the other values of X would be the midpoints between. Any ideas how this could be implemented or any examples I can have a look at? --~--~-~--~~~---~--~~ 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] Replace styles and themes
I would like to load new themes/styles from the web to replace the current ones. Is that possible? As far as I can see those resources are read-only. Maybe there is still a chance to achieve this? --~--~-~--~~~---~--~~ 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: Accessing assets that are larger than 1M?
FWIW, I have a 5MB zip file in res/raw which I stream and uncompress to the SD card without any problems (at least on my Hero). --~--~-~--~~~---~--~~ 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] Any API to get the time elapsed since the system was started?
Hi All In one of my Android app, I need to get the number of milliseconds that have elapsed since the system was started.(soemthing like GetTickCount() in Windows mobile) Is there any API for the same ? Or can anybody share the code, if they have done it already? Please do share your thoughts. Thanks for your help, Latha --~--~-~--~~~---~--~~ 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] Switching to Terrainview in Google Maps?
Hi, is it possible to use the terrainview in a MapActivity. The only way for now i could think to use the terrainview is using the browser- based version of Google Maps rather than using the native implementation, but that would not be my prefered way. --~--~-~--~~~---~--~~ 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] window.requestFeature(Window.FEATURE_RIGHT_ICON) does not work correctly
Hi all, i want to keep cancel button in the title bar at the right side, for that I had used following code, window.requestFeature(Window.FEATURE_RIGHT_ICON); window.setFeatureDrawableResource(Window.FEATURE_RIGHT_ICON, R.drawable.cancel); but i am getting the icon at the left side of title bar. Is this a bug or something else is required to accomplish this? Thanks, Asif --~--~-~--~~~---~--~~ 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: Drawing
Hi Sonic, you can use canvas.drawCircle() and can draw in onDraw() method. On Oct 7, 2:15 pm, Sonic nitroussi...@googlemail.com wrote: Hi, just a simple question which i'm unsure how would be implemented. Say you have an int called X which is constantly changing, X could equal 0, 10, 20, 30, 40, 50. Now when X is equal to 0, I want it to draw a circle at the bottom if the screen, when X is equal to 50 it will draw an circle at the top of screen, and the other values of X would be the midpoints between. Any ideas how this could be implemented or any examples I can have a look at? --~--~-~--~~~---~--~~ 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: Any API to get the time elapsed since the system was started?
Hi, You can get the current system time like this: long startTime = ystem.currentTimeMillis(); long elapsedTime = System.currentTimeMillis() - startTime; B On Oct 7, 11:49 am, Latha Shivanna latha...@gmail.com wrote: Hi All In one of my Android app, I need to get the number of milliseconds that have elapsed since the system was started.(soemthing like GetTickCount() in Windows mobile) Is there any API for the same ? Or can anybody share the code, if they have done it already? Please do share your thoughts. Thanks for your help, Latha --~--~-~--~~~---~--~~ 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 use motion events with multiple layouts
Could you be a little more specific on how to register the motionListeners ? I declare the gesture detector at the top of my program like so: private GestureDetector gestureScanner; and just before loading the layout that uses motion detectors i have this: gestureScanner = new GestureDetector(this); I define what must be done for a single tap like so: @Override public boolean onSingleTapUp(MotionEvent e) { // do something } Thanks for the help. On 7 sep, 19:29, Isuru danagalle iisuru@gmail.com wrote: Register your motionListeners with layouts.You can use layout id in the layout.xml file Thanks Isuru On Mon, Sep 7, 2009 at 10:42 PM, andr0id sgrang...@gmail.com wrote: Please help 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] AW: [android-developers]Re: Switching to Terrainview in Google Maps?
You can set: MapView.setSatellite(true) and as alternative MapView.setStreetView(true) Hope this helps Konrad -Ursprüngliche Nachricht- Von: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] Im Auftrag von Harold Gesendet: Mittwoch, 7. Oktober 2009 13:02 An: Android Developers Betreff: [android-developers] Switching to Terrainview in Google Maps? Hi, is it possible to use the terrainview in a MapActivity. The only way for now i could think to use the terrainview is using the browser- based version of Google Maps rather than using the native implementation, but that would not be my prefered way. --~--~-~--~~~---~--~~ 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: Layout issues using Gallery
Rory, I would use a RelativeLayout as the parent for the gallery, then set android:layout_alignParentBottom=true on the gallery. Mike On Oct 6, 2:42 pm, Rory metalhead1...@gmail.com wrote: How would I set up mygalleryto be on thebottomof the screen? Would I need to create a gridLayout and then set thegalleryin thebottom grid or what? I've tried doing android:gravity=bottom with no luck. --~--~-~--~~~---~--~~ 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: Any API to get the time elapsed since the system was started?
How about System.elapsedRealtime() ? That looks like what you're after. String On Oct 7, 11:49 am, Latha Shivanna latha...@gmail.com wrote: Hi All In one of my Android app, I need to get the number of milliseconds that have elapsed since the system was started.(soemthing like GetTickCount() in Windows mobile) Is there any API for the same ? Or can anybody share the code, if they have done it already? Please do share your thoughts. Thanks for your help, Latha --~--~-~--~~~---~--~~ 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 take snapshots (Screen shots) of a web page
Hi Ajeet, A quick question, is it possible to accomplish this task in the background with without harming the present view (that is being displayed) ? and also sometimes I get illigalArgument Exception for the following statement. public void onPageFinished(WebView view, String url) { Picture picture = view.capturePicture(); Bitmap b = Bitmap.createBitmap( picture.getWidth(),picture.getHeight(), Bitmap.Config.ARGB_); .. ... } Error Log: E/AndroidRuntime( 1141): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 1141): java.lang.IllegalArgumentException: width and height must be 0 E/AndroidRuntime( 1141):at android.graphics.Bitmap.nativeCreate(Native Method) E/AndroidRuntime( 1141):at android.graphics.Bitmap.createBitmap(Bitmap.java:483) E/AndroidRuntime( 1141): com.example.myproj.MyActivity$7.onPageFinished(WindRiver_WebHome.java:388) E/AndroidRuntime( 1141):at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:222) E/AndroidRuntime( 1141):at android.os.Handler.dispatchMessage(Handler.java:99) this happens frequently around 50% of deployment of the apk on emulator. Thanks umesh From: AJ ajeet.invinci...@gmail.com To: Android Developers android-developers@googlegroups.com Sent: Mon, 5 October, 2009 6:45:48 PM Subject: [android-developers] Re: How to take snapshots (Screen shots) of a web page This would work fine if you take snapshot of visible portion of webpage. Thanks, AJ On Oct 5, 6:11 pm, AJ ajeet.invinci...@gmail.com wrote: Hi Umesh, check the following link http://groups.google.com/group/android-discuss/browse_thread/thread/c... Thanks, AJ On Oct 5, 4:25 pm, Umesh javaumesh-andr...@yahoo.co.in wrote: Hi all, I want to implement a functionality, wherein I need to take a snapshot (Screen Shot) of a web page opened in android browser, and store that image on sdcard . The image can be either in jpeg or png format. Can some one guide me with a piece of sample code as how to accomplish this. Thanks in advance. Umesh. Yahoo! India has a new look. Take a sneak peekhttp://in.yahoo.com/trynew Now, send attachments up to 25MB with Yahoo! India Mail. Learn how. http://in.overview.mail.yahoo.com/photos --~--~-~--~~~---~--~~ 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: HEADSET_PLUG not registering as receiver
I have solved the problem by starting service on boot which (service) is registering Receiver, but hope that there is a better solution... On 7 Paź, 00:54, skyman krzysiek.bieli...@gmail.com wrote: Hello, I'm trying to create application fixing problem with audio volume in headset/handset (I cannot find such application in the market). There is ACTION_HEADSET_PLUG intent, but I cannot register it in manifest. Registering it using registerReceiver does not make sense becouse app should be run always when headset is plugged/unplugged, app will also have no GUI/Activity. How can I solve this problem? Regs, Skyman --~--~-~--~~~---~--~~ 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 take snapshots (Screen shots) of a web page
Hi Umesh, A quick question, is it possible to accomplish this task in the background with without harming the present view (that is being displayed) ? I think this is possible. You can create one thread and do all thing in background. and also sometimes I get illigalArgument Exception for the following statement. It looks like that the width and height of webview which we are passing to Bitmap is zero. I don't know why unless and until I could not see what exactly you are trying to do. Temporarily you can put the check to avoid exception. ublic void onPageFinished(WebView view, String url) { Picture picture = view.capturePicture(); if(picture.getWidth() 0 picture.getHeight() 0) Bitmap b = Bitmap.createBitmap ( picture.getWidth(),picture.getHeight(), Bitmap.Config.ARGB_); Hope this helps you Thanks, AJ On Oct 7, 5:41 pm, Umesh javaumesh-andr...@yahoo.co.in wrote: Hi Ajeet, A quick question, is it possible to accomplish this task in the background with without harming the present view (that is being displayed) ? and also sometimes I get illigalArgument Exception for the following statement. public void onPageFinished(WebView view, String url) { Picture picture = view.capturePicture(); Bitmap b = Bitmap.createBitmap( picture.getWidth(),picture.getHeight(), Bitmap.Config.ARGB_); .. ... } Error Log: E/AndroidRuntime( 1141): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 1141): java.lang.IllegalArgumentException: width and height must be 0 E/AndroidRuntime( 1141): at android.graphics.Bitmap.nativeCreate(Native Method) E/AndroidRuntime( 1141): at android.graphics.Bitmap.createBitmap(Bitmap.java:483) E/AndroidRuntime( 1141): com.example.myproj.MyActivity$7.onPageFinished(WindRiver_WebHome.java:388) E/AndroidRuntime( 1141): at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:222) E/AndroidRuntime( 1141): at android.os.Handler.dispatchMessage(Handler.java:99) this happens frequently around 50% of deployment of the apk on emulator. Thanks umesh From: AJ ajeet.invinci...@gmail.com To: Android Developers android-developers@googlegroups.com Sent: Mon, 5 October, 2009 6:45:48 PM Subject: [android-developers] Re: How to take snapshots (Screen shots) of a web page This would work fine if you take snapshot of visible portion of webpage. Thanks, AJ On Oct 5, 6:11 pm, AJ ajeet.invinci...@gmail.com wrote: Hi Umesh, check the following link http://groups.google.com/group/android-discuss/browse_thread/thread/c... Thanks, AJ On Oct 5, 4:25 pm, Umesh javaumesh-andr...@yahoo.co.in wrote: Hi all, I want to implement a functionality, wherein I need to take a snapshot (Screen Shot) of a web page opened in android browser, and store that image on sdcard . The image can be either in jpeg or png format. Can some one guide me with a piece of sample code as how to accomplish this. Thanks in advance. Umesh. Yahoo! India has a new look. Take a sneak peekhttp://in.yahoo.com/trynew Now, send attachments up to 25MB with Yahoo! India Mail. Learn how.http://in.overview.mail.yahoo.com/photos --~--~-~--~~~---~--~~ 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] call class
I am displaying a map with Mapview I recall a listview that is in a high class as I do ?? --~--~-~--~~~---~--~~ 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: ADC2 Submission List
+1 On Wed, Oct 7, 2009 at 4:40 AM, Michael push0...@gmail.com wrote: Hi Tom, i received the following error: There were problems with the following fields: * Url is too long (maximum is 75 characters) But there's no URL input field visible. (Using Firefox 3.5.3 on WinXP) On 6 Okt., 06:12, Tom tkhamil...@gmail.com wrote: Hello, Every since I submitted my app to the ADC I've been curious what other apps were submitted and what the competition looked like. Slogging through a bunch of apps through the judging application didn't seem like the most efficient way to do that. I've created a little app to add, view and comment on ADC2 submissions. I'm hoping this will be useful for all us ADC2 developers that are interested in what else is out there. Check it out and add your app if you haven't already! Also, if you want to chip in and add any apps you judge, that would be great! http://www.cakeforcerberus.com Thanks Tom --~--~-~--~~~---~--~~ 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 give recipient number to send mms
I am sending MMS with the existing mms client using this code - 1. Uri mmsUri = Uri.parse(content://media/external/images/media/ 1); 2. Intent intent = new Intent(Intent.ACTION_SEND); intent.putExtra (sms_body, Hi how are you); 3. intent.putExtra(Intent.EXTRA_STREAM, mmsUri); 4. intent.setType(image/png); 5. startActivity(intent); But how can I specify the recipient number to the client? I am not finding any example for this issue. Please 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: Accessing assets that are larger than 1M?
FWIW, I have a 5MB zip file in res/raw which I stream and uncompress to the SD card without any problems (at least on my Hero). Since the APK file is a ZIP file, why put a ZIP in a ZIP? -- 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: suppress/mute all notifications
is it possible to suppress all notification messages e.g. incoming call or sms notification? Thanks No. -- 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: How to take snapshots (Screen shots) of a web page
Hi Ajeet, what I'm doing is, I have created a menu item called take screeshot, so when i create that menuItem, following code will be executed, and the code is exactly same as described by you. Exception is not thrown every time, but I face frequently (as i said 5-6 times of every 10 attempts). private void takeScreenshot() { WebView w = (WebView)findViewById(R.id.screenshot); w.setVisibility(View.VISIBLE); w.setWebViewClient(new WebViewClient() { public void onPageFinished(WebView view, String url) { Picture picture = view.capturePicture(); Bitmap b=Bitmap.createBitmap( picture.getWidth(),picture.getHeight(), Bitmap.Config.ARGB_); Canvas c = new Canvas( b ); picture.draw( c ); FileOutputStream fos = null; try { fos = new FileOutputStream( /sdcard/myimage.png ); if ( fos != null ) { b.compress(Bitmap.CompressFormat.JPEG, 90, fos ); fos.close(); } } catch( Exception e ){} } }); w.loadUrl(http://www.yahoo.com;); } From: AJ ajeet.invinci...@gmail.com To: Android Developers android-developers@googlegroups.com Sent: Wed, 7 October, 2009 6:31:02 PM Subject: [android-developers] Re: How to take snapshots (Screen shots) of a web page Hi Umesh, A quick question, is it possible to accomplish this task in the background with without harming the present view (that is being displayed) ? I think this is possible. You can create one thread and do all thing in background. and also sometimes I get illigalArgument Exception for the following statement. It looks like that the width and height of webview which we are passing to Bitmap is zero. I don't know why unless and until I could not see what exactly you are trying to do. Temporarily you can put the check to avoid exception. ublic void onPageFinished(WebView view, String url) { Picture picture = view.capturePicture(); if(picture.getWidth() 0 picture.getHeight() 0) Bitmap b = Bitmap.createBitmap ( picture.getWidth(),picture.getHeight(), Bitmap.Config.ARGB_); Hope this helps you Thanks, AJ On Oct 7, 5:41 pm, Umesh javaumesh-andr...@yahoo.co.in wrote: Hi Ajeet, A quick question, is it possible to accomplish this task in the background with without harming the present view (that is being displayed) ? and also sometimes I get illigalArgument Exception for the following statement. public void onPageFinished(WebView view, String url) { Picture picture = view.capturePicture(); Bitmap b = Bitmap.createBitmap( picture.getWidth(),picture.getHeight(), Bitmap.Config.ARGB_); .. ... } Error Log: E/AndroidRuntime( 1141): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 1141): java.lang.IllegalArgumentException: width and height must be 0 E/AndroidRuntime( 1141):at android.graphics.Bitmap.nativeCreate(Native Method) E/AndroidRuntime( 1141):at android.graphics.Bitmap.createBitmap(Bitmap.java:483) E/AndroidRuntime( 1141): com.example.myproj.MyActivity$7.onPageFinished(WindRiver_WebHome.java:388) E/AndroidRuntime( 1141):at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:222) E/AndroidRuntime( 1141):at android.os.Handler.dispatchMessage(Handler.java:99) this happens frequently around 50% of deployment of the apk on emulator. Thanks umesh From: AJ ajeet.invinci...@gmail.com To: Android Developers android-developers@googlegroups.com Sent: Mon, 5 October, 2009 6:45:48 PM Subject: [android-developers] Re: How to take snapshots (Screen shots) of a web page This would work fine if you take snapshot of visible portion of webpage. Thanks, AJ On Oct 5, 6:11 pm, AJ ajeet.invinci...@gmail.com wrote: Hi Umesh, check the following link http://groups.google.com/group/android-discuss/browse_thread/thread/c... Thanks, AJ On Oct 5, 4:25 pm, Umesh javaumesh-andr...@yahoo.co.in wrote: Hi all, I want to implement a functionality, wherein I need to take a snapshot (Screen Shot) of a web page opened in android browser, and store that image on sdcard . The image can be either in jpeg or png format. Can some one guide me with a piece of sample code as how to accomplish this. Thanks in advance. Umesh. Yahoo! India has a new look. Take a sneak peekhttp://in.yahoo.com/trynew Now, send attachments up to 25MB with Yahoo! India Mail. Learn how.http://in.overview.mail.yahoo.com/photos Add whatever you
[android-developers] How to bring up the keyboard from WebViewClient
Here's my problem. I have a WebView, but I don't want a new Intent to be launched when the page is redirected, so I wrote my own WebViewClient to handle this. However, I can't figure out how to get the WebViewClient to allow keyboard input. Clicking on an input box does not bring up the soft keyboard, nor can I use the hard keyboard on the G1 to input data. I don't see any methods in WebViewClient that would handle this. Anyone have any 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] application in notification bar
Can I put my application in the top notification bar so that it can be accessed from any application? --~--~-~--~~~---~--~~ 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: You must supply a resource ID for a TextView
Hi, I had the same problem, it was gone when i removed all the @override lines above the functions of the SeparateListAdapter. So try not overriding the functions. It worked for me. Regards, Purvi On Sep 27, 4:00 pm, Wouter wouterg...@gmail.com wrote: But I declare it there and then in my runnable i do adapter.notifyDatasetChanged so the listview knows there is other data to show. This works for other adapters.. Really don't know why this isn't working. My listview with headers works, i can see the first header or sometimes more but when i scroll down it crashes.. When i do for example adapter.addSection(test, new cinemaAdapter(this, cinema)); it makes 1 list with 1 header without crashing.. So there must be a problem with generating my header titles :s On 27 sep, 21:55, Marco Nelissen marc...@android.com wrote: I don't see anything obviously wrong with your code. I do notice that you apparently create the SeparatedListAdapter and then immediately call setListAdapter with it, whereas the SeparatedListAdapter sample code creates the adapter, then adds a bunch of sections to it, and then calls setListAdapter at the end. Could it be that SeparatedListAdapter doesn't work when it is empty? Have you tried postponing your call to setListAdapter until after you've added all the sections? On Sun, Sep 27, 2009 at 12:32 PM, Wouter wouterg...@gmail.com wrote: Ok i will try to explain how i generate my headers with the seperatedlistadapter.. private SeparatedListAdapter adapter; in my setupViews functions: this.adapter = new SeparatedListAdapter(this); setListAdapter(adapter); And then to retrieve my data: �...@suppresswarnings(unchecked) public void retrieveCinema() { try { HashMapString, Object response = (HashMapString, Object) client.call(film.retrieveCinema, sessionKey); Comparator reverse = Collections.reverseOrder(); TreeMapString, Object result = new TreeMapString, Object (reverse); TreeMapString, Object sortedMap = new TreeMapString, Object (response); result.putAll(sortedMap); Iterator it = result.entrySet().iterator(); while (it.hasNext()) { cinema = new ArrayListFilmDetail(); Map.Entry pairs = (Map.Entry)it.next(); Object[] cinemaFilms = (Object[])pairs.getValue(); FilmDetail cinemaMovie = new FilmDetail(); for (int i=0; icinemaFilms.length; i++) { cinemaMovie = new FilmDetail(); Map m = (Map) cinemaFilms[i]; cinemaMovie.setTitle(m.get(title).toString()); cinemaMovie.setYear(m.get(year).toString()); cinemaMovie.setVotes_count(m.get(votes_count).toString()); cinemaMovie.setActors_text(m.get(actors_text).toString()); cinemaMovie.setDirectors_text(m.get (directors_text).toString()); cinemaMovie.setGenres_text(m.get(genres_text).toString()); cinemaMovie.setAverage(m.get(average).toString()); cinemaMovie.setFilmId(m.get(filmId).toString()); cinemaMovie.setDuration(m.get(duration).toString()); cinema.add(cinemaMovie); } String datum = pairs.getKey().toString(); SimpleDateFormat formatter = new SimpleDateFormat(EE d MM); formatter.applyLocalizedPattern(EE d MM); int year= Integer.valueOf(datum.substring(0,4)); int month = Integer.valueOf(datum.substring(5,7)); int day = Integer.valueOf(datum.substring(8,10)); java.util.Date date = new java.util.Date(year, month, day); String parsed = formatter.format(date); System.out.println(parsed); adapter.addSection(parsed, new cinemaAdapter(this, cinema)); } } catch (XMLRPCException e) { e.printStackTrace(); } runOnUiThread(returnRes); } And for every date in my response i do this adapter.addSection(parsed, new cinemaAdapter(this, cinema)); and parsed is the parsed text from date (example 31 october)) And this is how i generate it! It there an error somewhere? On 27 sep, 20:23, Marco Nelissen marc...@android.com wrote: On Sun, Sep 27, 2009 at
[android-developers] Re: How to create button with icon and text
I'm also looking for how to have buttons with text using drawable, instead of XML layout. Can someone point me to some snippet or docs how to do it? thanks -pro On Aug 27, 6:29 am, Mark Murphy mmur...@commonsware.com wrote: I have a additional question then. If I want to specify a background color for thetextonly, how do I do that? You can't. When I set android:background=#FF I get a red color around both thetext and the topDrawable. At most, as another poster suggested, you can have a different color be in the background of the topDrawable. Or,putthetextand image together as a bitmap (on-device or offline) and use ImageButton to display the combination. However, I suspect you do not want to be setting the background of thebuttonvia android:background=#FF in the first place. That should also remove all of your focus and touch highlighting, as they are part of the background. -- 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: You must supply a resource ID for a TextView
Could it be that simple? Gonna try it immediatelly! Thank you! On 7 okt, 16:18, purvi purvi.n...@gmail.com wrote: Hi, I had the same problem, it was gone when i removed all the @override lines above the functions of the SeparateListAdapter. So try not overriding the functions. It worked for me. Regards, Purvi On Sep 27, 4:00 pm, Wouter wouterg...@gmail.com wrote: But I declare it there and then in my runnable i do adapter.notifyDatasetChanged so the listview knows there is other data to show. This works for other adapters.. Really don't know why this isn't working. My listview with headers works, i can see the first header or sometimes more but when i scroll down it crashes.. When i do for example adapter.addSection(test, new cinemaAdapter(this, cinema)); it makes 1 list with 1 header without crashing.. So there must be a problem with generating my header titles :s On 27 sep, 21:55, Marco Nelissen marc...@android.com wrote: I don't see anything obviously wrong with your code. I do notice that you apparently create the SeparatedListAdapter and then immediately call setListAdapter with it, whereas the SeparatedListAdapter sample code creates the adapter, then adds a bunch of sections to it, and then calls setListAdapter at the end. Could it be that SeparatedListAdapter doesn't work when it is empty? Have you tried postponing your call to setListAdapter until after you've added all the sections? On Sun, Sep 27, 2009 at 12:32 PM, Wouter wouterg...@gmail.com wrote: Ok i will try to explain how i generate my headers with the seperatedlistadapter.. private SeparatedListAdapter adapter; in my setupViews functions: this.adapter = new SeparatedListAdapter(this); setListAdapter(adapter); And then to retrieve my data: �...@suppresswarnings(unchecked) public void retrieveCinema() { try { HashMapString, Object response = (HashMapString, Object) client.call(film.retrieveCinema, sessionKey); Comparator reverse = Collections.reverseOrder(); TreeMapString, Object result = new TreeMapString, Object (reverse); TreeMapString, Object sortedMap = new TreeMapString, Object (response); result.putAll(sortedMap); Iterator it = result.entrySet().iterator(); while (it.hasNext()) { cinema = new ArrayListFilmDetail(); Map.Entry pairs = (Map.Entry)it.next(); Object[] cinemaFilms = (Object[])pairs.getValue(); FilmDetail cinemaMovie = new FilmDetail(); for (int i=0; icinemaFilms.length; i++) { cinemaMovie = new FilmDetail(); Map m = (Map) cinemaFilms[i]; cinemaMovie.setTitle(m.get(title).toString()); cinemaMovie.setYear(m.get(year).toString()); cinemaMovie.setVotes_count(m.get(votes_count).toString()); cinemaMovie.setActors_text(m.get(actors_text).toString()); cinemaMovie.setDirectors_text(m.get (directors_text).toString()); cinemaMovie.setGenres_text(m.get(genres_text).toString()); cinemaMovie.setAverage(m.get(average).toString()); cinemaMovie.setFilmId(m.get(filmId).toString()); cinemaMovie.setDuration(m.get(duration).toString()); cinema.add(cinemaMovie); } String datum = pairs.getKey().toString(); SimpleDateFormat formatter = new SimpleDateFormat(EE d MM); formatter.applyLocalizedPattern(EE d MM); int year= Integer.valueOf(datum.substring(0,4)); int month = Integer.valueOf(datum.substring(5,7)); int day = Integer.valueOf(datum.substring(8,10)); java.util.Date date = new java.util.Date(year, month, day); String parsed = formatter.format(date); System.out.println(parsed); adapter.addSection(parsed, new cinemaAdapter(this, cinema)); } } catch (XMLRPCException e) { e.printStackTrace(); } runOnUiThread(returnRes); } And for every date in my response i do this adapter.addSection(parsed, new cinemaAdapter(this,
[android-developers] Re: You must supply a resource ID for a TextView
Hmm all the @overrides were gone.. :s On 7 okt, 16:18, purvi purvi.n...@gmail.com wrote: Hi, I had the same problem, it was gone when i removed all the @override lines above the functions of the SeparateListAdapter. So try not overriding the functions. It worked for me. Regards, Purvi On Sep 27, 4:00 pm, Wouter wouterg...@gmail.com wrote: But I declare it there and then in my runnable i do adapter.notifyDatasetChanged so the listview knows there is other data to show. This works for other adapters.. Really don't know why this isn't working. My listview with headers works, i can see the first header or sometimes more but when i scroll down it crashes.. When i do for example adapter.addSection(test, new cinemaAdapter(this, cinema)); it makes 1 list with 1 header without crashing.. So there must be a problem with generating my header titles :s On 27 sep, 21:55, Marco Nelissen marc...@android.com wrote: I don't see anything obviously wrong with your code. I do notice that you apparently create the SeparatedListAdapter and then immediately call setListAdapter with it, whereas the SeparatedListAdapter sample code creates the adapter, then adds a bunch of sections to it, and then calls setListAdapter at the end. Could it be that SeparatedListAdapter doesn't work when it is empty? Have you tried postponing your call to setListAdapter until after you've added all the sections? On Sun, Sep 27, 2009 at 12:32 PM, Wouter wouterg...@gmail.com wrote: Ok i will try to explain how i generate my headers with the seperatedlistadapter.. private SeparatedListAdapter adapter; in my setupViews functions: this.adapter = new SeparatedListAdapter(this); setListAdapter(adapter); And then to retrieve my data: �...@suppresswarnings(unchecked) public void retrieveCinema() { try { HashMapString, Object response = (HashMapString, Object) client.call(film.retrieveCinema, sessionKey); Comparator reverse = Collections.reverseOrder(); TreeMapString, Object result = new TreeMapString, Object (reverse); TreeMapString, Object sortedMap = new TreeMapString, Object (response); result.putAll(sortedMap); Iterator it = result.entrySet().iterator(); while (it.hasNext()) { cinema = new ArrayListFilmDetail(); Map.Entry pairs = (Map.Entry)it.next(); Object[] cinemaFilms = (Object[])pairs.getValue(); FilmDetail cinemaMovie = new FilmDetail(); for (int i=0; icinemaFilms.length; i++) { cinemaMovie = new FilmDetail(); Map m = (Map) cinemaFilms[i]; cinemaMovie.setTitle(m.get(title).toString()); cinemaMovie.setYear(m.get(year).toString()); cinemaMovie.setVotes_count(m.get(votes_count).toString()); cinemaMovie.setActors_text(m.get(actors_text).toString()); cinemaMovie.setDirectors_text(m.get (directors_text).toString()); cinemaMovie.setGenres_text(m.get(genres_text).toString()); cinemaMovie.setAverage(m.get(average).toString()); cinemaMovie.setFilmId(m.get(filmId).toString()); cinemaMovie.setDuration(m.get(duration).toString()); cinema.add(cinemaMovie); } String datum = pairs.getKey().toString(); SimpleDateFormat formatter = new SimpleDateFormat(EE d MM); formatter.applyLocalizedPattern(EE d MM); int year= Integer.valueOf(datum.substring(0,4)); int month = Integer.valueOf(datum.substring(5,7)); int day = Integer.valueOf(datum.substring(8,10)); java.util.Date date = new java.util.Date(year, month, day); String parsed = formatter.format(date); System.out.println(parsed); adapter.addSection(parsed, new cinemaAdapter(this, cinema)); } } catch (XMLRPCException e) { e.printStackTrace(); } runOnUiThread(returnRes); } And for every date in my response i do this adapter.addSection(parsed, new cinemaAdapter(this, cinema)); and parsed is
[android-developers] Re: Accessing assets that are larger than 1M?
1. Faster version control commit/update 2. Seems to take less time to initialise when debugging 3. I was getting some out of memory issues when storing it uncompressed (sorry, can't remember the exact problem) On Oct 7, 9:40 pm, Mark Murphy mmur...@commonsware.com wrote: FWIW, I have a 5MB zip file in res/raw which I stream and uncompress to the SD card without any problems (at least on my Hero). Since the APK file is a ZIP file, why put a ZIP in a ZIP? -- 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: ADC2 First Round Complete?
Will there be published a list of apps that have continued to round 2 of ADC 2? Will the participants receive any kind of mail or notification? Or will everyone have to wait patiently until november? --~--~-~--~~~---~--~~ 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] Sharing code between activities
I have an app with two activities. Both activities among other functions have to perform the same calculation on data, so each activity include the same code to perform the calculation. Is it possible to only have the similar code in a separate activity and be accessed by the other two activities instead of duplicating the code twice? Thanks Amiz --~--~-~--~~~---~--~~ 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: Sharing code between activities
I have an app with two activities. Both activities among other functions have to perform the same calculation on data, so each activity include the same code to perform the calculation. Is it possible to only have the similar code in a separate activity and be accessed by the other two activities instead of duplicating the code twice? Create a utility class that both activities can use that has your calculation code. Assuming the activities and the utility class are all in the same application, you should encounter no problems. -- 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: Sharing code between activities
use asynctask. On Wed, Oct 7, 2009 at 7:36 AM, amiz aarn...@gmail.com wrote: I have an app with two activities. Both activities among other functions have to perform the same calculation on data, so each activity include the same code to perform the calculation. Is it possible to only have the similar code in a separate activity and be accessed by the other two activities instead of duplicating the code twice? Thanks Amiz --~--~-~--~~~---~--~~ 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: Sharing code between activities
On Oct 7, 3:41 pm, Mark Murphy mmur...@commonsware.com wrote: Create a utility class that both activities can use that has your calculation code. Assuming the activities and the utility class are all in the same application, you should encounter no problems. Mark, do you know a good way to share a utility class between apps? I don't mind the code being duplicated in each app's APK, but I'm looking for a way to not have to maintain separate Java files for the same source. String --~--~-~--~~~---~--~~ 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: Sharing code between activities
Mark, do you know a good way to share a utility class between apps? I don't mind the code being duplicated in each app's APK, but I'm looking for a way to not have to maintain separate Java files for the same source. Package it as a JAR. Here's the recipe I use for the CWAC components (http://github.com/commonsguy): Step #1: Create an empty Android project to hold the reusable code plus some scrap activity for testing or whatever. Step #2: Implement the code and stuff Step #3: Add a jar task to the Ant build script to package up just the real code but not the scrap activity (e.g., filter out stuff in the .demo sub-package) At that point, you have a JAR you can drop into other applications' libs/ directories (and, if you're an Eclipsian, add it to their build paths). By using an Android project to hold your JAR development, you automatically get access to the Android APIs to use from your common code. -- 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] Need to make physical collaboration easier.
IMHO, Android developers need more collaboration from local groups. This is a very important missing link to making Android a success. Some bugs can only be fixed with friends looking over your shoulder. This should be a priority for T-Mobile, Google, us. Does anyone have any thoughts on centralizing this and measuring its success? For starters, when I register for Android-junk can I be slightly coerced into giving my location perhaps? Uploading pictures of us, our dojo? Thoughts? --~--~-~--~~~---~--~~ 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: ADC2 Submission List
+1... but FireBug did the trick ;) On Oct 7, 10:06 am, Jason Van Anden jason.van.an...@gmail.com wrote: +1 On Wed, Oct 7, 2009 at 4:40 AM, Michael push0...@gmail.com wrote: Hi Tom, i received the following error: There were problems with the following fields: * Url is too long (maximum is 75 characters) But there's no URL input field visible. (Using Firefox 3.5.3 on WinXP) On 6 Okt., 06:12, Tom tkhamil...@gmail.com wrote: Hello, Every since I submitted my app to the ADC I've been curious what other apps were submitted and what the competition looked like. Slogging through a bunch of apps through the judging application didn't seem like the most efficient way to do that. I've created a little app to add, view and comment on ADC2 submissions. I'm hoping this will be useful for all us ADC2 developers that are interested in what else is out there. Check it out and add your app if you haven't already! Also, if you want to chip in and add any apps you judge, that would be great! http://www.cakeforcerberus.com Thanks Tom --~--~-~--~~~---~--~~ 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: Publish Apps for Other Developers
Is the limitation that the buyers need to be in the allowed countries? Or is the limitation the country where the publisher resides? On Oct 6, 6:18 pm, polyclefsoftware dja...@gmail.com wrote: In terms of publishing apps for developers that reside in countries where they are not currently able to sell their apps via the Android Market, is this practice okay? Does it violate the Terms and Conditions of being a seller in any way? --~--~-~--~~~---~--~~ 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: Multiple tables in one ContentProvider
Seems like you could do that. Have you tried setting up your content provider so that it does a query against multiple tables? The whole idea of content providers (other than exposing data across apps) is that the app requesting the data doesn't need to know anything about the complexity behind what is being done to collect the data. Your app might request a simple query, but your content provider is doing a lot of complicated work to collect that data. On Oct 6, 11:59 am, Mapara,Harshit Nitinkumar hnmap...@gmail.com wrote: Hi I want to operate on multiple tables. I searched a lot but everywhere I could find is single table with one content provider. How can I use multiple tables under one content provider? How can I get result from two/three tables ? Can I provide my own SQL select query from multiple tables in ContentProvider? Can anybody give me any example or link where I can get idea? Thanks Harshit --~--~-~--~~~---~--~~ 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: Accessing assets that are larger than 1M?
Yeah that would (usually) work because in that case the data you are putting into the .apk is already compressed, so it won't compress what you are putting in, so you don't go through the path of having to uncompress it when opening; instead the raw data can just be found at an offset in a .apk and read directly. Very clever. :) On Wed, Oct 7, 2009 at 3:01 AM, mjc147 westmead...@yahoo.co.uk wrote: FWIW, I have a 5MB zip file in res/raw which I stream and uncompress to the SD card without any problems (at least on my Hero). -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. 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: Replace styles and themes
Sorry, not currently possible. On Wed, Oct 7, 2009 at 2:55 AM, bestpriv...@googlemail.com bestpriv...@googlemail.com wrote: I would like to load new themes/styles from the web to replace the current ones. Is that possible? As far as I can see those resources are read-only. Maybe there is still a chance to achieve this? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. 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: allowTaskReparenting=true. Will there be a single instance of the activity ?
On Wed, Oct 7, 2009 at 2:00 AM, Amitkeerti amitkee...@gmail.com wrote: From your response I understand the following: If the activity instance was created in a task for which it did not have an affinity and lets assume that this task goes in the background. After some time when the task comes back in the foreground, the activity would have been pushed out of the task (as it had a different affinity). In this case where will it reside if it has been pushed out ? would it reside in a new task created specifically to hold the pushed out task? It will just be moved to the task it has an affinity for. If that task doesn't yet exist, a new stub task for it is created that will be fully realized the first time the user launches that task. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. 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: Accessing assets that are larger than 1M?
On Oct 7, 11:27 pm, Dianne Hackborn hack...@android.com wrote: Yeah that would (usually) work because in that case the data you are putting Hmm - why usually? --~--~-~--~~~---~--~~ 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] undefined behavior with getResultExtras and setResultExtras
I've created a test project with three identical classes that extend BroadcastReceiver, named TestReceiverOne TestReceiverTwo TestReceiverThree They each have the following function as their content: @Override public void onReceive(Context context, Intent intent) { Bundle result = getResultExtras(false); if(result == null) { result = new Bundle(); } int numResults = getResultCode(); numResults++; setResultCode(numResults); result.putByteArray(result + (numResults), this.getClass().getName ().getBytes()); setResultExtras(result); } Additionally, my test Activity has the following code: sendOrderedBroadcast(i, null, new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { Bundle results = getResultExtras(true); int numResults = getResultCode(); tv.setText( + numResults + results); for(String key : results.keySet()) tv.setText(tv.getText() + \n + key + : + new String (results.getByteArray(key))); tv.invalidate(); } }, null, 0, null, null); I've added each BroadcastReceiver class to the manifest, have it accept the appropriate action/category, and start debugging. I've set breakpoints in the onReceive method of each test class, and in the anonymous inner BroadcastReceiver in my onCreate. Unfortunately, I seem to be getting somewhat undefined behavior. Sometimes getResultExtras in my second onReceive will return null. Sometimes getResultCode in the second onReceive returns 0. Sometimes I'm 1 off in my third onReceive. Sometimes I get the wrong numResults in onReceive in my activity. What am I missing here? Is there some other behavior I have to specify when using setResult and getResult in an ordered broadcast? --~--~-~--~~~---~--~~ 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: undefined behavior with getResultExtras and setResultExtras
Actually, it looks like when I run this without stopping at breakpoints, I'm getting the correct behavior. Would this possibly be related to timing out after waiting 10 seconds for onReceive to return? On Oct 7, 11:36 am, vol volmar...@gmail.com wrote: I've created a test project with three identical classes that extend BroadcastReceiver, named TestReceiverOne TestReceiverTwo TestReceiverThree They each have the following function as their content: @Override public void onReceive(Context context, Intent intent) { Bundle result = getResultExtras(false); if(result == null) { result = new Bundle(); } int numResults = getResultCode(); numResults++; setResultCode(numResults); result.putByteArray(result + (numResults), this.getClass().getName ().getBytes()); setResultExtras(result); } Additionally, my test Activity has the following code: sendOrderedBroadcast(i, null, new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { Bundle results = getResultExtras(true); int numResults = getResultCode(); tv.setText( + numResults + results); for(String key : results.keySet()) tv.setText(tv.getText() + \n + key + : + new String (results.getByteArray(key))); tv.invalidate(); } }, null, 0, null, null); I've added each BroadcastReceiver class to the manifest, have it accept the appropriate action/category, and start debugging. I've set breakpoints in the onReceive method of each test class, and in the anonymous inner BroadcastReceiver in my onCreate. Unfortunately, I seem to be getting somewhat undefined behavior. Sometimes getResultExtras in my second onReceive will return null. Sometimes getResultCode in the second onReceive returns 0. Sometimes I'm 1 off in my third onReceive. Sometimes I get the wrong numResults in onReceive in my activity. What am I missing here? Is there some other behavior I have to specify when using setResult and getResult in an ordered broadcast? --~--~-~--~~~---~--~~ 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: Any API to get the time elapsed since the system was started?
The android.os.SystemClock class has some time methods that might be of interest. Actually String's reply might have meant that class too. On Oct 7, 6:49 am, Latha Shivanna latha...@gmail.com wrote: Hi All In one of my Android app, I need to get the number of milliseconds that have elapsed since the system was started.(soemthing like GetTickCount() in Windows mobile) Is there any API for the same ? Or can anybody share the code, if they have done it already? Please do share your thoughts. Thanks for your help, Latha --~--~-~--~~~---~--~~ 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: Issue with allocation tracker: I cannot get it to work.
In the AndroidManifest.xml have your marked your application as debuggable? e.g. application ... android:debuggable=true ... -- RichardC On Oct 7, 4:06 pm, Android Development indodr...@gmail.com wrote: Hello, I start my emulator and install my application on it. From the command line i issue the ddms command in the /tools directory. I get the Dalvik debug monitor as a result. Everything is fine till now. However, i am unable to get the allocation tracker to work for me. What happens is that the name of the application does not appear on the DDMS, so i am unable to make the allocation tracker start tracking my application. I am attaching a screenshot below. Process ID 729 belongs to my application (highlighted). As you can see, that under the Name column, I can only see a question mark '?' ! Am i doing something wrong ? Sorry for posting my problems so often on the list !!! $$$ Screenshot -- $$$ [image: allocation_tracker.JPG] allocation_tracker.JPG 182KViewDownload --~--~-~--~~~---~--~~ 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: Publish Apps for Other Developers
The country where the developer resides. If a developer in Russia wanted to publish their paid apps, but could not currently do so, and a developer in the US published it for them for a percentage of the profits, is this kosher? On Oct 7, 10:09 am, Steve steveoliv...@gmail.com wrote: Is the limitation that the buyers need to be in the allowed countries? Or is the limitation the country where the publisher resides? On Oct 6, 6:18 pm, polyclefsoftware dja...@gmail.com wrote: In terms of publishing apps for developers that reside in countries where they are not currently able to sell their apps via the Android Market, is this practice okay? Does it violate the Terms and Conditions of being a seller in any way? --~--~-~--~~~---~--~~ 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: You must supply a resource ID for a TextView
How can i solve this please? --~--~-~--~~~---~--~~ 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: ADC2 First Round Complete?
I recall an email sent during the first challenge where winners of the first round were being given a private SDK and chance to update. It was frustrating because I'd spent a long time working around bugs in the GTalk classes and would have loved to have an updated SDK to work with, even if I wasn't in the winning group. Err, getting to the point, allowing updates at some point in the process isn't unprecedented. That said, I notice the terms and conditions say Android 1.5 or higher in all the judging sections. Maybe moving to 1.6 during the process was expected, but the problems running 1.5 apps on 1.6 weren't. On Oct 7, 3:07 am, String sterling.ud...@googlemail.com wrote: On Oct 6, 10:33 pm, CraigsRace craig...@gmail.com wrote: Allowing an app update would go against their own rules, so it would be very controversial. Having said that, IMO, I wouldn't mind if they did allow it for broken apps only (which I imagine are only a select few). It could be argued that judging apps on 1.6 is also against their own rules: 7. SUBMISSION PERIOD a. SUBMISSION OF ENTRIES: To qualify for a Prize, an Entry to the Challenge consists of an original application that is written using a version of the Android Software Development Kit (SDK) (available athttp://developer.android.com) that validly executes on Android version 1.5. Not being in the US, I haven't been able to test my entry against 1.6 on an actual device yet, so I don't know if this affects me or not. I agree that this situation has been poorly managed, but acknowledge that Google is balancing competing interests here. IMHO, the best situation would be to allow EVERYONE in Round 2 a chance to update their apps. While this would obviously violate the TC, it's the only way that I can see to keep a level playing field. It also ignores the effect that 1.6 may have had on Round 1, but the overlap there was small enough that such effects were probably minimal. Having said that, Google has been largely silent to the other developer concerns about ADC2, so realistically, I don't expect that there will be any acknowledgement of this one either. String --~--~-~--~~~---~--~~ 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 bring up the keyboard from WebViewClient
Anybody have a clue? I must be totally missing something here. I can find anything on google like this and it seems so simple. If I implement my own WebViewClient, even if I don't override any methods, the soft keyboard does not come up when an input box is touched. On Oct 7, 9:02 am, junker37 junke...@gmail.com wrote: Here's my problem. I have a WebView, but I don't want a new Intent to be launched when the page is redirected, so I wrote my own WebViewClient to handle this. However, I can't figure out how to get the WebViewClient to allow keyboard input. Clicking on an input box does not bring up the soft keyboard, nor can I use the hard keyboard on the G1 to input data. I don't see any methods in WebViewClient that would handle this. Anyone have any 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] How to create a Icon on Home screen through Activity
Hi I would like to have icon created on home screen through an activity . All the icons of my activities are on main menu, once i click it my activity will be launched instead i need an icon on home screen which when clicked activity should be launched. Any inputs on above appreciated. Thanks, JB --~--~-~--~~~---~--~~ 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: Mediastore Thumbnails not generated until Gallery app is launched ?
I would also be interested to know if the thumbnail generation can be done programmatically? If it is not possible what do we need to do to generate them and store them in the Thumbnails ContentProvider so that the gallery app does not duplicate thumbnails? On Sep 30, 7:38 am, Nivek kevin.gau...@gmail.com wrote: Is that normal that Images indexed in the MediaStore do not have thumbnails generated until the Gallery app is launched and the user actively navigates to the bucket where the image is stored ? I think it's quite odd as I thought thulbnails generation was part of media indexing. --~--~-~--~~~---~--~~ 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] memory leaks
Any idea how to track memory leaks in android...I am looking for specific answers Thanks Android guy --~--~-~--~~~---~--~~ 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] repo: command not found
Hi, I am using a Ubuntu x64 Linux sagar-laptop 2.6.28-15-generic #52-Ubuntu SMP Wed Sep 9 10:48:52 UTC 2009 x86_64 GNU/Linux I followed the exact steps given here to build the code: http://source.android.com/download When I initialize the repository using this command: repo init -u git://android.git.kernel.org/platform/manifest.git I get an error repo:command not found. When I executed the curl command; curl http://android.git.kernel.org/repo ~/bin/repo It's output was: % Total% Received % Xferd Average Speed TimeTime Time Current Dload Upload Total Spent Left Speed 100 172110 172110 0 8594 0 --:--:-- 0:00:02 --:--:-- 82777 Seems, it downloaded nothing. Then, I did a mkdir mydroid and cd mydroid and run the repo init command and that's where I get the command not found error. Kindly help 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: Android emulator start up error ?
I have added the /tools directory path to my PATH environmental variable, but even then I am facing this kind of problem frequently. Can anyone help me. On Oct 3, 2:38 am, David M. Lee mingxia...@gmail.com wrote: 我也有同樣的問題。有人建議以下的方法。我將自己試試。 You need to follow the instructions here: file:///C:/android-sdk-windows-1.6_r1/docs/sdk/1.6_r1/installing.html The /tools directory of your Android SDK installation must be added to your PATH environment variable as per the instructions. On 9月16日, 下午10時38分, android.vinny vinny.s...@gmail.com wrote: can any body give the solution for this when i am running the project in eclipse .. at finally showing this message ... ActivityManager: - exec '/system/bin/sh'failed:Badaddress(14) - app is installing but not starting first time automatically. TIA --~--~-~--~~~---~--~~ 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] Function inlining
Hi! I recently wrote a quick test that does this: private static int test_f(int i) { return i * 42; } ... int z = 41; for(int i = 0; i 1; ++i) { z = z*42; } // this loop runs in X seconds for(int i = 0; i 1; ++i) { z = test_f(z); }// this loop runs in 10*X seconds The results of this tests imples test_f() is not being inlined, even though it really is a prime candidate for it. It should also be possible to do this inlining at compile time. There seems to be no option to control optimization level of the compiler in Eclipse, perhaps optimizations like these are left to the VM? Does the Dalvik VM do inlining of functions at all, or did it just decide to not inline this specific instance? Curious to hear a response from someone more familiar with the Dalvik VM than me. Best regards, Viktor Linder --~--~-~--~~~---~--~~ 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: Function inlining
There's no inlining at the moment. On Wed, Oct 7, 2009 at 6:31 AM, Viktor Linder linder.vik...@gmail.com wrote: Hi! I recently wrote a quick test that does this: private static int test_f(int i) { return i * 42; } ... int z = 41; for(int i = 0; i 1; ++i) { z = z*42; } // this loop runs in X seconds for(int i = 0; i 1; ++i) { z = test_f(z); } // this loop runs in 10*X seconds The results of this tests imples test_f() is not being inlined, even though it really is a prime candidate for it. It should also be possible to do this inlining at compile time. There seems to be no option to control optimization level of the compiler in Eclipse, perhaps optimizations like these are left to the VM? Does the Dalvik VM do inlining of functions at all, or did it just decide to not inline this specific instance? Curious to hear a response from someone more familiar with the Dalvik VM than me. Best regards, Viktor Linder -- 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: How to create a Icon on Home screen through Activity
I would like to have icon created on home screen through an activity . All the icons of my activities are on main menu, once i click it my activity will be launched instead i need an icon on home screen which when clicked activity should be launched. Any inputs on above appreciated. Users create home screen shortcuts; applications do not. -- 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: Any API to get the time elapsed since the system was started?
On Oct 7, 4:52 pm, Lance Nanek lna...@gmail.com wrote: The android.os.SystemClock class has some time methods that might be of interest. Actually String's reply might have meant that class too. Uh, yes it did, sorry. Forgot the Clock. --~--~-~--~~~---~--~~ 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: Accessing assets that are larger than 1M?
On Wed, Oct 7, 2009 at 8:34 AM, mjc147 westmead...@yahoo.co.uk wrote: On Oct 7, 11:27 pm, Dianne Hackborn hack...@android.com wrote: Yeah that would (usually) work because in that case the data you are putting Hmm - why usually? It's possible during ziping it could fine some way to be compressed. I'm not sure if there is an exception for .zip files to never compress them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. 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] Should we still force our apps to API level 2?
Hi, Google suggests in Dev Guide that we set the API level as low as possible to cover most of the devices. Somebody recently pointed out in my app that when they are typing in the password the automatic suggestions pop up making it annoying. I found out the solution, but is only available in API level 3. I guess my question is, are there devices out there that use Android 1.1 still? Does Google have any stats on this? 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: Disabling Contact Sync
So, I figured out a way to do it. It's a way that things shouldn't be done since it requires using APIs that have @hide. On Oct 6, 4:18 pm, Jonathan Herriott herri...@gmail.com wrote: Hi, So, I'm trying to figure out a way to disable Auto-Sync of the Contacts database because there may be cases where my application tries to write 1000 contacts to the database, which can take a very long time. I've noticed that some apps on the market have the ability to disable syncing, but I can't find a way to do it. I've noticed that there are two permission: android.permission.WRITE_SYNC_SETTINGS android.permission.READ_SYNC_SETTINGS but I can't find where these are used in the Android source code. I don't even need to disable gmail/calendar syncing, I just need to disable Contact syncing. Any help would be great. Thanks, Jonathan Herriott --~--~-~--~~~---~--~~ 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: Where have all the Google employees gone?
My app broke as a result of an Android API throwing a proactive IllegalStateException in 1.6. While this is a good inclusion for those developing on 1.6, it was not documented or required in 1.5, and therefore may break 1.5 apps that have not been able to test in 1.6 and fix app for the new exception. My app has been tested for extended periods of heavy use for 1.5 and never ran into the problem Google is trying to safeguard against (my app runs great in 1.5 which is what we were told to develop for) so I was unaware that the issue existed until I was able to test it on 1.6. From the stats my app collects, I am able to see that ~30% of the contest graders were running 1.6 over the period of the contest So I can probably assume that 30% of my end grade was lost. :( Shelby On Oct 6, 7:57 pm, niko20 nikolatesl...@yahoo.com wrote: What API's are you guys using that just going from 1.5 to 1.6 broke stuff? I would think 1.6 would have been properly back-compatible... On Oct 6, 8:58 pm, bellapariah bellapar...@gmail.com wrote: What is Google just dropped the 25 lowest scores for every app? There would still be 75 reviews to give a relatively accurate average rating and it would be fair for all without giving benefits to select developers. On Oct 6, 6:48 pm, bellapariah bellapar...@gmail.com wrote: Thread for developers to discuss problems with 1.6 update and effects on ADC2. If you see other forums or articles on the issue or if you are one of the unlucky developers affected by the the untimely 1.6 update, please post is here! Releasing 1.6 in the middle of a contest is unacceptable. According to the official terms and conditions: a. SUBMISSION OF ENTRIES: To qualify for a Prize, an Entry to the Challenge consists of an original application that is written using a version of the Android Software Development Kit (SDK) (available athttp://developer.android.com) that validly executes on Android version 1.5. The SDK contains instructions, documentation, and all necessary tools to enable a Participant to build an Android application. My App as well as many other ADC2 apps worked fine on 1.5 but started force closing after the 1.6 update. Programmers were told to develop an application for 1.5, not 1.6, and were not given the tools or opportunity to test our apps with 1.6. In my case, I have had 95 people test my app for Round 1 judging, but 27 of those were force closes due to the 1.6 update. This is because of an issue with a Google API that was updated with 1.6. Here are links to other people discussing the 1.6 issue: http://groups.google.com/group/android-discuss/browse_thread/thread/7... http://groups.google.com/group/android-discuss/browse_thread/thread/a... http://groups.google.com/group/android-discuss/browse_thread/thread/5... http://groups.google.com/group/android-developers/browse_thread/threa... http://www.google.com/support/forum/p/Android+Market/thread?tid=5d754... http://androidandme.com/2009/10/news/did-google-fumble-the-android-1-... http://polyclefsoftware.blogspot.com/ One suggestion would be to remove the last 25% of reviews of every app in the contest (the ones most likely to have been affected by 1.6 upgrades) to reduce the negative effects of the 1.6 release. How many others were affected? Any solutions to fix the problem? Shelby --~--~-~--~~~---~--~~ 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: Should we still force our apps to API level 2?
You can use any newer XML attributes, and they will be ignored on older platforms. So just specify the appropriate attributes for the IME for the newer platforms. (And also be sure to still test on older platforms, if you really care about that. I don't think there are a ton of devices left at API 2, though I really don't know any numbers, so it may not be that important.) On Wed, Oct 7, 2009 at 9:51 AM, gnugu rho...@gmail.com wrote: Hi, Google suggests in Dev Guide that we set the API level as low as possible to cover most of the devices. Somebody recently pointed out in my app that when they are typing in the password the automatic suggestions pop up making it annoying. I found out the solution, but is only available in API level 3. I guess my question is, are there devices out there that use Android 1.1 still? Does Google have any stats on this? Thanks. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. 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: Should we still force our apps to API level 2?
Just to make sure I understand you correctly, I set the API level in my app to 3 and when someone runs it on Android 1.1 the attributes will be ignored? Because when I keep the API level at 2 the project will not compile (at least in Eclipse). On Oct 7, 10:13 am, Dianne Hackborn hack...@android.com wrote: You can use any newer XML attributes, and they will be ignored on older platforms. So just specify the appropriate attributes for the IME for the newer platforms. (And also be sure to still test on older platforms, if you really care about that. I don't think there are a ton of devices left at API 2, though I really don't know any numbers, so it may not be that important.) On Wed, Oct 7, 2009 at 9:51 AM, gnugu rho...@gmail.com wrote: Hi, Google suggests in Dev Guide that we set the API level as low as possible to cover most of the devices. Somebody recently pointed out in my app that when they are typing in the password the automatic suggestions pop up making it annoying. I found out the solution, but is only available in API level 3. I guess my question is, are there devices out there that use Android 1.1 still? Does Google have any stats on this? Thanks. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. 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: Handling Network Unavailability
I think the question you're asking is simple: When network is lost, the SDK doesn't detect this and thinks it's valid still. Thus, it still tries to use it. But, since it's not there, nothing happens. How can this be resolved? If that's your question, I share that question. On Sep 16, 11:38 am, mobilek...@googlemail.com mobilek...@googlemail.com wrote: The application I'm working allows a continious upload of several Mbs over http, which turns out to be quite a challenge when testing it on T-Mobile's 3G netowrk in the UK. At points the stream is interrupted and thenetworkstatus seems to change from connected to idle during data transmission. The tricky part here is that my broadcast receiver does not detect the change, whereas I can clearly see that no data has been uploaded by the indication of the 3G icon in the status bar. Has anyone faced anything similar to that? How do you overcome thisissue when your app has established anetworkconnection, but then out of nowhere it losses it, and there is no way for you to detect that... I'm fairly familiar with the architecture of mobile 3G networks, and the principles of connecting to a B-Node and maintaining that connection, however, in my case it seems that the client keeps losing connectivity completely randomely. Any thoughts appreciated 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: Keeping MediaController from timing out after a certain amount of time
Thanks for the insight, even calling MediaController.show() after the MediaController is attached to the VideoView yielded to the same result. Is there a way to override how the VideoView will hide/show the MediaController? On Oct 6, 4:23 pm, Marco Nelissen marc...@android.com wrote: VideoView itself will hide/show the MediaController as it sees fit, so your call to show() will only be in effect until VideoView decides to hide (or show with a timeout) it again. Also, you are calling MediaController.show() before the MediaController is even attached to the VideoView. On Tue, Oct 6, 2009 at 2:53 PM, Danny datts...@gmail.com wrote: I have the following code: songView = (VideoView)this.findViewById(R.id.VideoView02); MediaController mc = new MediaController(this); mc.show(0); mc.requestFocus(); songView.setMediaController(mc); songView.requestFocus(); http://developer.android.com/reference/android/widget/MediaController... According to the doc , it says public void show (int timeout) The timeout in milliseconds. Use 0 to show the controller until hide() is called. I can not get the mediacontroller to show permanently or any other time. Anyone successfully get this to work? 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: Should we still force our apps to API level 2?
If you set it to 3 it won't be installed on older devices. I don't know enough about the dev tools to help with compiling problems there (especially without even seeing the error message). On Wed, Oct 7, 2009 at 10:18 AM, gnugu rho...@gmail.com wrote: Just to make sure I understand you correctly, I set the API level in my app to 3 and when someone runs it on Android 1.1 the attributes will be ignored? Because when I keep the API level at 2 the project will not compile (at least in Eclipse). On Oct 7, 10:13 am, Dianne Hackborn hack...@android.com wrote: You can use any newer XML attributes, and they will be ignored on older platforms. So just specify the appropriate attributes for the IME for the newer platforms. (And also be sure to still test on older platforms, if you really care about that. I don't think there are a ton of devices left at API 2, though I really don't know any numbers, so it may not be that important.) On Wed, Oct 7, 2009 at 9:51 AM, gnugu rho...@gmail.com wrote: Hi, Google suggests in Dev Guide that we set the API level as low as possible to cover most of the devices. Somebody recently pointed out in my app that when they are typing in the password the automatic suggestions pop up making it annoying. I found out the solution, but is only available in API level 3. I guess my question is, are there devices out there that use Android 1.1 still? Does Google have any stats on this? Thanks. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. 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] i want to trace android kernel
hi all, I want to trace the source code of the android system from the begining of runing it till the emulator appear and also want to know the main function (which I think on the kernel ) that print the strings we saw on the emulator screen waiting for any help 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: Keeping MediaController from timing out after a certain amount of time
You could create a derived version of MediaController whose hide() does nothing. On Wed, Oct 7, 2009 at 10:27 AM, Danny datts...@gmail.com wrote: Thanks for the insight, even calling MediaController.show() after the MediaController is attached to the VideoView yielded to the same result. Is there a way to override how the VideoView will hide/show the MediaController? On Oct 6, 4:23 pm, Marco Nelissen marc...@android.com wrote: VideoView itself will hide/show the MediaController as it sees fit, so your call to show() will only be in effect until VideoView decides to hide (or show with a timeout) it again. Also, you are calling MediaController.show() before the MediaController is even attached to the VideoView. On Tue, Oct 6, 2009 at 2:53 PM, Danny datts...@gmail.com wrote: I have the following code: songView = (VideoView)this.findViewById(R.id.VideoView02); MediaController mc = new MediaController(this); mc.show(0); mc.requestFocus(); songView.setMediaController(mc); songView.requestFocus(); http://developer.android.com/reference/android/widget/MediaController... According to the doc , it says public void show (int timeout) The timeout in milliseconds. Use 0 to show the controller until hide() is called. I can not get the mediacontroller to show permanently or any other time. Anyone successfully get this to work? 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: Android as a Universal Remote for CE/HA?
Guess not... :-( ... On Oct 7, 2:01 am, jed jedi.the...@gmail.com wrote: Any thoughts on this anyone? Much Appreciated, Jed --~--~-~--~~~---~--~~ 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] Differences in building for target 2 and target 3 in 1.5 sdk
Hi, What are the differences between building for target 2 (no gmaps add on) and target 3 (with gmaps addon). Could any one has the ant scripts to bulids for these targets. I see 1.5 SDK does these though custom ant tasks rather than 1.1 ant scripts (this was more clear and apperant on how it does the build) Regards, Raja Nagendra Kumar, C.T.O www.tejasoft.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] OOM error caught bei DefaultException handler ... but there is plenty of memory
Hi, I very often get bug reports about out-of-memory errors. Those errors are caught bei the default exception handler where I then ask how much memory is left (see below). Very often, like in the case from below, there is plenty of memory left though. I am wondering why this is? Of course, it might be that the bitmap (bitmap size exceeds VM budget) is actually megabytes and megabytes, but as these are resources that are small (and used by all the other users that don't get ooms) I would say that's not the case. Maybe the memory has been freed between the error and the measurement. That would be unfortunate. Any better wetter to measure the current memory consumption? Or am I missing something and there is a completely different explanation? That would be wonderful and maybe give me a completely new attack vector against those bugs. FWIW. I embed WebView and it is one of my top candidates for huge memory consumption. Maybe there is something I can measure? Cheers, Mariano -- Time: Sat Oct 03 11:19:00 GMT+01:00 2009 -- Android Version: sdk=3, release=1.5, inc=150879 -- Memory free: 12.27MB total: 15.44MB max: 16.00MB -- NewsRob Version: 3.1.0/310 -- Stacktrace:(3390) android.view.InflateException: Binary XML file line #29: Error inflating class java.lang.reflect.Constructor at android.view.LayoutInflater. createView(LayoutInflater.java:512) at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562) at android.view.LayoutInflater.rInflate(LayoutInflater.java:617) at android.view.LayoutInflater.inflate(LayoutInflater.java:407) at android.view.LayoutInflater.inflate(LayoutInflater.java:320) at android.widget.ResourceCursorAdapter.newView(ResourceCursorAdapter.java:79) at android.widget.SimpleCursorAdapter.newView(SimpleCursorAdapter.java:93) at android.widget.CursorAdapter.getView(CursorAdapter.java:182) at android.widget.AbsListView.obtainView(AbsListView.java:1269) at android.widget.ListView.makeAndAddView(ListView.java:1623) at android.widget.ListView.fillDown(ListView.java:607) at android.widget.ListView.fillSpecific(ListView.java:1194) at android.widget.ListView.layoutChildren(ListView.java:1459) at android.widget.AbsListView.onLayout(AbsListView.java:1113) at android.view.View.layout(View.java:6133) at android.widget.FrameLayout.onLayout(FrameLayout.java:333) at android.view.View.layout(View.java:6133) at android.widget.FrameLayout.onLayout(FrameLayout.java:333) at android.view.View.layout(View.java:6133) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:998) at android.widget.LinearLayout.onLayout(LinearLayout.java:918) at android.view.View.layout(View.java:6133) at android.widget.FrameLayout.onLayout(FrameLayout.java:333) at android.view.View.layout(View.java:6133) at android.widget.FrameLayout.onLayout(FrameLayout.java:333) at android.view.View.layout(View.java:6133) at android.view.ViewRoot.performTraversals(ViewRoot.java:929) at android.view.ViewRoot.handleMessage(ViewRoot.java:1482) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:3948) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.reflect.InvocationTargetException at android.widget.TextView.init(TextView.java:308) at java.lang.reflect.Constructor.constructNative(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:446) at android.view.LayoutInflater.createView(LayoutInflater.java:499) ... 37 more Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:363) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:212) at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:663) at android.content.res.Resources.loadDrawable(Resources.java:1637) at android.content.res.TypedArray.getDrawable(TypedArray.java:548) at android.view.View.init(View.java:1725) at android.widget.TextView.init(TextView.java:314) ... 41 more --~--~-~--~~~---~--~~ 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: OOM error caught bei DefaultException handler ... but there is plenty of memory
Those errors are caught bei the default exception handler where I then ask how much memory is left (see below). Very often, like in the case from below, there is plenty of memory left though. I am wondering why this is? AFAIK, Android's garbage collector is non-compacting. Hence, the issue is not whether there is total free memory sufficient to allocate your bitmap, but whether there is a single contiguous block sufficient to allocate your bitmap. -- 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: Android emulator start up error ?
When I first set up the SDK I added the entire path, with \tools at the end, and I got the error message. Then I removed the \tools part from the end of the path I had entered and it worked. Hopefully that helps. -Brian On Oct 7, 5:29 am, GK Gupta gkumar.g...@gmail.com wrote: I have added the /tools directory path to my PATH environmental variable, but even then I am facing this kind of problem frequently. Can anyone help me. On Oct 3, 2:38 am, David M. Lee mingxia...@gmail.com wrote: 我也有同樣的問題。有人建議以下的方法。我將自己試試。 You need to follow the instructions here: file:///C:/android-sdk-windows-1.6_r1/docs/sdk/1.6_r1/installing.html The /tools directory of your Android SDK installation must be added to your PATH environment variable as per the instructions. On 9月16日, 下午10時38分, android.vinny vinny.s...@gmail.com wrote: can any body give the solution for this when i am running the project in eclipse .. at finally showing this message ... ActivityManager: - exec '/system/bin/sh'failed:Badaddress(14) - app is installing but not starting first time automatically. TIA --~--~-~--~~~---~--~~ 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] Can't find documentation on end-user FW upgrade process
Hi, I'm trying to understand how end-users will upgrade their device firmware from Android ver. X to X+1. A new build of Android contains system.img and userdata.img (among others). system.img is read-only, so I don't see any problem with simply replacing the user's existing copy. However, simply overwriting userdata.img with a newer version would destroy all of an end-users application data (wouldn't it?). I'm trying to understand how this process will work for our Android- based device. It seems that the designers of Android must have had a plan for doing this without the user losing all of their data, but I can't find any documentation about this. Googling for this information yields lots of pages containing hacker- level instructions (e.g. adb commands) -- still no idea how this process was envisioned to work for average end-users. Does anyone know how this is supposed to work, or where this is documented? 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] Anim folder not showing in eclipse
Hello, I cant see or reference the anim folder in the res folder. When I go in the res folder it is also not there, I need the anim folder for animation. Am I supposed to see it, or is it hidden? Thankyou for your time, Fordy --~--~-~--~~~---~--~~ 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: Publish Apps for Other Developers
Why not. I don't think Google prohibits that. All the earnings (from Google Checkout) will go to the US publisher. It is up to him and his Russian counter-part to iron out all the copyright/legalities/payments/tax-issues between them. On Oct 7, 12:03 pm, polyclefsoftware dja...@gmail.com wrote: The country where the developer resides. If a developer in Russia wanted to publish their paid apps, but could not currently do so, and a developer in the US published it for them for a percentage of the profits, is this kosher? On Oct 7, 10:09 am, Steve steveoliv...@gmail.com wrote: Is the limitation that the buyers need to be in the allowed countries? Or is the limitation the country where the publisher resides? On Oct 6, 6:18 pm, polyclefsoftware dja...@gmail.com wrote: In terms of publishing apps for developers that reside in countries where they are not currently able to sell their apps via the Android Market, is this practice okay? Does it violate the Terms and Conditions of being a seller in any way?- 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: Can't find documentation on end-user FW upgrade process
I'm trying to understand how end-users will upgrade their device firmware from Android ver. X to X+1. For many, if not most, end users, that will happen automatically via over-the-air (OTA) updates from their carrier. I'm trying to understand how this process will work for our Android- based device. You really want to ask that sort of question over on [android-porting] rather than here. -- 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: Function inlining
Ok. On a related note, has anyone used a preprocessor of some sort and managed to integrate it with Eclipse? Best regards, Viktor Linder On 7 Okt, 18:32, Romain Guy romain...@google.com wrote: There's no inlining at the moment. On Wed, Oct 7, 2009 at 6:31 AM, Viktor Linder linder.vik...@gmail.com wrote: Hi! I recently wrote a quick test that does this: private static int test_f(int i) { return i * 42; } ... int z = 41; for(int i = 0; i 1; ++i) { z = z*42; } // this loop runs in X seconds for(int i = 0; i 1; ++i) { z = test_f(z); } // this loop runs in 10*X seconds The results of this tests imples test_f() is not being inlined, even though it really is a prime candidate for it. It should also be possible to do this inlining at compile time. There seems to be no option to control optimization level of the compiler in Eclipse, perhaps optimizations like these are left to the VM? Does the Dalvik VM do inlining of functions at all, or did it just decide to not inline this specific instance? Curious to hear a response from someone more familiar with the Dalvik VM than me. Best regards, Viktor Linder -- 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] can't get selector to work inside an app widget...
i am having trouble getting a selector to work inside a button on an app widget. my app widget xml looks like this: ImageButton android:id=@+id/MyImageButton android:layout_width=wrap_content android:layout_height=fill_parent android:src=@drawable/my_selector android:background=@color/transparent/ my_selector.xml in my drawable directory looks like this: selector xmlns:android=http://schemas.android.com/apk/res/android; item android:drawable=@drawable/MyNormalButton / item android:state_focused=true android:state_pressed=false android:drawable=@drawable/MyFocusButton / item android:state_focused=true android:state_pressed=true android:drawable=@drawable/MyFocusButton / item android:state_focused=false android:state_pressed=true android:drawable=@drawable/MyFocusButton / /selector the button doesn't change appearance any ideas? tia. --~--~-~--~~~---~--~~ 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] is any one sucefully deployed gmaps application on target 2
As in SDK 1.5, did any one was successful in deploying the gmap based application.Pl. give some hits on what to watch out for.. We tried to compile the application with gmaps libarary as class path instead of bootpath and put the minsdk as 3 and remove the uses-library android:name=com.google.android.maps / from manifest. The application compiles and installs fine on target 2 avd, however on start of the application it says super class of the map app not found which is MapActivity. Regards, Raja Nagendra Kumar, C.T.O www.tejasoft.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] Re: OOM error caught bei DefaultException handler ... but there is plenty of memory
(Disclaimer: what follows is just my understanding of things and may be quite wrong) Bitmap memory management is complicated by the fact that the memory for bitmaps is allocated in a separate native heap. The amount of memory available in this native heap is the total memory allocation limit minus the java heap size. This is reasonable but has a subtle consequence which I can best explain by a simple example (the byte sizes have been chosen for simplicity): 1) Process starts up, generating a java heap allocation of 2MB. 2) Application initializes its state and allocates 2MB in the java heap. 3) Application creates a 2MB Bitmap which is allocated in the native heap 4) Application updates its state by crunching a 10MB byte array 5) Garbage collector kicks in and reclaims the 10MB byte array 6) Application attempts to a create a new 2MB Bitmap 7) An OutOfMemoryException is raised. At first sight it looks as though the total memory usage at (6) is 6MB (4MB java and 2MB native) so the allocation should succeed. BUT (4) raised the Java heap size to 14MB, and though most of that is no longer in use, the java heap does not shrink. So the actual allocation to the native heap is only 2MB and that is already used by the first bitmap. I hope this is correct, perhaps someone else could corroborate it, I don't want to spread my misunderstandings. Tom 2009/10/7 Mariano Kamp mariano.k...@gmail.com Hi, I very often get bug reports about out-of-memory errors. Those errors are caught bei the default exception handler where I then ask how much memory is left (see below). Very often, like in the case from below, there is plenty of memory left though. I am wondering why this is? Of course, it might be that the bitmap (bitmap size exceeds VM budget) is actually megabytes and megabytes, but as these are resources that are small (and used by all the other users that don't get ooms) I would say that's not the case. Maybe the memory has been freed between the error and the measurement. That would be unfortunate. Any better wetter to measure the current memory consumption? Or am I missing something and there is a completely different explanation? That would be wonderful and maybe give me a completely new attack vector against those bugs. FWIW. I embed WebView and it is one of my top candidates for huge memory consumption. Maybe there is something I can measure? Cheers, Mariano -- Time: Sat Oct 03 11:19:00 GMT+01:00 2009 -- Android Version: sdk=3, release=1.5, inc=150879 -- Memory free: 12.27MB total: 15.44MB max: 16.00MB -- NewsRob Version: 3.1.0/310 -- Stacktrace:(3390) android.view.InflateException: Binary XML file line #29: Error inflating class java.lang.reflect.Constructor at android.view.LayoutInflater. createView(LayoutInflater.java:512) at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562) at android.view.LayoutInflater.rInflate(LayoutInflater.java:617) at android.view.LayoutInflater.inflate(LayoutInflater.java:407) at android.view.LayoutInflater.inflate(LayoutInflater.java:320) at android.widget.ResourceCursorAdapter.newView(ResourceCursorAdapter.java:79) at android.widget.SimpleCursorAdapter.newView(SimpleCursorAdapter.java:93) at android.widget.CursorAdapter.getView(CursorAdapter.java:182) at android.widget.AbsListView.obtainView(AbsListView.java:1269) at android.widget.ListView.makeAndAddView(ListView.java:1623) at android.widget.ListView.fillDown(ListView.java:607) at android.widget.ListView.fillSpecific(ListView.java:1194) at android.widget.ListView.layoutChildren(ListView.java:1459) at android.widget.AbsListView.onLayout(AbsListView.java:1113) at android.view.View.layout(View.java:6133) at android.widget.FrameLayout.onLayout(FrameLayout.java:333) at android.view.View.layout(View.java:6133) at android.widget.FrameLayout.onLayout(FrameLayout.java:333) at android.view.View.layout(View.java:6133) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:998) at android.widget.LinearLayout.onLayout(LinearLayout.java:918) at android.view.View.layout(View.java:6133) at android.widget.FrameLayout.onLayout(FrameLayout.java:333) at android.view.View.layout(View.java:6133) at android.widget.FrameLayout.onLayout(FrameLayout.java:333) at android.view.View.layout(View.java:6133) at android.view.ViewRoot.performTraversals(ViewRoot.java:929) at android.view.ViewRoot.handleMessage(ViewRoot.java:1482) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:3948) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782) at
[android-developers] Design Issues
I've been trying to find a way to place some buttons on my custom view. I did not use ViewGroup, but the need is to place couple buttons at the high end of y coordinate. I sure don't know if I could use an XML layout for this. So imagine that 1/10 th or 1/15th of the Y axis on high end ( i.e. the bottom of the screen ) would be devoted to those buttons. Rest of the canvas is dynamically drawn figures. Using programmatic-ally, the drawable object, I can place them properly, but it is hard to label those buttons with text. I know it is possible to perhaps create several button with embedded text and draw them based on the application states, but that seems to be bit of a work. Would it be possible to use XML formatted layout to place those buttons at the high end of Y axis, as well as leave the rest for custom viewed draw without going through Viewgroup? Any suggestion --~--~-~--~~~---~--~~ 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] ListView setAdapter in onCreate, getChildCount is zero in onStart?
I want to display a ListView with checkboxes, and I want some of the checkboxes pre-selected. The ListView has setAdapter called during onCreate, and the list information appears when the screen is drawn. However, when I attempt to set certain list items as checked, my ListView reports getChildCount() = 0. My SharedPreferences contains a list of sounds that have been previously selected, as a comma delimited string of list indices. Because the list appears to have no children in onStart, my attempts to set items as checked fails. On the good side, once the list is rendered, I can select entries and hit Back, and my selection is stored to SharedPreferences correctly. How can I load my previous selection into the list? Should I be using something else here? In the spirit of open source, here's my code, free to you :) SoundLibrary.Java import java.util.Hashtable; import android.app.Activity; import android.content.Context; import android.content.SharedPreferences; import android.content.res.Resources; import android.media.MediaPlayer; import android.os.Bundle; import android.util.SparseBooleanArray; import android.view.View; import android.view.View.OnLongClickListener; import android.widget.ArrayAdapter; import android.widget.ListView; public class SoundLibrary extends Activity{ ListView lstSounds; HashtableString, Integer soundTable; CharSequence[] soundNames; CharSequence[] soundLocations; OnLongClickListener previewListener; static Context myContext; static MediaPlayer player; SharedPreferences prefs; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.soundlibrary); myContext = this.getApplicationContext(); prefs = getSharedPreferences(myAppData, 0); soundTable = new HashtableString, Integer(); LoadSoundTable(); lstSounds = (ListView)findViewById(R.id.lstSounds); PopulateSoundList(); lstSounds.setOnLongClickListener(new PreviewListener()); } @Override public void onStart() { super.onStart(); String[] selectedSoundsArray = prefs.getString(selectedSounds, ).split(,); for (int selI = 0; selI selectedSoundsArray.length; selI++) { if (lstSounds.getChildCount() = selI) { break; } try { lstSounds.getChildAt(Integer.parseInt(selectedSoundsArray [selI])).setSelected(true); } catch (NumberFormatException e) { } } } @Override public void onPause() { super.onPause(); StringBuffer sb = new StringBuffer(); SparseBooleanArray sbaSelectedSounds = lstSounds.getCheckedItemPositions(); for (int sbaKey = 0; sbaKey sbaSelectedSounds.size(); sbaKey++) { if (sbaSelectedSounds.get(sbaKey, false)) { sb.append(String.valueOf(sbaKey)); sb.append(','); } } prefs.edit().putString(selectedSounds, sb.toString()).commit(); } private void LoadSoundTable() { Resources res = getResources(); CharSequence[] soundNames = res.getTextArray(R.array.sound_name); CharSequence[] soundLocations = res.getTextArray(R.array.sound_location); for (int i = 0; i soundNames.length; i++) { soundTable.put(soundNames[i].toString(), res.getIdentifier(soundLocations[i].toString(), raw, this.getPackageName())); } } private void PopulateSoundList() { ArrayAdapterString aa = new ArrayAdapterString(this, android.R.layout.simple_list_item_multiple_choice, soundTable.keySet().toArray(new String[soundTable.keySet ().size()])); lstSounds.setAdapter(aa); } private class PreviewListener extends Activity implements OnLongClickListener { public boolean onLongClick(View v) { String previewSoundName = lstSounds.getSelectedItem().toString(); player = MediaPlayer.create(myContext, soundTable.get(previewSoundName).intValue()); player.start(); return true; } } }
[android-developers] Re: can't get selector to work inside an app widget...
I cannot seem to get the selector to work - even inside a normal view. is there some trick to getting the selector to work? I have google'd for examples and tutorial and looked at -- http://dev.android.com/reference/android/widget/ImageButton.html, but I cannot get the view to change when I set the focus there. argh... On Oct 7, 11:32 am, sdphil phil.pellouch...@gmail.com wrote: i am having trouble getting a selector to work inside a button on an app widget. my app widget xml looks like this: ImageButton android:id=@+id/MyImageButton android:layout_width=wrap_content android:layout_height=fill_parent android:src=@drawable/my_selector android:background=@color/transparent/ my_selector.xml in my drawable directory looks like this: selector xmlns:android=http://schemas.android.com/apk/res/android; item android:drawable=@drawable/MyNormalButton / item android:state_focused=true android:state_pressed=false android:drawable=@drawable/MyFocusButton / item android:state_focused=true android:state_pressed=true android:drawable=@drawable/MyFocusButton / item android:state_focused=false android:state_pressed=true android:drawable=@drawable/MyFocusButton / /selector the button doesn't change appearance any ideas? tia. --~--~-~--~~~---~--~~ 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: ListView setAdapter in onCreate, getChildCount is zero in onStart?
Your activity (and your list-view) is not yet visible in the onStart. Don't use 'getChildCount' and 'getChildAt' method to check your preference-settings. BTW: If your activity is not yet visible, how can a user make a selection? Shouldn't you query in the onPause, for example. And also, the positions returned by the method getCheckedItemPositions () are the positions in your adapter (ArrayAdapter in your case). Your list-*view* positions (used in getChildAt) are not the same. You list- view will never have more children than the ones you can see. And the child-at postion 0 is the one on the top of the list-view. On Oct 7, 2:37 pm, KhanAzul mark.pes...@gmail.com wrote: I want to display a ListView with checkboxes, and I want some of the checkboxes pre-selected. The ListView has setAdapter called during onCreate, and the list information appears when the screen is drawn. However, when I attempt to set certain list items as checked, my ListView reports getChildCount() = 0. My SharedPreferences contains a list of sounds that have been previously selected, as a comma delimited string of list indices. Because the list appears to have no children in onStart, my attempts to set items as checked fails. On the good side, once the list is rendered, I can select entries and hit Back, and my selection is stored to SharedPreferences correctly. How can I load my previous selection into the list? Should I be using something else here? In the spirit of open source, here's my code, free to you :) SoundLibrary.Java import java.util.Hashtable; import android.app.Activity; import android.content.Context; import android.content.SharedPreferences; import android.content.res.Resources; import android.media.MediaPlayer; import android.os.Bundle; import android.util.SparseBooleanArray; import android.view.View; import android.view.View.OnLongClickListener; import android.widget.ArrayAdapter; import android.widget.ListView; public class SoundLibrary extends Activity{ ListView lstSounds; HashtableString, Integer soundTable; CharSequence[] soundNames; CharSequence[] soundLocations; OnLongClickListener previewListener; static Context myContext; static MediaPlayer player; SharedPreferences prefs; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.soundlibrary); myContext = this.getApplicationContext(); prefs = getSharedPreferences(myAppData, 0); soundTable = new HashtableString, Integer(); LoadSoundTable(); lstSounds = (ListView)findViewById(R.id.lstSounds); PopulateSoundList(); lstSounds.setOnLongClickListener(new PreviewListener()); } @Override public void onStart() { super.onStart(); String[] selectedSoundsArray = prefs.getString(selectedSounds, ).split(,); for (int selI = 0; selI selectedSoundsArray.length; selI++) { if (lstSounds.getChildCount() = selI) { break; } try { lstSounds.getChildAt(Integer.parseInt(selectedSoundsArray [selI])).setSelected(true); } catch (NumberFormatException e) { } } } @Override public void onPause() { super.onPause(); StringBuffer sb = new StringBuffer(); SparseBooleanArray sbaSelectedSounds = lstSounds.getCheckedItemPositions(); for (int sbaKey = 0; sbaKey sbaSelectedSounds.size(); sbaKey++) { if (sbaSelectedSounds.get(sbaKey, false)) { sb.append(String.valueOf(sbaKey)); sb.append(','); } } prefs.edit().putString(selectedSounds, sb.toString()).commit(); } private void LoadSoundTable() { Resources res = getResources(); CharSequence[] soundNames = res.getTextArray(R.array.sound_name); CharSequence[] soundLocations = res.getTextArray(R.array.sound_location); for (int i = 0; i soundNames.length; i++) { soundTable.put(soundNames[i].toString(), res.getIdentifier(soundLocations[i].toString(), raw, this.getPackageName())); } } private void PopulateSoundList() { ArrayAdapterString aa =
[android-developers] Re: Anim folder not showing in eclipse
Fordy you have to create it.. On Oct 7, 11:55 am, fordy fcotteri...@gmail.com wrote: Hello, I cant see or reference the anim folder in the res folder. When I go in the res folder it is also not there, I need the anim folder for animation. Am I supposed to see it, or is it hidden? Thankyou for your time, Fordy --~--~-~--~~~---~--~~ 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: Differences in building for target 2 and target 3 in 1.5 sdk
two files alias.xml and anddroid_rules.xml one is in the sdk_install/tools/templates other one is in the sdk_install/platform15/tools/lib or the sdk_install/platforms/16//tools/lib On Oct 7, 12:52 pm, Raja Nagendra Kumar nagendra.r...@tejasoft.com wrote: Hi, What are the differences between building for target 2 (no gmaps add on) and target 3 (with gmaps addon). Could any one has the ant scripts to bulids for these targets. I see 1.5 SDK does these though custom ant tasks rather than 1.1 ant scripts (this was more clear and apperant on how it does the build) Regards, Raja Nagendra Kumar, C.T.Owww.tejasoft.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 -~--~~~~--~~--~--~---