[android-developers] Re: SharedPreferences got deleted! - What could be the problem?
Just on a hunch as I have not tried it, can you remove the content URL's from your preference file and try it again (form the url inside your code, and store the variable number in prefs) Again, I have not received any lost shared prefs complaints from anyone and I did not lose any in the last couple of months during my testing. I only have simple data (no urls, no comma's), but cover all the datatypes in the preferences. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Issue: Neither user 10039 nor current process has android.permission.WAKE_LOCK || Rooted Phone || App from SD card || JF image
Hi, I now had this issue twice (see stacktrace below). I am sure that the permission is granted as I declare this in my manifest. Hence the app wouldn't be installed if the user didn't grant the permission. (a) My guess is that it's a rooted phone where the app is started from an SD card (or similar) whereby the original user id has changed after the install. (b) This could be a Cupcake feature. Acquiring wake locks has gone down a similar path as turning GPS on? I am trying to track down (a) with my users, but this takes some time. I meanwhile now that at least one user uses a JF image. Anybody else has experience with that issue? Any idea if (b) might be valid? The app works on my 1.5 emulator and on 400 phones with Cupcake, at least it is installed on them and users don't submit bug reports. So I guess (b) is not the case, but who knows? Cheers, Mariano -- Android Version: sdk=3, release=1.5, inc=126986 -- Memory free: 0.53MB total: 2.75MB max: 16.00MB-- Thread State: RUNNABLE -- NewsRob Version: 2.1.2/212 -- Stacktrace: java.lang.SecurityException: Neither user 10039 nor current process has android.permission.WAKE_LOCK. at android.os.Parcel.readException(Parcel.java:1234) at android.os.Parcel.readException(Parcel.java:1222) at android.os.IPowerManager$Stub$Proxy.acquireWakeLock(IPowerManager.java:178) at android.os.PowerManager$WakeLock.acquire(PowerManager.java:228) at com.newsrob.SynchronizationService.doSync(SynchronizationService.java:109) at com.newsrob.SynchronizationService.access$0(SynchronizationService.java:86) at com.newsrob.SynchronizationService$1.run(SynchronizationService.java:75) at java.lang.Thread.run(Thread.java:1058) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: sdcard - remaining space
search this forum for android.os.StatFs() On May 7, 10:50 pm, Sheado chad...@gmail.com wrote: hello, sorry if this has already been answered (hard to search for this one).. is there any way to detect remaining space on the sdcard through the API? I prefer not to make native or shell calls. 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: Updated to 1.5 and R.java is not regeneratated
I am having the same problem. Richards solution doasnt help either. Any advice? On 5 maj, 00:13, Jinru He mikehe1...@gmail.com wrote: Hi, Xavier, I encounter the same problem. and I am pretty sure that I didnot have thegenfolderbefore updating to ADT 0.9 How can i solve this problem? Thanks! On 4月30日, 下午5时54分, Xavier Ducrohet x...@android.com wrote: When updating an old project that doesn't have thegensourcefolder setup, it first detects if thegenfolderalreadyexists, and if so, generates this error. The idea was tonotconvertand pre-existinggenfolder(or file) into an Eclipsesourcefolder. Are you sure you didn't have thegenfolderbefore updating to ADT 0.9? thanks Xav On Thu, Apr 30, 2009 at 2:46 PM, Richard Schilling richard.rootwirel...@gmail.com wrote: O.K. I resolved this. The problem was related to the fact that Eclipse couldn't properly handle thegendirectory that it created. This error is generated: [2009-04-30 14:14:15 - MyApp] /MyApp/genalreadyexistsbutisnota sourcefolder.Convertto asourcefolderorrenameit. So, here's how I resolved this problem: 1. Make sure Android 1.1 platform is selected for the project. 2. Delete thegendirectory - let Eclipse update .classpath (if it asks). 3. Clean the project - Eclipse will regenerate thegendirectory 4. Add the directorygento the Javasourceclasspath if R.java cannot be resolved. 5. Clean the project again. 6. if you still have a problem with the above error showing up, delete thegendirectory again and let Eclipse regenerate it. This should clear up the error. Perhaps a change to the Eclipse plugin or the Eclipse API needs to be made - I don't know. But, at least my projects are building now. Cheers, Richard Schilling Root Wireless, Inc. www.rootwireless.com On Apr 30, 2:34 pm, Richard Schilling richard.rootwirel...@gmail.com wrote: I also get this in the message window: [2009-04-30 14:14:15 - MyApp] /MyApp/genalreadyexistsbutisnota sourcefolder.Convertto asourcefolderorrenameit. Richard On Apr 30, 2:29 pm, Richard Schilling richard.rootwirel...@gmail.com wrote: I have a number of projects that were built and ran just fine under the 1.1 version of the SDK. I'm updating all of my projects. Some projects update with no problem. But, some Eclipse projects don't regenerate R.java properly in thegen directory. I've set the Android platform to 1.1. I've cleaned the project. I've refreshed the project. R.java is stillnotbeing generated. Help! This issue prevents production applications from being bult at the moment. Richard Schilling Root Wireless- Hide quoted text - - Show quoted text - -- Xavier Ducrohet Android Developer Tools Engineer Google Inc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Setting up UDP connections between devices
Hi, I want to setup a P2P UDP connection between two devices. The 'normal' method is to use the socket class available, but this won't work due to NAT issues etc. For this, i am using XMPP, but the default mode is TCP. To use UDP, i need to use Jingle. Can anyone tell me how to perform a basic jingle negotiation so that i can effectively gain the IP addr and port no. of the other peer. I have tried libraries like Smack API and Yingle, but they are way too complicated for my purposes. I just want to setup a UDP stream between 2 peers and transmit arbitrary data. Cheers, Earlence --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Issue: Neither user 10039 nor current process has android.permission.WAKE_LOCK || Rooted Phone || App from SD card || JF image
Cupcake still allows apps to get the wake lock permission. On Thu, May 7, 2009 at 11:09 PM, Mariano Kamp mariano.k...@gmail.comwrote: Hi, I now had this issue twice (see stacktrace below). I am sure that the permission is granted as I declare this in my manifest. Hence the app wouldn't be installed if the user didn't grant the permission. (a) My guess is that it's a rooted phone where the app is started from an SD card (or similar) whereby the original user id has changed after the install. (b) This could be a Cupcake feature. Acquiring wake locks has gone down a similar path as turning GPS on? I am trying to track down (a) with my users, but this takes some time. I meanwhile now that at least one user uses a JF image. Anybody else has experience with that issue? Any idea if (b) might be valid? The app works on my 1.5 emulator and on 400 phones with Cupcake, at least it is installed on them and users don't submit bug reports. So I guess (b) is not the case, but who knows? Cheers, Mariano -- Android Version: sdk=3, release=1.5, inc=126986 -- Memory free: 0.53MB total: 2.75MB max: 16.00MB-- Thread State: RUNNABLE -- NewsRob Version: 2.1.2/212 -- Stacktrace: java.lang.SecurityException: Neither user 10039 nor current process has android.permission.WAKE_LOCK. at android.os.Parcel.readException(Parcel.java:1234) at android.os.Parcel.readException(Parcel.java:1222) at android.os.IPowerManager$Stub$Proxy.acquireWakeLock(IPowerManager.java:178) at android.os.PowerManager$WakeLock.acquire(PowerManager.java:228) at com.newsrob.SynchronizationService.doSync(SynchronizationService.java:109) at com.newsrob.SynchronizationService.access$0(SynchronizationService.java:86) at com.newsrob.SynchronizationService$1.run(SynchronizationService.java:75) at java.lang.Thread.run(Thread.java:1058) -- 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: sdcard - remaining space
awesome =) you rock! thanks! On May 7, 11:23 pm, Mark Anacker closecr...@riven.tzo.com wrote: search this forum for android.os.StatFs() On May 7, 10:50 pm, Sheado chad...@gmail.com wrote: hello, sorry if this has already been answered (hard to search for this one).. is there any way to detect remaining space on the sdcard through the API? I prefer not to make native or shell calls. 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: Ideas behind Android's task concept
Yeah I will certainly agree that this is a bit of a mess -- it was unfortunately the result of a lot of continual iteration on the UI (often of different apps independently), leading to new feature requests each time, causing an every growing number of options. :/ We are working on cleaning up and better formalizing the overall navigation model, but that will be an ongoing process. For example in Cupcake we have finally laid down some basic rules for notifications where pressing back should always return you to whatever your were immediately previously doing, and I believe all of the standard apps now follow this. As far as contacts goes, though, this is actually intentional -- some apps (like contacts and settings) want to put the user back to their front door when relaunched from home, so they set the option to do that. This is actually a desired inconsistency. (And something you may not know -- if you select one of these apps from the long-press-on-home task switcher, this will bring it to the foreground without clearing it... I would like to make this level of task switching more discoverable and integrated with the core UI.) On Thu, May 7, 2009 at 1:41 PM, Mike Hearn mh.in.engl...@gmail.com wrote: Can someone educate me about the rationale behind Android tasks? I'm also curious to know the thought process behind their design when they were originally conceived? I think the problem they solve is that it's hard to have a multi- tasking OS when only one thing can be on the screen at once. So the idea of tasks is that you can switch quickly between them, and they preserve your state in the context of that application: Maps - View Business Details Contacts - View Contact - Edit Contact Now if am editing a contact and want to do something else like view business details, I can go back home, press the Maps icon, do whatever, and then use home to press contacts and arrive back at the edit contact screen. I guess there are a few problems with the current implementation though: it's quite complicated, and there's no real way for users to learn how it works. The obvious mental model is of a linear stack of activities, but that's not what actually happens so you get things like pressing back on the home screen does not actually take you back. And then there is a lack of guidelines around when to use the activity modes - as you have found. And finally the built-in apps do use the activity modes inconsistently. For instance my example is wrong because the contacts app does reset the task stack. I think this stuff will shake out with time. Better animations can help users figure out the application model. UI guidelines will help developers. Hopefully the built-in apps will either become consistent or at least call out in their manifests why they use certain attributes so people can learn from 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] Bug in Contacts notes ?
Hi all, I am wondering if it is a bug, but when I try to edit Notes in a Contact, it is not saved even if I click Menu Done. However, if I create several notes (at least 2), only the last one is saved ... What it is the problem ? Regards, Olivier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: conversion to dalvik format failed with error 1
Hi My project was running perfectly and when I cleaned the project then It started to give the following error. [2009-05-08 12:47:24 - MobilChek] no classfiles specified [2009-05-08 12:47:24 - MobilChek] Conversion to Dalvik format failed with error 1 Pls help me in resolving this issue. Kamal On May 4, 2:53 am, Justin (Google Employee) j...@google.com wrote: Did you update your plugin? If so, did you create either a 1.1 AVD or a 1.5 w/Google Maps AVD? Cheers, Justin Android Team @ Google On May 2, 10:59 am, Berlin Brown berlin.br...@gmail.com wrote: On May 2,1:05 pm, CnmJbm cnm...@gmail.com wrote: ok, it seems i fixed it on my environment. just delete the R.java (by refreshing the project) and rebuild the project. On May 2, 9:57 am, CnmJbm cnm...@gmail.com wrote: i got the sameerror, TOO!!! May Day On Apr 28, 3:57 pm, chris.cap...@gmail.com chris.cap...@gmail.com wrote: Hi, I just updated to SDK 1.5 and all of my projects are failing to build with the followingerror: [2009-04-28 15:53:23 - Utilities] no classfiles specified [2009-04-28 15:53:23 - Utilities]ConversiontoDalvikformatfailed witherror1 (Utilities is the name of this specific project.) Any idea why? I'm on Ubuntu 9.04 x64. Before the update to 1.5 everything worked fine. Thanks. Chris I got rid of thaterrorand get thiserror, any ideas. I have a similar configuration: [2009-05-02 14:22:39 - HelloWorld]Failedto find an AVD compatible with target 'Android 1.1'. Launch aborted. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Problem with Internet connection through emulator
Well if that's the case, if the -http-proxy proxy command-line option is not supplied, then emulator should by default looks up the http_proxyenvironment variable (which I did set it using sqlite3 in the settingsdb file) and automatically uses any value matching the proxy format. However, it still cannot go online. Thanks for the reference to the releasenotes though. Gerald Logor On Fri, May 8, 2009 at 11:22 AM, Android Users androidmai...@gmail.comwrote: SDK 1.5 release notes mention this, In some cases, you may encounter problems when using the browser on an emulator started with the command-line option -http-proxy. Ref : http://developer.android.com/sdk/RELEASENOTES.html On Fri, May 8, 2009 at 8:50 AM, Gerald Logor gerald.lo...@gmail.comwrote: After spending hours of research and different ways to connect my emulator to the internet (i.e just accessing any ordinary webpages), I'm still hitting a brick wall. My current internet setting is that I'm behind a corporate internet connection thus connecting via a proxy (154.23.x.yy:80zz) Ways I tried: 1. Connect to the emulator using the adb shell command (From tools folder of SDK) *adb shell* enter this.. *# sqlite3 /data/data/com.android.providers.settings/databases/settings.db sqlite INSERT INTO system VALUES(99,'http_proxy','PROXY_IP:PROXY_Port');* Restarting the emulator, it's still showing WebPage unavailable 2. Using Eclipse as my IDE, I Go to Run - Run Configurations -Target in eclipse and enter *-http-proxy PROXY_IP:PROXY_Port * in Additional emulator command line options. Still, no happiness. 3. I also tried (in Eclipse), Windows-Preferences-Android-Default Emulator option, and inserting http-proxy *PROXY_IP:PROXY_Port *4. I'm not creating any of my own view or activity, thus did not need to setup INTERNET permissions in my manifest file. Any helps would be 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: WebView.addJavascriptInterface problems
The main problem is to access to the public attributes methods of the instance object from javascript, because I try to implement the W3C standard. This standard explicit force the access to the data through public attributes ( no from public methods). The above class hierarchy that i shows you is not casual, the W3C constrained it, and if i want to be according with that standard i need to implement in this way. My question is if i can do it using webview interface (addJavascriptInterface), or i need to do something more to adapt it to provide support to this standard in android. Can anybody give me some ideas to implement this feature in android, any ideas are welcome. best regards. On May 7, 7:36 pm, Mark Murphy mmur...@commonsware.com wrote: I'm developing a Geolocation tool following the geolocation standard in W3C, And I have this code: 3 files .java as follow: //NaviatorGeolocation.java //here all the imports public class NavigatorGeolocation extends Activity { Position position = new Position(); //Coordinates co = new Coordinates(); /** Called when the activity is first created. */ �...@override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); WebView wv = new WebView(this); wv.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE); wv.getSettings().setJavaScriptEnabled(true); wv.addJavascriptInterface(position, position); setContentView(wv); wv.loadUrl(http://test.libregeosocial.libresoft.es/gwt/ nada.html); } } //Postion.java public class Position { public long timestamp; public Coordinates coords; public Position(){ this.timestamp = 2929; coords = new Coordinates(); } } //Coordinates.java public class Coordinates { public double latitude; public double longitude; public double altitude; public double accuracy; public double altitudeAccuracy; public double heading; public double speed; public Coordinates(){ this.latitude = 9.9292; this.longitude = 444.21; this.altitude = 0.0; this.accuracy = 0.0; this.altitudeAccuracy = 0.0; this.heading = 0.0; this.speed = 0.0; } } My nata.html is as follow: html headtitleJS calls Android Method/title/head body h1JS on Android/h1 script type=text/javascript document.write(making tests--); document.write(recibido: + position.coords.latitude); - not work!! document.write(end); /script /body /html I don't now why but the position.coords.latitude, not work, but if I try position.timestamp it works, returning 2929. position.timestamp is a primitive value (long). position.coords is an object. I'm really thinking about that the Android , right now, CAN'T make use of the standard of geolocation... Change your API. Either move your Coordinates data members (double) into the Position object, or put methods on the Position object to access the Coordinates data members. Or, create a native user interface (instead of WebView) and use whatever internal API you want. -- Mark Murphy (a Commons Guy)http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] AVD creation in Eclipse should be automatic
Hi Folks, In Eclipse, when launching the debugger/emulator, the AVD selection is blank until you manually create an AVD by using a command line. It seems that Eclipse knows, because it asks you, which platform you are using (Android 1.1 vs 1.5 vs 1.5+Google) and it knows what you named the run/debug configuration. So, it really has what it needs to create a default AVD, but it doesn't. End to End funtionality is what makes products great. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] VIM and Android
Hi, All, I am forced to use VIM to do all my programming and being new to Adnroid and Java in general but with a background of sorts in Perl, I need to know how to use VIM to write Android Applications. Is this possible? Also, is there any tips and tricks to modifying the Android tutorials for VIM? Regards, Alex, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: conversion to dalvik format failed with error 1
My guess is that the 1.5 release relies on something that gets built after it is needed. Thus the Clean fails but then it works on the next build. Can someone who worked on the Eclipse Plugin for 1.5 check that out? Incase it is important, I am using the 1.5 with Google libs selection. Ken Kelly On May 8, 3:34 am, Kamal Hasan kamal.hasa...@gmail.com wrote: Hi My project was running perfectly and when I cleaned the project then It started to give the following error. [2009-05-08 12:47:24 - MobilChek] no classfiles specified [2009-05-08 12:47:24 - MobilChek] Conversion to Dalvik format failed with error 1 Pls help me in resolving this issue. Kamal On May 4, 2:53 am, Justin (Google Employee) j...@google.com wrote: Did you update your plugin? If so, did you create either a 1.1 AVD or a 1.5 w/Google Maps AVD? Cheers, Justin Android Team @ Google On May 2, 10:59 am, Berlin Brown berlin.br...@gmail.com wrote: On May 2,1:05 pm, CnmJbm cnm...@gmail.com wrote: ok, it seems i fixed it on my environment. just delete the R.java (by refreshing the project) and rebuild the project. On May 2, 9:57 am, CnmJbm cnm...@gmail.com wrote: i got the sameerror, TOO!!! May Day On Apr 28, 3:57 pm, chris.cap...@gmail.com chris.cap...@gmail.com wrote: Hi, I just updated to SDK 1.5 and all of my projects are failing to build with the followingerror: [2009-04-28 15:53:23 - Utilities] no classfiles specified [2009-04-28 15:53:23 - Utilities]ConversiontoDalvikformatfailed witherror1 (Utilities is the name of this specific project.) Any idea why? I'm on Ubuntu 9.04 x64. Before the update to 1.5 everything worked fine. Thanks. Chris I got rid of thaterrorand get thiserror, any ideas. I have a similar configuration: [2009-05-02 14:22:39 - HelloWorld]Failedto find an AVD compatible with target 'Android 1.1'. Launch aborted.- 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: Video streaming error in SDK 1.5
Hi Dave... I tried to add mdat atom using Hex editor...Bur When i play the video its give error... Please Can you tell me how can i do the video streaming... Thank You N N --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Neither user 10039 nor current process has android.permission.WAKE_LOCK || Rooted Phone || App from SD card || JF image
Thanks Dianne. Meanwhile it is clear that the bug was happening due to a complication with the whole apps from SD card thing. After a clean install it works now. On Fri, May 8, 2009 at 8:40 AM, Dianne Hackborn hack...@android.com wrote: Cupcake still allows apps to get the wake lock permission. On Thu, May 7, 2009 at 11:09 PM, Mariano Kamp mariano.k...@gmail.comwrote: Hi, I now had this issue twice (see stacktrace below). I am sure that the permission is granted as I declare this in my manifest. Hence the app wouldn't be installed if the user didn't grant the permission. (a) My guess is that it's a rooted phone where the app is started from an SD card (or similar) whereby the original user id has changed after the install. (b) This could be a Cupcake feature. Acquiring wake locks has gone down a similar path as turning GPS on? I am trying to track down (a) with my users, but this takes some time. I meanwhile now that at least one user uses a JF image. Anybody else has experience with that issue? Any idea if (b) might be valid? The app works on my 1.5 emulator and on 400 phones with Cupcake, at least it is installed on them and users don't submit bug reports. So I guess (b) is not the case, but who knows? Cheers, Mariano -- Android Version: sdk=3, release=1.5, inc=126986 -- Memory free: 0.53MB total: 2.75MB max: 16.00MB-- Thread State: RUNNABLE -- NewsRob Version: 2.1.2/212 -- Stacktrace: java.lang.SecurityException: Neither user 10039 nor current process has android.permission.WAKE_LOCK. at android.os.Parcel.readException(Parcel.java:1234) at android.os.Parcel.readException(Parcel.java:1222) at android.os.IPowerManager$Stub$Proxy.acquireWakeLock(IPowerManager.java:178) at android.os.PowerManager$WakeLock.acquire(PowerManager.java:228) at com.newsrob.SynchronizationService.doSync(SynchronizationService.java:109) at com.newsrob.SynchronizationService.access$0(SynchronizationService.java:86) at com.newsrob.SynchronizationService$1.run(SynchronizationService.java:75) at java.lang.Thread.run(Thread.java:1058) -- 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] Geocoder not returning result
Hi, My application that uses geocoding was working fine till last week and now all of a sudden am not getting proper data from the same. I used getLocality() , which was returning CITY name previously. But now it is returning NULL. Is something changed? or Has someone faced the same issue? My application is on SDK 1.0 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: Media Player sound state problems in G1
By the way what are these states 1, 2, 128 etc. Can't android people name it when raising exceptions so that developers could know better what is the cause of exception? I am getting full irritated because of these sound issues particularly with the MediaPlayer and its states in android On May 8, 10:33 am, Sudha sudhaker...@gmail.com wrote: I have nearly 28 sound files in which most of them have the duration less than a second (i.e in milliseconds), to reduce the delay in creating the player everytime, i created a player for each sound file i.e 28 MediaPlayers and each sound file plays on its own player and all the sounds are managed by a separate single thread (FYI only that sound thread can call these methods no other thread can start the sounds explicitly), so I can confirm that all the methos calling is done by a single thread. and regarding the other code, i have posted all what am using and the only other thing which is not here is the constructor which converts the given input stream to a file as the MediaPlayer cannot play sounds directly with a stream. (I am packing all the sounds in a single pack and open it at runtime and give the input stream to Player as it is done in J2ME, so again am converting the given input stream to a file.) Here is the below code of Constructor. protected PlayerImpl(String fileName1, InputStream inputstream) { fileName = fileName1; fileInputStream = inputstream; //Creates a FileOutput pointer to dump the InputStream., with permissions: 662 (rw- rw- -w-) FileOutputStream fOut = null; try{ fOut = Utils.getContext().openFileOutput (fileName,Context.MODE_WORLD_WRITEABLE); } catch(Exception filenotfound){ if (Utils.debugEnabled) android.util.Log.d(Player ERROR,FileOutputStream FAILED!); } //we dump the 'stream here... int n; try { while ((n=inputstream.read(FOS_BUFFER))=0) { fOut.write(FOS_BUFFER, 0, n); } //we close fOut but DO NOT CLOSE fIn !! fOut.close(); } catch (IOException e1) { if (Utils.debugEnabled) android.util.Log.d(Player ERROR,temp file creation FAILED); } } I dont think this Constructor has anything to do with the errors I get, to point-out mostly i found these errors are raised when the device is kept idle for sometime while sounds are playing, the device backlight goes off and device enters the idle state at this point all these exceptions are raised and with less reproducibility my game crashes. does the phone stop the sounds while it goes to standby mode? I have my own code to stop the sounds when an interrupt occurs, so does this conflict with the device method calls? On May 7, 7:59 pm, Marco Nelissen marc...@android.com wrote: Based on the code you posted, the stop called in state 2 is because you call stop() in your OnCompletionListener, which isn't necessary (it's already stopped at that point). I don't see how the other problems could happen with the code you posted, unless you have multiple threads accidentally using the same MediaPlayer, or there is some other code involved that you didn't post. On Thu, May 7, 2009 at 1:36 AM, Sudha sudhaker...@gmail.com wrote: Hi I am using MediaPlayer to play my sounds below is my another post http://groups.google.com/group/android-developers/browse_thread/threa... I tried all the possible ways stated in the above post but could not play sounds accordingly so changed the sound code as below, Now the sounds are working fine and no sound is getting skipped but am getting some errors which i cannot figure why they are coming...? Below are some errors: 1- E/MediaPlayer( 2173): stop called in state 1 2- E/MediaPlayer( 2173): stop called in state 2 the above errors i get frequently and i get the below one's randomly, the game freezes and requires a force close when i encounter the below errors 3- E/MediaPlayer( 2173): setDataSource called in state 2 W/System.err( 2173): java.lang.IllegalStateException W/System.err( 2173): at android.media.MediaPlayer.setDataSource(Native Method) 4- E/MediaPlayer( 2173): setDataSource called in state 128 W/System.err( 2173): java.lang.IllegalStateException W/System.err( 2173): at android.media.MediaPlayer.setDataSource(Native Method) W/System.err( 2173): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:247) 5- E/MediaPlayer( 2173): prepareAsync called in state 128 E/MediaPlayer( 2173): setDataSource called in state 128 W/System.err( 2173): java.lang.IllegalStateException W/System.err( 2173): at
[android-developers] Re: VIM and Android
VIM is just a texteditor (although a good one). you need the android sdk and a java 5 install to compile, what editor you use to code is up to you, even notepad.exe will work ;-) anddev.org might be a good place to start/ look for tutorials :) On May 8, 10:31 am, Alex Jurgensen asquare...@gmail.com wrote: Hi, All, I am forced to use VIM to do all my programming and being new to Adnroid and Java in general but with a background of sorts in Perl, I need to know how to use VIM to write Android Applications. Is this possible? Also, is there any tips and tricks to modifying the Android tutorials for VIM? Regards, Alex, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: AVD creation in Eclipse should be automatic
It says, somewhere, possibly the release notes. Maybe somewhere else that this functionality will be automatic later. S On 8 May 2009, at 10:22, kenjkelly wrote: Hi Folks, In Eclipse, when launching the debugger/emulator, the AVD selection is blank until you manually create an AVD by using a command line. It seems that Eclipse knows, because it asks you, which platform you are using (Android 1.1 vs 1.5 vs 1.5+Google) and it knows what you named the run/debug configuration. So, it really has what it needs to create a default AVD, but it doesn't. End to End funtionality is what makes products great. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] XML Parser, more than 1024 characters per tag
I'm trying to parse a tag using the SAXParserFactory, SAXParser and the XMLReader classes, which contains a String that is bigger than 1024 characters. This gives me two returns in the new String(ch, start, length); inside the public void characters method. Except for making my code more complex, is there any other way I could read ALL the characters at once? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: XML Parser, more than 1024 characters per tag
On May 8, 1:16 pm, Ventrix Kostis P. vent...@gmail.com wrote: I'm trying to parse a tag using the SAXParserFactory, SAXParser and the XMLReader classes, which contains a String that is bigger than 1024 characters. This gives me two returns in the new String(ch, start, length); inside the public void characters method. Except for making my code more complex, is there any other way I could read ALL the characters at once? The solution btw is this: public void characters(char ch[], int start, int length) { if (this.in_text) { String text = new String(ch, start, length); this.myObject.setBigText(this.myObject.getBigText()+text); } } I cannot understand why the XML parser can not read more than 1024 characters. Is this some king of bug? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] EMMA Code coverage and JUnit
I had been surfing for the past one month on this Code coverage. But its disappointing that there is no clear documentation on using EMMA code coverage for Android. case 1: I am trying to execute from Command prompt. I have sucessfully implemented instrumentation class for my application. I would like to go for code coverage. I executed the following command in the cmd line: adb shell am instrument -w -e coverage true com.android.app/ android.test.InstrumentationTestRunner adb shell am instrument -w -e coverageFile /sdcard/codefile.ec com.android.app/android.test.InstrumentationTestRunner Also i have configured to run with sdcard.. I could see that all my test cases are executed but no coverage file is generated at '/ sdcard'. case 2: I am trying to execute from eclipse. When i did all coverage configuration settings and try to run the application, it pops up a message saying, No coverage data file has been written during this coverage session. Please make sure that your application does NOT include EMMA run time libraries or EMMA configurations.Do not terminate java process manually from Eclipse Please do clarify my error. Is there a right solution to get the code coverage for Android applications...? Pradeepa --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Updated to 1.5 and R.java is not regeneratated
Hi I got this under Linux and I solved it by changing authorization of tools files and platform/tools files You must first go in the SDK directory and then chmod +x tools/* and then chmod +x platform/android*/tools/* You need also to have this directories in your PATH. Regards Andre 2009/5/8 LambergaR martin.s...@gmail.com: I am having the same problem. Richards solution doasnt help either. Any advice? On 5 maj, 00:13, Jinru He mikehe1...@gmail.com wrote: Hi, Xavier, I encounter the same problem. and I am pretty sure that I didnot have thegenfolderbefore updating to ADT 0.9 How can i solve this problem? Thanks! On 4月30日, 下午5时54分, Xavier Ducrohet x...@android.com wrote: When updating an old project that doesn't have thegensourcefolder setup, it first detects if thegenfolderalreadyexists, and if so, generates this error. The idea was tonotconvertand pre-existinggenfolder(or file) into an Eclipsesourcefolder. Are you sure you didn't have thegenfolderbefore updating to ADT 0.9? thanks Xav On Thu, Apr 30, 2009 at 2:46 PM, Richard Schilling richard.rootwirel...@gmail.com wrote: O.K. I resolved this. The problem was related to the fact that Eclipse couldn't properly handle thegendirectory that it created. This error is generated: [2009-04-30 14:14:15 - MyApp] /MyApp/genalreadyexistsbutisnota sourcefolder.Convertto asourcefolderorrenameit. So, here's how I resolved this problem: 1. Make sure Android 1.1 platform is selected for the project. 2. Delete thegendirectory - let Eclipse update .classpath (if it asks). 3. Clean the project - Eclipse will regenerate thegendirectory 4. Add the directorygento the Javasourceclasspath if R.java cannot be resolved. 5. Clean the project again. 6. if you still have a problem with the above error showing up, delete thegendirectory again and let Eclipse regenerate it. This should clear up the error. Perhaps a change to the Eclipse plugin or the Eclipse API needs to be made - I don't know. But, at least my projects are building now. Cheers, Richard Schilling Root Wireless, Inc. www.rootwireless.com On Apr 30, 2:34 pm, Richard Schilling richard.rootwirel...@gmail.com wrote: I also get this in the message window: [2009-04-30 14:14:15 - MyApp] /MyApp/genalreadyexistsbutisnota sourcefolder.Convertto asourcefolderorrenameit. Richard On Apr 30, 2:29 pm, Richard Schilling richard.rootwirel...@gmail.com wrote: I have a number of projects that were built and ran just fine under the 1.1 version of the SDK. I'm updating all of my projects. Some projects update with no problem. But, some Eclipse projects don't regenerate R.java properly in thegen directory. I've set the Android platform to 1.1. I've cleaned the project. I've refreshed the project. R.java is stillnotbeing generated. Help! This issue prevents production applications from being bult at the moment. Richard Schilling Root Wireless- Hide quoted text - - Show quoted text - -- Xavier Ducrohet Android Developer Tools Engineer Google Inc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Android : MapView : slow loading of the map
Hi I got the G1. When I am loading my mapview, mpa is getting displayed but it is taking time. so I want to give my own loading background and when the map gets loaded fully then I want to switch it to the map. Any cluse to do 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] run signed apps from eclipse
is there a way to let eclipse compile always a signed app and run it on the mobile/emulator I nearly never use debug and so always when i switch between my developing app and the app i publish i have to deinstall the app. quit nerving. would be way cool if there is an option to automate the signing so i always work with the same packet. chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Skin Size 800x600px .. how to
thats the reason i like to do that :) On May 8, 2:01 am, Dianne Hackborn hack...@android.com wrote: But note that this isn't currently supported by the platform, so what you get here is not much you should base your development on. It's nice to be pro-active and see how your app might scale itself of course. :) On Thu, May 7, 2009 at 2:01 PM, Raphael r...@android.com wrote: On Thu, May 7, 2009 at 1:44 PM, guruk ilovesi...@gmail.com wrote: Hi, I would like to see how my app works on a 800x600 android netbook. how can i setup an emulator with this size? $ android create avd --name myavd --target 2 --skin 800x600 $ emulator @myavd R/ -- 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] run signed apps from eclipse
is there a way to let eclipse compile always a signed app and run it on the mobile/emulator I nearly never use debug and so always when i switch between my developing app and the app i publish i have to deinstall the app. quit nerving. would be way cool if there is an option to automate the signing so i always work with the same packet. chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Transparency on Views behaving differently in 1.5
Raphael wrote: Is this on the emulator or on a real device? Please enter a bug at http://b.android.com with a working piece of code that exhibits the issue and SDK details (sdk, OS, emu vs device, etc.) Thanks in advance. I have not had an opportunity to recreate the problem in a smallish project, but I have had similar issues. #FF00, in some circumstances, behaves as fully transparent rather than black, but #FF01 is near-black. I will try to isolate this and post it to http://b.android.com when I get an opportunity. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Training: http://commonsware.com/training.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: Testing sample plugin on Android
Maha wrote: I have seen a plugin in android under the following path /data/data/com.android.browser/app_plugins/browsertestplugin.so Please anyone tell me how to test this plugin Questions about the Android firmware are best asked in a discussion list pertaining to the Android firmware: http://source.android.com/discuss -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Training: http://commonsware.com/training.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: SharedPreferences got deleted! - What could be the problem?
I don't see anything in that example, but until http://code.google.com/p/android/issues/detail?id=1707 is released, I have been escaping all user generated strings before saving them. This has cut down my user complaints after I figured out they were putting these problem characters into the fields. On May 7, 4:22 pm, so_is festival.s...@googlemail.com wrote: Well I know this bug. Here are the characters which can be in my settings file: http://paste.pocoo.org/show/lqqABv2lblNz1Bkh9XNs/ Is there anything that could cause problems? On May 7, 3:18 pm, dar dher...@gmail.com wrote: Try putting in xml special characters into the strings you are saving directly with the editor without xml-escaping them, e.g. ' and see if this reproduces the problem when you try to read in the saved preferences after your app has been killed (after a reboot, for example). On May 7, 5:24 am, so_is festival.s...@googlemail.com wrote: Thank you very much for your comment Mark. Well at the moment I am prior to redo the whole preferences saving my settings into a Sqlite database. I can not find the bug in my code and my app relies on this settings so I don't see any other chance to get rid of the lost settings bug. On May 6, 12:56 pm, Mark Murphy mmur...@commonsware.com wrote: so_is wrote: Well Mark the problem is that I am using the suggested way to save the settings. I do commit every single edit() like suggested. But a lot of users are still reporting that they lose settings. I don't know why but it happens some times. :( (I have worked with my app for 2 months now and have never lost the settings) It will be difficult to fix the bug without a repeatable scenario. To sum up I don't like the suggestion using Sqlite because I would just ignore a bug which is obviously there but no one knows what it really is. If you can come up with a repeatable scenario for theSharedPreferences damage, post an issue tohttp://b.android.comwithaprojectand instructions for causing the problem. Otherwise, if I were in your shoes, I would switch to some other means (e.g., SQLite) of storing the data you are storing inSharedPreferences, simply to make your users happy. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] setBackground method fix an issue on my layout?!!
Hi all, I would like to share with a strange behaviour... A linearlayout contains an ImageView. When user does a specific action, I add another ImageView outside the screenHeight, generate an animation to slide from the current ImageView to the new added. on AnimationEnd I set the layout size exactly to the ImageView size. If I do this, my screen flashes and the application is not really beautiful. Testing, I added a setBackgroundColor on my ImageView to see what happens exactly (a way to debug)...This method fix the animation: the screen doesn't flash. I don't understand...I try to add a setBackgroundColor to transparent: it's flashing I try invalidate on ImageView, it's flashing... Why is the problem fixed when I set a background and not using forcelayout, invalidate? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 have singleInstance of the activity and relay information back to parent.
I basically have three activities X, Y, Z and I want only one instance of each but I want control over the navigation and I can't do that by putting all three activities in one task because of the stack structure. Here is a scenario, from X I launch Y given a certain id which correspondence to specific data in the DB, Y inflates and populates it's views, then I go back to X and launch Y again with a different id in the intent, I don't want the overhead of launching the activity and inflating the views again, anyone know how to do this? I tried using singleInstance, but the problem is that I can't send the result code back to an activity in a different task. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Ideas behind Android's task concept
As far as contacts goes, though, this is actually intentional -- some apps (like contacts and settings) want to put the user back to their front door when relaunched from home, so they set the option to do that. This is actually a desired inconsistency. Right, I realise it's intentional. What I'm unclear on is, why these apps are special? I presume usability testing revealed this is the behavior users expected. In which case why not reset task stacks for every app? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] EMMA Code coverage and JUnit
Can anybody help me on Code coverage? I have sucessfully created a testing environment and able to execute the Instrumentation. I would like to get a code coverage report. But i dont see any documentation on this topic where as the Docs say that -e coverage true would create a '.ec' file in /sdcard/. I never got any such file even after the sucessful execution of all my test cases. case 1: I tried in command prompt: adb shell am instrument -w -e coverage true com.android.example.app/ android.test.InstrumentationTestRunner adb shell am instrument -w -e coverageFile /sdcard/mytestresult.ec com.android.example.app/android.test.InstrumentationTestRunner But no report got generated. case 2: I tried from Eclipse. I made all coverage configurations (adding external emma.jar files) and when called on for coverage, it pops a window stating, No coverage data iw written during the coverage session. Please make sure that the project does NOT include EMMA runtime libraries or EMMA Configuration settings.Do not terminate java process manually from Eclipse Its a wired reply ever i experienced. Please reply a detailed way to proceed for code coverage. This wil definetly help me and and other too... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] EMMA Code coverage and JUnit
Can anybody help me on Code coverage? I have sucessfully created a testing environment and able to execute the Instrumentation. I would like to get a code coverage report. But i dont see any documentation on this topic where as the Docs say that -e coverage true would create a '.ec' file in /sdcard/. I never got any such file even after the sucessful execution of all my test cases. case 1: I tried in command prompt: adb shell am instrument -w -e coverage true com.android.example.app/ android.test.InstrumentationTestRunner adb shell am instrument -w -e coverageFile /sdcard/mytestresult.ec com.android.example.app/android.test.InstrumentationTestRunner But no report got generated. case 2: I tried from Eclipse. I made all coverage configurations (adding external emma.jar files) and when called on for coverage, it pops a window stating, No coverage data iw written during the coverage session. Please make sure that the project does NOT include EMMA runtime libraries or EMMA Configuration settings.Do not terminate java process manually from Eclipse Its a wired reply ever i experienced. Please reply a detailed way to proceed for code coverage. This wil definetly help me and and other too... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: App-independent Storage of Shared Resources/Media
On 7 Mai, 18:14, Mark Murphy mmur...@commonsware.com wrote: I'm in a situation where I have to share some resources (i.e. images) between several of my apps and I'd like to know if there's a standardized and convenient way to do this besides the system-wide Media Store. If they can be packaged as actual resources, resources can be shared among apps. There was a thread about this recently -- Ms. Hackborn supplied the relevant API (should either be in PackageManager or Resources, I forget which). Thanks, that was exactly what I needed! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] why webview swap load new url only after animation?
Hi, i need to load several url to a webview in animated transition. i used 2 webviews; prev_view and next_view. if we click on next button, next_view will appear with right to left animation covering the prev_view underneath. on back press. next_view will move left to right showing the prev_view. like a book pages problem: as i have 100 urls(local html files) to load on webview, each time i need to load new url while animation but it does animate the old one and after animation end shows the new url. is it possible to disable the cache and load new url while animation? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Does SimpleDateFormat no longer throw a ParseException?
As a quick update, I checked the changelog for 1.5 and couldn't find any mention of this, but this clearly changed. People are writing me know how the date handling in my app stopped working after they upgraded to 1.5. This seems like a bug to me, unless there is another place in the Android docs with a changelog that I haven't seen. -Mike On May 6, 8:18 am, EboMike ebom...@gmail.com wrote: In an 1.5 environment, it seems likeSimpleDateFormat.parse() no longer throws an exception if it can't parse the string - it simply returns null. Did that change? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Recent-apps dialog revives finish()'ed activities
We've got a problem on 1.5 with the task switcher dialog (which, by the way, I love and am very grateful for). We've got a couple of notificationy activities which close, and call finish(), and should never be seen again. But, under some circumstances, these can be seen and switched to via the task switcher. I think this happens when they are the last activity left for the task. What's the proper way to kill these things off ? I've looked at the flags on Activity, but none of them seem to be the right thing. Thanks, Richard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Ideas behind Android's task concept
Isn't that the same model that is used on the Desktop?Launching an app usually puts you in a clean state, but switching back to a running instance (Alt/Cmd+Tab) brings you to the screen of the app you were most recently on.That makes perfect sense to me. Actually now that I learned about android:clearTaskOnLaunch [use in contactshttp://android.git.kernel.org/?p=platform/packages/apps/Contacts.git;a=blob;f=AndroidManifest.xml;h=71a90eb3b6f4d1a7285a462d0965aeb6660506ca;hb=HEAD#l149] here, I can finally try to get my app to behave like I would expect it to. This discussion is very enlightening. Dianne that would be a great topic for a blog post of yours, wouldn't it? ;-) On Fri, May 8, 2009 at 3:07 PM, Mike Hearn mh.in.engl...@gmail.com wrote: As far as contacts goes, though, this is actually intentional -- some apps (like contacts and settings) want to put the user back to their front door when relaunched from home, so they set the option to do that. This is actually a desired inconsistency. Right, I realise it's intentional. What I'm unclear on is, why these apps are special? I presume usability testing revealed this is the behavior users expected. In which case why not reset task stacks for every app? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: OnfocusChangeListener question
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: conversion to dalvik format failed with error 1
I got this error frequently right after updating ADT. Turned out that I had updated my ADT instead of uninstall/install. I had to manually cleanse my eclipse install to get rid of references to 0.8 On May 8, 3:02 am, kenjkelly kenke...@kenkelly.com wrote: My guess is that the 1.5 release relies on something that gets built after it is needed. Thus the Clean fails but then it works on the next build. Can someone who worked on the Eclipse Plugin for 1.5 check that out? Incase it is important, I am using the 1.5 with Google libs selection. Ken Kelly On May 8, 3:34 am, Kamal Hasan kamal.hasa...@gmail.com wrote: Hi My project was running perfectly and when I cleaned the project then It started to give the following error. [2009-05-08 12:47:24 - MobilChek] no classfiles specified [2009-05-08 12:47:24 - MobilChek] Conversion to Dalvik format failed with error 1 Pls help me in resolving this issue. Kamal On May 4, 2:53 am, Justin (Google Employee) j...@google.com wrote: Did you update your plugin? If so, did you create either a 1.1 AVD or a 1.5 w/Google Maps AVD? Cheers, Justin Android Team @ Google On May 2, 10:59 am, Berlin Brown berlin.br...@gmail.com wrote: On May 2,1:05 pm, CnmJbm cnm...@gmail.com wrote: ok, it seems i fixed it on my environment. just delete the R.java (by refreshing the project) and rebuild the project. On May 2, 9:57 am, CnmJbm cnm...@gmail.com wrote: i got the sameerror, TOO!!! May Day On Apr 28, 3:57 pm, chris.cap...@gmail.com chris.cap...@gmail.com wrote: Hi, I just updated to SDK 1.5 and all of my projects are failing to build with the followingerror: [2009-04-28 15:53:23 - Utilities] no classfiles specified [2009-04-28 15:53:23 - Utilities]ConversiontoDalvikformatfailed witherror1 (Utilities is the name of this specific project.) Any idea why? I'm on Ubuntu 9.04 x64. Before the update to 1.5 everything worked fine. Thanks. Chris I got rid of thaterrorand get thiserror, any ideas. I have a similar configuration: [2009-05-02 14:22:39 - HelloWorld]Failedto find an AVD compatible with target 'Android 1.1'. Launch aborted.- 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: ExampleAppWidget won't run
Got it! Thanks! On May 7, 7:22 pm, Jeff Sharkey jshar...@android.com wrote: So you don't really launch AppWidgets. Once you've installed them, they will appear in the long-press menu on the home screen. j On Thu, May 7, 2009 at 6:54 PM, Zia zia.cha...@gmail.com wrote: Does AppWidget works in the latest 1.5 release? I've upgraded to r1.5 but not able to launch any Appwidget related activity. Neither this nor SimpleWiktionary. Beside the upgrade instructions for r1.5 is there anything else I am suppose to configure to get AppWidget working on the emulator? Thanks, Zia On Apr 15, 5:24 pm, Jeff Sharkey jshar...@android.com wrote: Looks like there were some other things that needed to be fixed in that example. There's a full fix coming in the final 1.5, but here's a quick diff: http://pastebin.com/f1a0f7408 j On Wed, Apr 15, 2009 at 4:32 PM, Jeff Sharkey jshar...@android.com wrote: Hmm I was able to get it working fine. Did you include an intent-filter? Without a filter, it assumes the activity is private and won't let other apps launch it. (You could also use android:exported=true.) activity android:name=.appwidget.ExampleAppWidgetConfigure intent-filter action android:name=android.appwidget.action.APPWIDGET_CONFIGURE / /intent-filter /activity Thanks for catching this! :) j On Wed, Apr 15, 2009 at 12:01 PM, jason...@spy.net jasonleehudg...@gmail.com wrote: I can't seem to get the ExampleAppWidget that comes in pre-1.5 to run, I added the Configure activity to the ApiDemos manifest, but now I'm getting this when I try to install the widget in the Home/Launcher app.. E/AndroidRuntime( 842): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=9, result=-1, data=Intent { (has extras) }} to activity {com.android.launcher/ com.android.launcher.Launcher}: java.lang.SecurityException: Permission Denial: starting Intent { action=android.appwidget.action.APPWIDGET_CONFIGURE comp= {com.example.android.apis/ com.example.android.apis.appwidget.ExampleAppWidgetConfigure} (has extras) } from ProcessRecord{43739f88 842:android.process.acore/10002} (pid=842, uid=10002) requires null E/AndroidRuntime( 842): at android.app.ActivityThread.deliverResults (ActivityThread.java:3005) E/AndroidRuntime( 842): at android.app.ActivityThread.handleSendResult(ActivityThread.java:3047) E/AndroidRuntime( 842): at android.app.ActivityThread.access$2300 (ActivityThread.java:112) E/AndroidRuntime( 842): at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1721) E/AndroidRuntime( 842): at android.os.Handler.dispatchMessage (Handler.java:99) E/AndroidRuntime( 842): at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime( 842): at android.app.ActivityThread.main (ActivityThread.java:3948) E/AndroidRuntime( 842): at java.lang.reflect.Method.invokeNative (Native Method) E/AndroidRuntime( 842): at java.lang.reflect.Method.invoke (Method.java:521) E/AndroidRuntime( 842): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:782) E/AndroidRuntime( 842): at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:540) E/AndroidRuntime( 842): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 842): Caused by: java.lang.SecurityException: Permission Denial: starting Intent { action=android.appwidget.action.APPWIDGET_CONFIGURE comp= {com.example.android.apis/ com.example.android.apis.appwidget.ExampleAppWidgetConfigure} (has extras) } from ProcessRecord{43739f88 842:android.process.acore/10002} (pid=842, uid=10002) requires null E/AndroidRuntime( 842): at android.os.Parcel.readException (Parcel.java:1234) E/AndroidRuntime( 842): at android.os.Parcel.readException (Parcel.java:1222) E/AndroidRuntime( 842): at android.app.ActivityManagerProxy.startActivity (ActivityManagerNative.java:1046) E/AndroidRuntime( 842): at android.app.Instrumentation.execStartActivity(Instrumentation.java: 1449) E/AndroidRuntime( 842): at android.app.Activity.startActivityForResult(Activity.java:2656) E/AndroidRuntime( 842): at com.android.launcher.Launcher.startActivityForResult(Launcher.java: 837) E/AndroidRuntime( 842): at com.android.launcher.Launcher.addAppWidget (Launcher.java:954) E/AndroidRuntime( 842): at com.android.launcher.Launcher.onActivityResult(Launcher.java:332) E/AndroidRuntime( 842): at android.app.Activity.dispatchActivityResult(Activity.java:3595) E/AndroidRuntime( 842): at android.app.ActivityThread.deliverResults (ActivityThread.java:3001) -- Jeff
[android-developers] Video streaming error in SDK 1.5
the moov and mdat atoms should already be there, (IIRC) they are required for a well-formed movie file. the moov atom provides metadata for the movie, and the mdat atom provides the actual content. however, if the file is being streamed, the client needs to know the metadata before the actual content arrives, therefore the moov atom must be ahead of the mdat atom. can't stream the stuff in the mdat if you don't know what format it is. there are some tools around to swap the atom order so that a file is streamable, but doing it yourself is reasonably straightforward. one way is to go through the file remembering the positions and sizes of the atoms, then reorder the list, and write out a new copy of the file with everything in the right place. check the Qt file format docs. i will have to do this too at some point but i don't know whether at some point is good enough for your schedule. hth j Hi Dave... I tried to add mdat atom using Hex editor...Bur When i play the video its give error... Please Can you tell me how can i do the video streaming... Thank You N N -- jason.software.particle --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Media Player sound state problems in G1
On Fri, May 8, 2009 at 2:31 AM, Sudha sudhaker...@gmail.com wrote: By the way what are these states 1, 2, 128 etc. 1 is 'idle' 2 is 'initialized' 128 is 'playback complete' (see mediaplayer.h) So let's take another look at the error messages you were seeing: 1- E/MediaPlayer( 2173): stop called in state 1 This means you called MediaPlayer.stop() while the MediaPlayer was 'idle', i.e. never initialized. This should be harmless, but I don't see how it could happen with the code you posted, since you only seem to be calling stop() from your OnCompletionListener, and in order for your OnCompletionListener to be called, the MediaPlayer would have to be initialized, and in any case would be in the 'playback complete' state. 2- E/MediaPlayer( 2173): stop called in state 2 I made a comment about this one in my earlier reply, but that comment was wrong. This one means you called stop() in the 'initialized' state, which is the state MediaPlayer is in once you call setDataSource(). Not sure how this would happen with the code you posted, since you appear to always be following a call to setDataSource() with a call to start(). 3- E/MediaPlayer( 2173): setDataSource called in state 2 This means you're calling setDataSource() twice in a row. Again, not sure how this could happen with the code you posted, and given that you said you only have one thread. 4- E/MediaPlayer( 2173): setDataSource called in state 128 This means you're calling setDataSource() after playback has completed, without first resetting the MediaPlayer to its uninitialized state by calling reset(). Not sure how this could happen with the code you posted, since you call stop() and reset() in your OnCompletionListener. 5- E/MediaPlayer( 2173): prepareAsync called in state 128 E/MediaPlayer( 2173): setDataSource called in state 128 W/System.err( 2173): java.lang.IllegalStateException W/System.err( 2173):at android.media.MediaPlayer.setDataSource(Native Method) This one looks a bit suspicious, since it complains about both prepareAsync and setDataSource at the same time, and you're not even calling prepareAsync() in the code you posted. 6- E/MediaPlayerService( 31): offset error E/MediaPlayer( 2173): Unable to to create media player You would get this when using the (filedescriptor+offset+length) parameters for playback, and the offset is past the end of the file. Since you're only specifying a filedescriptor, and aren't using the offset/length parameters, it can only mean that the file you tried to play had a size of zero. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Media Player sound state problems in G1
On Thu, May 7, 2009 at 10:33 PM, Sudha sudhaker...@gmail.com wrote: I have nearly 28 sound files in which most of them have the duration less than a second (i.e in milliseconds), to reduce the delay in creating the player everytime, i created a player for each sound file i.e 28 MediaPlayers and each sound file plays on its own player and all the sounds are managed by a separate single thread (FYI only that sound thread can call these methods no other thread can start the sounds explicitly), so I can confirm that all the methos calling is done by a single thread. I would suggest using SoundPool instead. 28 MediaPlayers is a bit much. and regarding the other code, i have posted all what am using and the only other thing which is not here is the constructor which converts the given input stream to a file as the MediaPlayer cannot play sounds directly with a stream. (I am packing all the sounds in a single pack and open it at runtime and give the input stream to Player as it is done in J2ME, so again am converting the given input stream to a file.) You should pack these sounds as resources in your apk, and then play them by resource id or using an AssetFileDescriptor. (you can do this with both MediaPlayer or SoundPool) (...) does the phone stop the sounds while it goes to standby mode? I have my own code to stop the sounds when an interrupt occurs, so does this conflict with the device method calls? Unless you specifically tell the phone to stay awake (by using a partial wakelock, for example), it may go to sleep, and will stop audio playback while it sleeps. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 Frozen! :(
Nevermind - I updated JRE, and it works. On May 6, 11:46 pm, mcmc manni...@gmail.com wrote: Hello all, My code compiles, but when I try running the emulator, it does not get past the splash screen... does anyone know how I can fix this? I need all the help I can get - quite desperate here... :( Thanks a bunch. mcmc --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Ideas behind Android's task concept
On Fri, May 8, 2009 at 6:07 AM, Mike Hearn mh.in.engl...@gmail.com wrote: Right, I realise it's intentional. What I'm unclear on is, why these apps are special? I presume usability testing revealed this is the behavior users expected. In which case why not reset task stacks for every app? Because you don't want this for every app. If we had a task switcher at the core of the UI like the app launcher, you could make an argument for launching always restarting the app. In fact, early versions of the UI were like that. We found it to be too confusing. So we settled on a single primary way to launch/switch apps, which would reset certain apps when that is nearly always what you want. -- 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: Ideas behind Android's task concept
On Fri, May 8, 2009 at 8:08 AM, Mariano Kamp mariano.k...@gmail.com wrote: This discussion is very enlightening. Dianne that would be a great topic for a blog post of yours, wouldn't it? ;-) Hopefully we can have full UI design docs for this. :) I kind-of avoid writing blog posts, because that would take the last little bit of time I have for coding these days. :/ (Or I guess I could take the time I spent reading and posting to these groups. :p) Anyway, I'll see. The material I wrote in the application model docs was supposed to explain a lot of 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: Recent-apps dialog revives finish()'ed activities
The one you want is android:excludeFromRecents on your Activity that gets launched from the notification. On Fri, May 8, 2009 at 8:00 AM, jarkman jark...@gmail.com wrote: We've got a problem on 1.5 with the task switcher dialog (which, by the way, I love and am very grateful for). We've got a couple of notificationy activities which close, and call finish(), and should never be seen again. But, under some circumstances, these can be seen and switched to via the task switcher. I think this happens when they are the last activity left for the task. What's the proper way to kill these things off ? I've looked at the flags on Activity, but none of them seem to be the right thing. Thanks, Richard -- 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] How to set context menu header title in XML?
Hi all, Do you know how to set the header title of a menu in the XML file? The function that I call is the following: ContextMenu menu = ; menu.setHeaderTitle(title); 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] Fwd: Business and Corporate Scandals ... and how to earn money
Corporate Scandals http://wealert.blogspot.com/ - Tyco Internationalhttp://wealert.blogspot.com/2009/05/tyco-international.html - Kanebo Limitedhttp://wealert.blogspot.com/2009/05/kanebo-limited.html - Health South Corporationhttp://wealert.blogspot.com/2009/05/health-south-corporation.html - American International Group (AIG)http://wealert.blogspot.com/2009/05/american-international-group-aig.html - Satyam Computer Serviceshttp://wealert.blogspot.com/2009/05/satyam-computer-services.html - Dell Accounting Scandal 'Not A Happy Story' - CFOhttp://wealert.blogspot.com/2009/05/dell-accounting-scandal-not-happy-story.html - The Parmalat Scandalhttp://wealert.blogspot.com/2009/05/parmalat-scandal.html - Merck Accounting Scandalhttp://wealert.blogspot.com/2009/05/merck-accounting-scandal.html - Xerox Accounting Scandalhttp://wealert.blogspot.com/2009/05/xerox-accounting-scandal.html - Fannie Mae Accounting Scandalhttp://wealert.blogspot.com/2009/05/fannie-mae-accounting-scandal.html - Chrysler's Holdoutshttp://wealert.blogspot.com/2009/05/chryslers-holdouts.html - Karachi Transport Ittehad (KTI) announces wheel ja...http://wealert.blogspot.com/2009/05/karachi-transport-ittehad-kti-announces.html - Police conspiring to launch 92-like operation: MQM...http://wealert.blogspot.com/2009/05/police-conspiring-to-launch-92-like.html - Kalia, Khanani held in forex scandalhttp://wealert.blogspot.com/2009/05/kalia-khanani-held-in-forex-scandal.html - The AIG Scandal Continueshttp://wealert.blogspot.com/2009/05/aig-scandal-continues.html - Summary of the Enronhttp://wealert.blogspot.com/2009/05/summary-of-enron.html - KPMG scandal http://wealert.blogspot.com/2009/05/kpmg-scandal.html - Arthur Andersen scandalhttp://wealert.blogspot.com/2009/05/arthur-andersen-scandal.html - Cash Vanishes from Merchants' Accountshttp://wealert.blogspot.com/2009/05/cash-vanishes-from-merchants-accounts.html - The Enron Collapsehttp://wealert.blogspot.com/2009/05/enron-collapse.html - The Satyam Scandalhttp://wealert.blogspot.com/2009/05/satyam-scandal.html Apna Paisa - Win Cellphonehttp://feedproxy.google.com/%7Er/blogspot/iipK/%7E3/OGcE4Ki9WZs/win-cellphone.html - www.oprah.com/kfc - Oprah KFC Coupons Freehttp://feedproxy.google.com/%7Er/blogspot/iipK/%7E3/vc22NrymQBE/wwwoprahcomkfc-oprah-kfc-coupons-free.html - Share Your File Earn Dollars From Ziddu.comhttp://feedproxy.google.com/%7Er/blogspot/iipK/%7E3/k1St5O4g-GA/share-your-file-earn-dollars-from.html - Earn Points and Cash With Cashle | Points2Shophttp://feedproxy.google.com/%7Er/blogspot/iipK/%7E3/GBcG27odrJU/earn-points-and-cash-with-cashle.html - Earn Cash By Submit Your Articles, Files Documentshttp://feedproxy.google.com/%7Er/blogspot/iipK/%7E3/_U_e2bCSjR0/earn-cash-by-submit-your-articles-files.html Apnay Classified Ads - CAR FOR SALEhttp://feedproxy.google.com/%7Er/ApnayClassifiedAds/%7E3/-xg7ZWun1zY/car-for-sale.html - Habib Motorcycle Model Aug 2008 PKR 35000http://feedproxy.google.com/%7Er/ApnayClassifiedAds/%7E3/ETGKJBVf1N8/habib-motorcycle-model-aug-2008-pkr.html - Coaching Center Teaching vacancyhttp://feedproxy.google.com/%7Er/ApnayClassifiedAds/%7E3/XISk1REtm-k/coaching-center-teaching-vacancy.html - need to learn PHP, Mysql and Ajexhttp://feedproxy.google.com/%7Er/ApnayClassifiedAds/%7E3/CpPvrLO2FJs/need-to-learn-php-mysql-and-ajex.html - Home Tuitionhttp://feedproxy.google.com/%7Er/ApnayClassifiedAds/%7E3/WOukhjaTMSA/home-tuition.html Body Building - Cable Crossovershttp://feedproxy.google.com/%7Er/blogspot/PNba/%7E3/Ee6zojstQE4/cable-crossovers.html - Body Building Techniqueshttp://feedproxy.google.com/%7Er/blogspot/PNba/%7E3/XqWKYkYU-uk/create-your-own-banner-at.html - Lower back painhttp://feedproxy.google.com/%7Er/blogspot/PNba/%7E3/CFOJ3JDf9JA/lower-back-pain.html - Building strong Abshttp://feedproxy.google.com/%7Er/blogspot/PNba/%7E3/k4MaBImVz4w/building-strong-abs.html - Muscle building tipshttp://feedproxy.google.com/%7Er/blogspot/PNba/%7E3/_6Ig2VRsTcY/muscle-building-tips.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] ADT plugin... error 404
since very recently https://dl-ssl.google.com/android/eclipse/ is on error (404) could someone at google can fix it ? ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] IME sample in the SDK
Hi, I want to create a new on-screen-keyboard, and I thought that a good start point will be to see how the SoftKeyboard sample in the SDK (under the SDK folder: android-sdk-windows-1.5_r1\platforms \android-1.5\samples\SoftKeyboard) works. But it doesn't! I run it in Eclipse. So, it compile, then the emulator starts, and under Settings-Localetext I see the new keyboard. But it does not show up when I click on a textbox. Only the regular on- screen keyboard appears. Am I missing something? Thanks ahead, Menny --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 v. 1.5 = FAIL #2: Directly Manipulating Settings
Sounds a little bit backward. It forces me to manually switch options on off, loosing my time. It basically forbids me to delegate this to my app, which is bad. There are many valid reasons why apps need to activate GPS, while I want to keep it off by default, use cases that come immediatly to mind: -) DroidTracker. Why should I have my GPS turned on all the time if it's needed twice an hour? -) ToogleGPS. Why should I have to go through the Settings app, if pressing on button on the home screen is enough. Hint: Pressing one button on the homescreen is way safer and easier than trying to navigate the settings while driving. -) Navigation. Why does my nav app forces me to manually enable GPS? (It suggests visiting Settings.) -) refining locations. E.g. for many cases where location based decisions are needed, it might be enough to monitor the GSM/UMTS cell location, and switch on GPS only when entering interesting cells. Example would be an app that turns on Wifi only when I near home, depending where, the cell location might be enough, but in the country you can have rather big cells. Furthermore, why does Android do not provide a fast UI to change all these settings? (Guess the fact that there are some dozen settings changing apps from the simple ToogleGPS to apps that reconfigure the phone based on rules got lost on the Google guys. Guess satisfying a demand is irrelevant to them.) Guess you could build an even safer and even more consistent user experience by disallowing any 3rd party apps to be installed? If you want to put me into the driver seat with my G1, well, I could think of a number ideas: -) allow/disallow net access dynamically. E.g. relevant when data is getting expensive: E.g. Email might be allowed to work even with data roaming, all other apps not. -) allow the user to control how a connection is built, e.g. via carrier or via Wifi. -) allow the user to see which network connections/URLs where done by an app. -) allow the user to control which network connections/URL fetches are allowed. -) warn the user about apps that share permissions. (two apps that share uid have also a shared set of permissions that is the union of both). -) allow the user to see which app uses GPS, Bluetooth, and so on. Basically, you are claiming to help the user to have control of the device, but what if the user wants these changes to happen based on some rules? And while you are closing some theoretical loop hole (e.g. somebody could track my location), this seems rather stupid: GPS and Bluetooth that have this dangerous connotations both display an icon in the notification bar. So any clandestine use of it would get noticed rather fast, even if not by all users, enough users would notice and raise a stink. OTOH, you have no problem with leaving the user at the mercy of the developers when it comes to data connectivity. Which is way more complicated to detect, and if you avoid doing your sinister plot while on Wifi, very hard to detect. (When the BadApp keeps silent while on Wifi, the only simple way to catch it by inspecting the data traffic with a sniffer is gone, ...) Andreas On 24 Apr., 17:34, Jean-Baptiste Queru j...@android.com wrote: All right, here's the deal: One of the reasons that motivated the change is battery life, which is a major point of frustration for many Android users. More precisely, we've noticed in our testing that there was a strong correlation between user complaints about battery life and specific applications being installed, and a deeper investigation showed that those apps were indeed causing poor battery life by turning hardware on in a way that users weren't expecting. Restricting access to those settings through an explicit UI was found to be an appropriate mechanism for users to known precisely enough what was going on and to get appropriate expectations about battery life. Another reason that motivated the change is an overall concern about privacy and abuse. There've been concerns that changing settings like GPS, data roaming, wifi, airplane mode without the user's explicit action for each operation was inappropriate. Both of those areas were broadly reported by users, by carriers, and in the press. 1.5 addresses those concerns based on the feedback that we're received, by putting the user in better control of their phone. JBQ On Fri, Apr 24, 2009 at 7:19 AM, chrispix chris..@gmail.com wrote: While I read the blog here :http://android-developers.blogspot.com/2009/04/future-proofing-your-a...248 I almost had a heart attack. Having a location based application, the number one issue we had was being able to automatically turn on / off GPS based on an application setting. Which quite frankly makes some sense. Having to prompt the user each time to turn on / off gps is a giant pain from the standpoint of program flow. I have used our applications setting to actually turn GPS off, because it was faster to open our
[android-developers] OutOfMemoryError when changing screen orientation
Hi, I get an OutOfMemoryError every time i change the screen orientation and I am having a hard time finding the mistake... The Activitie's view consists of an ImageView, two Buttons and a Spinner. I don't have static variables and can't imagine where i could leak a context. Most of the times, the exception is thrown at setContentView (R.layout.upload); sometimes it goes fine until imgUpload.setImageURI(imageURI); The images i am displaying are form the G1's camera, so about 500kb and 2048x1536pixels Here is some code: - private ImageView imgUpload; private Spinner spnCollections; private Button btnEditMetadata; private Button btnUpload; private Uri imageURI; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.upload); // Get View References imgUpload = (ImageView) findViewById(R.id.imgUpload); spnCollections = (Spinner)findViewById(R.id.spnCollections); btnEditMetadata = (Button) findViewById(R.id.btnEditMetadata); btnUpload = (Button)findViewById(R.id.btnUpload); // Get Image from ACTION_SEND Intent Intent intent = getIntent(); if (intent.getAction() != null intent.getAction().equals (Intent.ACTION_SEND)) { Bundle extras = intent.getExtras(); imageURI = (Uri)extras.getParcelable(Intent.EXTRA_STREAM); imgUpload.setImageURI(imageURI); } ... - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 connect to a Wifi network behind a proxy?
Hi! Is there a way to connect to a WiFi behind a proxy? Could this be possible with a third-party application? Sorry about my poor english. Thank you all for your excellent work. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to play voice files on Touch Event
When want to play voice files on Touch Event. I have a piano Keyboard on Screen, when user Touch move on piano keys, play its' voice files. Issue: I used two way for trails 1. in Touch Move event, check x, y to avoid play twice in same Key region. And when Touch move to a new key region, play the Key voice once. 2. Use Handler Functions for the play action. But when user move touch quickly, both ways cannot play every key voice files in the process. sometime, only the first and last have been played. Do you any suggestions for that? Thanks a lot --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Urgent! can't update apps in market. No error message
Really? On my own device, I can uninstall the previous version and install the new version even signed with a different key. There must be a way for the developer to upload the new version with a different key in the Android Market. It makes sense for many possible scenarios. 1) the developer lost the original key, e.g. after the laptop was stolen; 2) the original private key was leaked out or hacked by someone else; ... Does anyone know how to solve the problem or know who could help in the Google company? Thanks, On May 7, 2:05 pm, Marco Nelissen marc...@android.com wrote: On Thu, May 7, 2009 at 8:36 AM, android app xiaog...@gmail.com wrote: I uploaded the new updates to the application in the market. There was no error message shown. It seemed that the uploading was successful. However, the version name and the app itself were still the old version. Please help!!! FYI: I lost the original private key or the keystore file. I generated a new keystore file to sign the app. I also met the minSDK problem and solved it by set the minSDKversion in the manifest file. There must be a way to update the app. I don't want to upload the app as an new application since there is a large base of existing customers. If you signed your app with a different key, then it's not possible to upgrade previous versions to the new version. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How can LongPress action be detected?
Hi, I have a broadcast receiver for my app and it is trying to detect a longpress event on a wired headset? Can someone provide a sample code to distinguish between a quick press vs a long press on a wired headset? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 display virtual keyboard
I am a new guy on android study, and I also research the soft keyboard. I had made a qwerty.xml, but I do not know how to show this keyboard? I had only used setcontentview(minputview); i t can be , but the screen only show the keyboard... my code: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); mQwertyKeyboard = new LatinKeyboard(this, R.xml.qwerty); onCreateInputView(); setContentView(mInputView); } public View onCreateInputView() { mInputView = (KeyboardView) getLayoutInflater().inflate( R.layout.input, null); mInputView.setOnKeyboardActionListener(this); mInputView.setKeyboard(mQwertyKeyboard); return mInputView; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Urgent! can't update apps in market. No error message
Really? On my own device, I can uninstall the previous version and install the new version even signed with a different key. There must be a way for the developer to upload the new version with a different key in the Android Market. It makes sense for many possible scenarios. 1) the developer lost the original key, e.g. after the laptop was stolen; 2) the original private key was leaked out or hacked by someone else; ... Does anyone know how to solve the problem or know who could help in the Google company? Thanks, On May 7, 2:05 pm, Marco Nelissen marc...@android.com wrote: On Thu, May 7, 2009 at 8:36 AM, android app xiaog...@gmail.com wrote: I uploaded the new updates to the application in the market. There was no error message shown. It seemed that the uploading was successful. However, the version name and the app itself were still the old version. Please help!!! FYI: I lost the original private key or the keystore file. I generated a new keystore file to sign the app. I also met the minSDK problem and solved it by set the minSDKversion in the manifest file. There must be a way to update the app. I don't want to upload the app as an new application since there is a large base of existing customers. If you signed your app with a different key, then it's not possible to upgrade previous versions to the new version. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 SDK Content Loader gets stuck....
I had the same problem. It seemed that the Android Package Builder kept hanging on certain projects. The only solution I could find was to remove those projects from the workspace using the file system (not Eclipse). I'm not sure what is causing the error. On May 6, 12:37 am, Richard Schilling richard.rootwirel...@gmail.com wrote: I am seeing the project refresh in Eclipse get stuck when it runs the Android SDK Content Loader. Does anyone else see this? Any clue on cancelling this task? When I click the red square, the IDE just sits there. Restarting eclipse doesn't help - the IDE just starts this task again when it is restarted. Thanks. Richard Schilling Root Wirelesswww.rootwireless.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] Android Developer in Redwood Shores, CA
Hi, This is Yen from Maxonic, we are located in the SF Bay Area. I came across your resume on dice.com and wanted to discuss a position that I have for a direct client of ours in Redwood Shores, CA. Our client is looking for an Android Developer with experience in Android, Java, and mobile. If you are interested in the position, please forward your updated resume, availability, and a phone number that I could reach you at. If you are not interested or currently employed, please feel free to forward this position along with my contact info to your friends/colleagues. Thank you. Hope to hear from you soon! Best Regards, Yen Pham Yen Kim Pham| Work: (408) 739-4900 Ext. 128 | Fax: 408-636-7370 (for timesheets), 408-636-7371 - broker/recruiters (for other documents), 408-636-7372 - sales/clients (for other documents), Maxonic | 1230 Midas Way | Suite 220 | Sunnyvale, CA 94085 | www.maxonic.com For more information about current openings, please visit: http://seeker.dice.com/jobsearch/servlet/JobSearch?op=104field=diceideid=10846value=10108942 OR http://jobsearch.monster.com/jobsearch.asp?re=106co=xmaxonicxah=http%3A//company.monster.com/maxonicaj=Maxonic This email was sent to dilip_gunaward...@yahoo.com, by Yen Phamy...@maxonic.com To remove your email address permanently from future mailings, please go to the following URL: http://cls20.bullhornstaffing.com/MailerUnsubscribe.cfm?privateLabelID=642email=dilip%5Fgunawardena%40yahoo%2EcomupdKey=E%29U%23%2D%27E%25%3AH%5B%23FWLN%5B%269B%22KDV%3FGZM%29F7%2F2%3E%3D%5D%201%5B%3A1M%3DPHN%3D%23YD%40%20%20%0A --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Problem with XMPP and Gtalk settings -- urgent help required
Hi In one of my application I am trying to connect/ integrate Gtalk with my application..so that from within the app i can send messages to other frds logged in to gtalk... while adding accounts, I dont find XMPP settings in the emulator in Dev Tools option Also wen put my code, the eclipse IDE fails to recognize gtalk packages Please let me know the problem I am using android-sdk-windows-1.0_r2.do i need to upgrade the android sdk or wat i need to install the mssing libif yes kindly send me pointers for the same thanks vikrant --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Animated window transitions in Android 1.5
in android 1.5 release notes I saw Animated window transitions . What is this all about ? IN my application i want to show trasitions if i go from one activity to other.We can set the animation for both activities and call when one is closing and other is opening. But problem is when , the current animation will stop when the onCreate of next activity is called ? Means , when activity is pushed to stack , ongoing animation is stopped. Because of this we cannot show a smooth transition effect between activities Is it possible in android ? Thanks abhijith --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Playing recorded sounds in Android 1.5
Hi, I've just registered the same problem trying to play a simple mp3 file. E/PlayerDriver (542 ): Command PLAYER_SET_DATA_SOURCE completed with an error or info E/MediaPlayer (770 ): PVMFErrNotSupported error (1, -4) I'm using the 1.5 sdk under windows xp and I've tried with some mp3 files from different sources. I'll try to find out what's happening and post my solution. Thanks Pablo On 7 mayo, 14:56, l hx lihongxia8...@gmail.com wrote: Do you using alsa_sound for recording playback? On Fri, May 1, 2009 at 11:00 PM, Scott Slaugh xsla...@gmail.com wrote: Hi, I have an application that I developed using the Android 1.1 SDK that I am trying to port to Android 1.5. In my application, I record a sound through the microphone and then do various things with it, including playing it back using a MediaPlayer object. My code works fine when I use the 1.1 target, but when I use a 1.5 target I get this error when setting up the player: Command PLAYER_SET_DATA_SOURCE completed with an error or info PVMFErrNotSupported error (1, -4) Couldn't setup MediaPlayer java.io.IOException: Prepare failed.: status=0x1 at android.media.MediaPlayer.prepare(Native Method) at org.byu.chum.AudioUtils.AudioRecording.stopRecording (AudioRecording.java:92) at org.byu.chum.SoundRecorder.Recorder$StopListener.onClick (Recorder.java:198) ... It seems like Android isn't liking the format of my media, but I don't know why, since I just recorded that very format on the Android device. Here's the code that is throwing the error: player = new MediaPlayer(); try { player.setDataSource(recordFile.toString()); player.prepare(); } catch (IOException e) { Log.e(playRecording, Couldn't setup MediaPlayer, e); } Has anyone seen this or does anybody have any ideas on what might be causing this problem? Thanks!- Ocultar texto de la cita - - Mostrar texto de la cita - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Broadcast receiver thread
Hi, I wanted to know if the boradcast receiver for an app runs in the same thread as the app (main thread) or in its own thread. More specifically, if my application provides a Handler() method and receiver does a sendMessage()... will all of this work part of the same thread? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] MediaPlayer - prepare failed
Hi, I'm trying to play an audio stream and I've hit this Prepare failed error numerous times, but depending on what I try I get a different status. E.g. java.io.IOException: Prepare failed.: status=0xFFEE Does someone have an overview of the status codes for the 1.1 SDK, say from 0x to 0xFFE0? 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: Urgent! can't update apps in market. No error message
Really? On my own device, I can uninstall the previous version and install the new version even signed with a different key. There must be a way for the developer to upload the new version with a different key in the Android Market. It makes sense for many possible scenarios. 1) the developer lost the original key, e.g. after the laptop was stolen; 2) the original private key was leaked out or hacked by someone else; ... Does anyone know how to solve the problem or know who could help in the Google company? Thanks, On May 7, 2:05 pm, Marco Nelissen marc...@android.com wrote: On Thu, May 7, 2009 at 8:36 AM, android app xiaog...@gmail.com wrote: I uploaded the new updates to the application in the market. There was no error message shown. It seemed that the uploading was successful. However, the version name and the app itself were still the old version. Please help!!! FYI: I lost the original private key or the keystore file. I generated a new keystore file to sign the app. I also met the minSDK problem and solved it by set the minSDKversion in the manifest file. There must be a way to update the app. I don't want to upload the app as an new application since there is a large base of existing customers. If you signed your app with a different key, then it's not possible to upgrade previous versions to the new version. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 have singleInstance of the activity and relay information back to parent.
Indeed, you can't, because singleInstance (and singleTask) means that the activity is managed independently of the previous activity that is launching it, so there can be know guarantees about when or in what order the result will be returned. Don't use singleInstance. Why do you want singleInstance? You probably don't. You have to realize that by doing this you are splitting your app into separate tasks, which will mess up the user's interaction with it as they go in and out of your app. As far as you using singleInstance as a way to hide the fact that your activity is too slow to start... really, I would suggest fixing that instead. :) If your view hierarchy takes too long to inflate, it is probably way overly complicated -- either with a lot of complicated layout managers that can be simplified, or a lot of things that are normally hidden that you should only inflate when needed (see Romain's articles on this for help). If there are other things you do that are slow, you can look at keeping those objects in singletons in your process so they only need to be created the first time the activity is started, and can be re-used thereafter as long as your process is aound. (But first optimize optimize optimize to try to make them not slow! If your activity is so slow to start that you are doing this, you are making it only somewhat better by reducing the times the user need to wait... there will still be many times when they still need to wait.) On Fri, May 8, 2009 at 5:54 AM, kingtut elzoha...@gmail.com wrote: I basically have three activities X, Y, Z and I want only one instance of each but I want control over the navigation and I can't do that by putting all three activities in one task because of the stack structure. Here is a scenario, from X I launch Y given a certain id which correspondence to specific data in the DB, Y inflates and populates it's views, then I go back to X and launch Y again with a different id in the intent, I don't want the overhead of launching the activity and inflating the views again, anyone know how to do this? I tried using singleInstance, but the problem is that I can't send the result code back to an activity in a different 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: Animated window transitions in Android 1.5
1.5 does animations between activities if they are turned on in the new settings option. Please don't do them yourself. On Fri, May 8, 2009 at 4:08 AM, abhijith.off...@gmail.com abhijith.off...@gmail.com wrote: in android 1.5 release notes I saw Animated window transitions . What is this all about ? IN my application i want to show trasitions if i go from one activity to other.We can set the animation for both activities and call when one is closing and other is opening. But problem is when , the current animation will stop when the onCreate of next activity is called ? Means , when activity is pushed to stack , ongoing animation is stopped. Because of this we cannot show a smooth transition effect between activities Is it possible in android ? Thanks abhijith -- 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: IME sample in the SDK
Did you enable it in settings? Did you long press on a text field and select it as the active IME? On Thu, May 7, 2009 at 11:40 PM, Menny menn...@gmail.com wrote: Hi, I want to create a new on-screen-keyboard, and I thought that a good start point will be to see how the SoftKeyboard sample in the SDK (under the SDK folder: android-sdk-windows-1.5_r1\platforms \android-1.5\samples\SoftKeyboard) works. But it doesn't! I run it in Eclipse. So, it compile, then the emulator starts, and under Settings-Localetext I see the new keyboard. But it does not show up when I click on a textbox. Only the regular on- screen keyboard appears. Am I missing something? Thanks ahead, Menny -- 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: Advice for remote service returning value from http transaction
On May 6, 5:33 pm, jseghers jsegh...@cequint.com wrote: On May 6, 2:49 pm, Dianne Hackborn hack...@android.com wrote: [B]e aware that if you do this by sending to a registered broadcast receiver, you can cause security holes because other people can also register for the broadcast and send a broadcast to your client. I think I found more what Dianne was suggesting with PendingIntent. I'm now using Activity.createPendingResult() which overloads the onActivityResult() mechanism and thus there's no need to set up a broadcast receiver. This makes the remote service very close in concept to a LocalService using Handlers. - John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android v. 1.5 = FAIL #2: Directly Manipulating Settings
The GPS toggle in the system settings is a **PRIVACY** setting. It's just there to allow applications to turn the GPS on or off. Applications are in control of the GPS and can turn it off/on (when it's on you see a GPS icon in the status bar) whenever they want. If an app is keeping the GPS on all the time, it's a problem with the app. On Fri, May 8, 2009 at 4:09 AM, yacc yacc...@gmail.com wrote: Sounds a little bit backward. It forces me to manually switch options on off, loosing my time. It basically forbids me to delegate this to my app, which is bad. There are many valid reasons why apps need to activate GPS, while I want to keep it off by default, use cases that come immediatly to mind: -) DroidTracker. Why should I have my GPS turned on all the time if it's needed twice an hour? -) ToogleGPS. Why should I have to go through the Settings app, if pressing on button on the home screen is enough. Hint: Pressing one button on the homescreen is way safer and easier than trying to navigate the settings while driving. -) Navigation. Why does my nav app forces me to manually enable GPS? (It suggests visiting Settings.) -) refining locations. E.g. for many cases where location based decisions are needed, it might be enough to monitor the GSM/UMTS cell location, and switch on GPS only when entering interesting cells. Example would be an app that turns on Wifi only when I near home, depending where, the cell location might be enough, but in the country you can have rather big cells. Furthermore, why does Android do not provide a fast UI to change all these settings? (Guess the fact that there are some dozen settings changing apps from the simple ToogleGPS to apps that reconfigure the phone based on rules got lost on the Google guys. Guess satisfying a demand is irrelevant to them.) Guess you could build an even safer and even more consistent user experience by disallowing any 3rd party apps to be installed? If you want to put me into the driver seat with my G1, well, I could think of a number ideas: -) allow/disallow net access dynamically. E.g. relevant when data is getting expensive: E.g. Email might be allowed to work even with data roaming, all other apps not. -) allow the user to control how a connection is built, e.g. via carrier or via Wifi. -) allow the user to see which network connections/URLs where done by an app. -) allow the user to control which network connections/URL fetches are allowed. -) warn the user about apps that share permissions. (two apps that share uid have also a shared set of permissions that is the union of both). -) allow the user to see which app uses GPS, Bluetooth, and so on. Basically, you are claiming to help the user to have control of the device, but what if the user wants these changes to happen based on some rules? And while you are closing some theoretical loop hole (e.g. somebody could track my location), this seems rather stupid: GPS and Bluetooth that have this dangerous connotations both display an icon in the notification bar. So any clandestine use of it would get noticed rather fast, even if not by all users, enough users would notice and raise a stink. OTOH, you have no problem with leaving the user at the mercy of the developers when it comes to data connectivity. Which is way more complicated to detect, and if you avoid doing your sinister plot while on Wifi, very hard to detect. (When the BadApp keeps silent while on Wifi, the only simple way to catch it by inspecting the data traffic with a sniffer is gone, ...) Andreas On 24 Apr., 17:34, Jean-Baptiste Queru j...@android.com wrote: All right, here's the deal: One of the reasons that motivated the change is battery life, which is a major point of frustration for many Android users. More precisely, we've noticed in our testing that there was a strong correlation between user complaints about battery life and specific applications being installed, and a deeper investigation showed that those apps were indeed causing poor battery life by turning hardware on in a way that users weren't expecting. Restricting access to those settings through an explicit UI was found to be an appropriate mechanism for users to known precisely enough what was going on and to get appropriate expectations about battery life. Another reason that motivated the change is an overall concern about privacy and abuse. There've been concerns that changing settings like GPS, data roaming, wifi, airplane mode without the user's explicit action for each operation was inappropriate. Both of those areas were broadly reported by users, by carriers, and in the press. 1.5 addresses those concerns based on the feedback that we're received, by putting the user in better control of their phone. JBQ On Fri, Apr 24, 2009 at 7:19 AM, chrispix chris..@gmail.com wrote: While I read the blog here
[android-developers] Re: Recent-apps dialog revives finish()'ed activities
Thanks - that's not exactly what I want (although it may be as close as I can get). That will stop the activity ever appearing in the task switcher, whereas I only want it to not appear in the task switcher after the activity calls finish(). Is theer something else I should be doing at finishing time that would tell the framework that this activity was not revivable ? Richard On May 8, 5:53 pm, Dianne Hackborn hack...@android.com wrote: The one you want is android:excludeFromRecents on your Activity that gets launched from the notification. On Fri, May 8, 2009 at 8:00 AM, jarkman jark...@gmail.com wrote: We've got a problem on 1.5 with the task switcher dialog (which, by the way, I love and am very grateful for). We've got a couple of notificationy activities which close, and call finish(), and should never be seen again. But, under some circumstances, these can be seen and switched to via the task switcher. I think this happens when they are the last activity left for the task. What's the proper way to kill these things off ? I've looked at the flags on Activity, but none of them seem to be the right thing. Thanks, Richard -- 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: Android v. 1.5 = FAIL #2: Directly Manipulating Settings
As I've said, it would be reasonable to have a facility for power manager kind of stuff to get involved in this. This setting is not the way. And it NEVER was. Do you realize what we are seeing here? People complaining that their app can no longer turn on the setting whenever it wants, and people complaining that their power manager or whatever app can longer change the setting. Do you see that, put these together under one boolean setting, and it DOES NOT WORK. Even ignoring that this setting is -really- for the USER to override anything the applications on their device do. If you care enough about this, contribute a patch to the platform to add a facility for power manager kinds of apps to do what they want. I expect I will implement such a thing at some point, but it is currently a much lower priority than many other things so I don't know when that would be. So if you want to help out, we can talk on android-framework about the API and UI for such a thing. If you just want to complain and not help anyone, feel free to continue here. On Sun, May 3, 2009 at 5:08 AM, Disconnect dc.disconn...@gmail.com wrote: My argument is that, plain and simply, the default settings apps were inadequate for many users. Having been forced back to using them, those users are objecting, and I agree completely. It is not just a case of I disabled GPS and now CrazyAlsFriendFinder turned it on and drained my battery. Nobody is arguing that that is a good thing. (Well.. maybe Crazy Al is. But he's crazy.) There is also the case of At 3:15, if Locale cannot find MyWorkWifi, I want it to turn on GPS and see where I am. If I'm home, turn off 3g. Or the much simpler I want to use ToggleSettings to control all my toggles in one place, from a dropdown. This could be at least mitigated by an additional, simpler intent for each disabled permission: Turn On? (Similar to the mount/unmount prompt.) That saves some use cases such as manual settings change apps (and judging by the number of them in the market, users do NOT like the default menus.) And it gets closer to the all apps are created equal basis of Android. A later addition to that prompt could allow for always permit this application to control this setting. (And maybe add a notification entry every time it is changed without prompting..?) Again - you block underhanded/unexpected apps, but you still let the user use the apps THEY want to use to control THEIR phone. And if you are worried about it, wipe out the always-allow perms when an app is upgraded. On Sun, May 3, 2009 at 7:02 AM, Mike Hearn mh.in.engl...@gmail.comwrote: Clearly. Let me rephrase - while changing settings (Airplane mode), user navigates through Settings and disables GPS as well. So your argument is that if the user has explicitly disabled the GPS function, your app should be able to turn it on without asking them? This is exactly why the change was made! -- 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: Recent-apps dialog revives finish()'ed activities
No, you can't do that, sorry. On Fri, May 8, 2009 at 10:11 AM, jarkman jark...@gmail.com wrote: Thanks - that's not exactly what I want (although it may be as close as I can get). That will stop the activity ever appearing in the task switcher, whereas I only want it to not appear in the task switcher after the activity calls finish(). Is theer something else I should be doing at finishing time that would tell the framework that this activity was not revivable ? Richard On May 8, 5:53 pm, Dianne Hackborn hack...@android.com wrote: The one you want is android:excludeFromRecents on your Activity that gets launched from the notification. On Fri, May 8, 2009 at 8:00 AM, jarkman jark...@gmail.com wrote: We've got a problem on 1.5 with the task switcher dialog (which, by the way, I love and am very grateful for). We've got a couple of notificationy activities which close, and call finish(), and should never be seen again. But, under some circumstances, these can be seen and switched to via the task switcher. I think this happens when they are the last activity left for the task. What's the proper way to kill these things off ? I've looked at the flags on Activity, but none of them seem to be the right thing. Thanks, Richard -- 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] Re: Advice for remote service returning value from http transaction
Yep that's good. On Fri, May 8, 2009 at 10:06 AM, jseghers jsegh...@cequint.com wrote: On May 6, 5:33 pm, jseghers jsegh...@cequint.com wrote: On May 6, 2:49 pm, Dianne Hackborn hack...@android.com wrote: [B]e aware that if you do this by sending to a registered broadcast receiver, you can cause security holes because other people can also register for the broadcast and send a broadcast to your client. I think I found more what Dianne was suggesting with PendingIntent. I'm now using Activity.createPendingResult() which overloads the onActivityResult() mechanism and thus there's no need to set up a broadcast receiver. This makes the remote service very close in concept to a LocalService using Handlers. - John -- 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] How can I listen for WebView page load completed event
Hi, Is it possible to listen for WebView page load completed event (the whole page is loaded including images, js files, css files and the page is completely rendered. Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How can I get active apn name?
yes. I need to do this to retrieve current apn proxy. Her is how I did it : Cursor mCursor = getContentResolver().query(Uri.parse(content:// telephony/carriers), new String[] {name}, current=1, null, null); if (mCursor!=null) { try { if (mCursor.moveToFirst()) { String name = mCursor.getString(0); .. do what ever you wan't with it ... } } } finally { mCursor.close(); } } So, as you see, it's where clause current=1 that select the current apn. Fields you can retrieve can be found in com.android.providers.telephony.TelephonyProvider : db.execSQL(CREATE TABLE + CARRIERS_TABLE + (_id INTEGER PRIMARY KEY, + name TEXT, + numeric TEXT, + mcc TEXT, + mnc TEXT, + apn TEXT, + user TEXT, + server TEXT, + password TEXT, + proxy TEXT, + port TEXT, + mmsproxy TEXT, + mmsport TEXT, + mmsc TEXT, + type TEXT, + current INTEGER);); On 18 avr, 11:01, biAji biaji...@gmail.com wrote: Hi guys, Is there any method in the SDK can getcurrentactiveapnname ? Any comment is welcome~ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: nullifying imageview src
can you elaborate on that? On Apr 7, 6:51 pm, Streets Of Boston flyingdutc...@gmail.com wrote: Try to do setImageBitmap(null) instead. On Apr 7, 6:10 pm, Sheepz eladk...@gmail.com wrote: anyone? any ideas? please?! On Apr 4, 12:34 pm, Sheepz eladk...@gmail.com wrote: Hi all, i'm making a little card game in order to learn the more interesting stuff of the UI and I have a question: i want to show 5 cards on the table, for that i have made 5 imageviews in the xml: AbsoluteLayout android:id=@+id/cardsThrown android:layout_height=wrap_content android:layout_width=wrap_content android:layout_toRightOf=@+id/deck ImageView android:layout_width=72px android:layout_height=96px android:id=@+id/card5 android:layout_x=0px android:layout_y=0px / ImageView android:layout_width=72px android:layout_height=96px android:id=@+id/card4 android:layout_x=12px android:layout_y=0px / ImageView android:layout_width=72px android:layout_height=96px android:id=@+id/card3 android:layout_x=24px android:layout_y=0px / ImageView android:layout_width=72px android:layout_height=96px android:id=@+id/card2 android:layout_x=36px android:layout_y=0px / ImageView android:layout_width=72px android:layout_height=96px android:id=@+id/card1 android:layout_x=48px android:layout_y=0px / /AbsoluteLayout /RelativeLayout as you might notice here, i'm doing them with an overlap since the uer should be able to pick up the last card and should therefore see it, but the other 4 are just so he'll know what was thrown lastly. my problem is: in the begining the imageviews have no src, but once i give them an image source (using code: thrownCardsImgs[thrownCardIndex]. setImageResource(cards[thrownCardIndex].getImageResourceId()); ) i dont know how i can undo it - i can't set the imageResourceId to null since it is an int type so is there something like -1 or some constant value that means null? P.s., i know about visibility, i'd rather not use it here unless i really have to, since it'll require a bunch or refactoring that i prefer to avoid... Thanks, Sh- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How can I listen for WebView page load completed event
Lucius Fox wrote: Hi, Is it possible to listen for WebView page load completed event (the whole page is loaded including images, js files, css files and the page is completely rendered. Create a WebViewClient object, overriding onPageCompleted(). Then, call setWebViewClient() on your WebView object to tie the WebViewClient to the WebView. Then, implement onPageCompleted() to do whatever you need done when the page is loaded. (cross-posted to http://wiki.andmob.org/faq-webkit-complete) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to have singleInstance of the activity and relay information back to parent.
That makes sense, but going back to the X Y Z example, I have lists in X and Y with items that open in Z, so I go back and forth a lot between Z and either X or Y. I want the user experience to be seamless, and according to the performance guide http://developer.android.com/guide/practices/design/performance.html launching an activity (even an empty one) is one of the heaviest operations you can do. Is there a way to reuse an activity that has been opened once? On May 8, 1:02 pm, Dianne Hackborn hack...@android.com wrote: Indeed, you can't, because singleInstance (and singleTask) means that the activity is managed independently of the previous activity that is launching it, so there can be know guarantees about when or in what order the result will be returned. Don't use singleInstance. Why do you want singleInstance? You probably don't. You have to realize that by doing this you are splitting your app into separate tasks, which will mess up the user's interaction with it as they go in and out of your app. As far as you using singleInstance as a way to hide the fact that your activity is too slow to start... really, I would suggest fixing that instead. :) If your view hierarchy takes too long to inflate, it is probably way overly complicated -- either with a lot of complicated layout managers that can be simplified, or a lot of things that are normally hidden that you should only inflate when needed (see Romain's articles on this for help). If there are other things you do that are slow, you can look at keeping those objects in singletons in your process so they only need to be created the first time the activity is started, and can be re-used thereafter as long as your process is aound. (But first optimize optimize optimize to try to make them not slow! If your activity is so slow to start that you are doing this, you are making it only somewhat better by reducing the times the user need to wait... there will still be many times when they still need to wait.) On Fri, May 8, 2009 at 5:54 AM, kingtut elzoha...@gmail.com wrote: I basically have three activities X, Y, Z and I want only one instance of each but I want control over the navigation and I can't do that by putting all three activities in one task because of the stack structure. Here is a scenario, from X I launch Y given a certain id which correspondence to specific data in the DB, Y inflates and populates it's views, then I go back to X and launch Y again with a different id in the intent, I don't want the overhead of launching the activity and inflating the views again, anyone know how to do this? I tried using singleInstance, but the problem is that I can't send the result code back to an activity in a different 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: How to have singleInstance of the activity and relay information back to parent.
It is currently about 200ms to launch an empty activity. You have a fair amount of control over the additional time on top of that. On Fri, May 8, 2009 at 10:36 AM, kingtut elzoha...@gmail.com wrote: That makes sense, but going back to the X Y Z example, I have lists in X and Y with items that open in Z, so I go back and forth a lot between Z and either X or Y. I want the user experience to be seamless, and according to the performance guide http://developer.android.com/guide/practices/design/performance.html launching an activity (even an empty one) is one of the heaviest operations you can do. Is there a way to reuse an activity that has been opened once? On May 8, 1:02 pm, Dianne Hackborn hack...@android.com wrote: Indeed, you can't, because singleInstance (and singleTask) means that the activity is managed independently of the previous activity that is launching it, so there can be know guarantees about when or in what order the result will be returned. Don't use singleInstance. Why do you want singleInstance? You probably don't. You have to realize that by doing this you are splitting your app into separate tasks, which will mess up the user's interaction with it as they go in and out of your app. As far as you using singleInstance as a way to hide the fact that your activity is too slow to start... really, I would suggest fixing that instead. :) If your view hierarchy takes too long to inflate, it is probably way overly complicated -- either with a lot of complicated layout managers that can be simplified, or a lot of things that are normally hidden that you should only inflate when needed (see Romain's articles on this for help). If there are other things you do that are slow, you can look at keeping those objects in singletons in your process so they only need to be created the first time the activity is started, and can be re-used thereafter as long as your process is aound. (But first optimize optimize optimize to try to make them not slow! If your activity is so slow to start that you are doing this, you are making it only somewhat better by reducing the times the user need to wait... there will still be many times when they still need to wait.) On Fri, May 8, 2009 at 5:54 AM, kingtut elzoha...@gmail.com wrote: I basically have three activities X, Y, Z and I want only one instance of each but I want control over the navigation and I can't do that by putting all three activities in one task because of the stack structure. Here is a scenario, from X I launch Y given a certain id which correspondence to specific data in the DB, Y inflates and populates it's views, then I go back to X and launch Y again with a different id in the intent, I don't want the overhead of launching the activity and inflating the views again, anyone know how to do this? I tried using singleInstance, but the problem is that I can't send the result code back to an activity in a different 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. -- 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: Recent-apps dialog revives finish()'ed activities
OK, thanks. Is it easy to explain why these activities linger on so ? After reading today's discussions of tasks and activities I have the vague idea that they survive because they are the last activity for a task, and the system hasn't decided to kill the task yet. Richard On May 8, 6:17 pm, Dianne Hackborn hack...@android.com wrote: No, you can't do that, sorry. On Fri, May 8, 2009 at 10:11 AM, jarkman jark...@gmail.com wrote: Thanks - that's not exactly what I want (although it may be as close as I can get). That will stop the activity ever appearing in the task switcher, whereas I only want it to not appear in the task switcher after the activity calls finish(). Is theer something else I should be doing at finishing time that would tell the framework that this activity was not revivable ? Richard On May 8, 5:53 pm, Dianne Hackborn hack...@android.com wrote: The one you want is android:excludeFromRecents on your Activity that gets launched from the notification. On Fri, May 8, 2009 at 8:00 AM, jarkman jark...@gmail.com wrote: We've got a problem on 1.5 with the task switcher dialog (which, by the way, I love and am very grateful for). We've got a couple of notificationy activities which close, and call finish(), and should never be seen again. But, under some circumstances, these can be seen and switched to via the task switcher. I think this happens when they are the last activity left for the task. What's the proper way to kill these things off ? I've looked at the flags on Activity, but none of them seem to be the right thing. Thanks, Richard -- 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] Class derived from IntentService must have default constructor
I'm posting this to share the lessons I learned while working with IntentService. IntentService has a single constructor that takes a string argument name. The documentation has no description of what name is used for. In looking at the sources, I found that its only use is in naming the worker thread for the IntentService. This thread is named IntentService [name]. I initially implemented the constructor of the derived class to also take a String argument and passed it along to the derived class. This is wrong. This will cause the startService() call to generated a java.lang.InstantiationException in the application containing the service i.e. you don't get the exception in the application calling startService(). A clue to the actual problem is a little further up in the logs:newInstance failed: no init() The derived class must have a Default constructor and that constructor must call super() passing a string for the name component of the worker thread name. public class MyIntentService extends IntentService { public MyIntentService() { super(MyIntentService); } @Override protected void onHandleIntent(Intent intent) { // Handle events on worker thread here } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Recent-apps dialog revives finish()'ed activities
They don't really 'linger' or 'survive'. What you called the 'task switcher' dialog is actually the 'recent tasks' dialog. It's different from the windows or mac task switcher that shows you currently running apps. On Fri, May 8, 2009 at 11:00 AM, jarkman jark...@gmail.com wrote: OK, thanks. Is it easy to explain why these activities linger on so ? After reading today's discussions of tasks and activities I have the vague idea that they survive because they are the last activity for a task, and the system hasn't decided to kill the task yet. Richard On May 8, 6:17 pm, Dianne Hackborn hack...@android.com wrote: No, you can't do that, sorry. On Fri, May 8, 2009 at 10:11 AM, jarkman jark...@gmail.com wrote: Thanks - that's not exactly what I want (although it may be as close as I can get). That will stop the activity ever appearing in the task switcher, whereas I only want it to not appear in the task switcher after the activity calls finish(). Is theer something else I should be doing at finishing time that would tell the framework that this activity was not revivable ? Richard On May 8, 5:53 pm, Dianne Hackborn hack...@android.com wrote: The one you want is android:excludeFromRecents on your Activity that gets launched from the notification. On Fri, May 8, 2009 at 8:00 AM, jarkman jark...@gmail.com wrote: We've got a problem on 1.5 with the task switcher dialog (which, by the way, I love and am very grateful for). We've got a couple of notificationy activities which close, and call finish(), and should never be seen again. But, under some circumstances, these can be seen and switched to via the task switcher. I think this happens when they are the last activity left for the task. What's the proper way to kill these things off ? I've looked at the flags on Activity, but none of them seem to be the right thing. Thanks, Richard -- 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] Re: Recent-apps dialog revives finish()'ed activities
Well, they definitely do something that feels a lot like lingering, in that they go away when the user tells them to (in a manner which was effectively permanent in 1.1), and then they are later revived by the switcher. It's a rather odd user experience. Here's an activity which the user can't launch directly, and which they have said they are finished with, so they will be confused to find a way back to it. Or, to put it another way, in 1.1 a call of finish() meant the activity was finished, and it went away forever. In 1.5 that is no longer true. It seems very strange to say that an activity has no way to really terminate itself, so I'm trying to understand the context which makes that sensible. Do you see what I mean ? Richard On May 8, 7:24 pm, Marco Nelissen marc...@android.com wrote: They don't really 'linger' or 'survive'. What you called the 'task switcher' dialog is actually the 'recent tasks' dialog. It's different from the windows or mac task switcher that shows you currently running apps. On Fri, May 8, 2009 at 11:00 AM, jarkman jark...@gmail.com wrote: OK, thanks. Is it easy to explain why these activities linger on so ? After reading today's discussions of tasks and activities I have the vague idea that they survive because they are the last activity for a task, and the system hasn't decided to kill the task yet. Richard On May 8, 6:17 pm, Dianne Hackborn hack...@android.com wrote: No, you can't do that, sorry. On Fri, May 8, 2009 at 10:11 AM, jarkman jark...@gmail.com wrote: Thanks - that's not exactly what I want (although it may be as close as I can get). That will stop the activity ever appearing in the task switcher, whereas I only want it to not appear in the task switcher after the activity calls finish(). Is theer something else I should be doing at finishing time that would tell the framework that this activity was not revivable ? Richard On May 8, 5:53 pm, Dianne Hackborn hack...@android.com wrote: The one you want is android:excludeFromRecents on your Activity that gets launched from the notification. On Fri, May 8, 2009 at 8:00 AM, jarkman jark...@gmail.com wrote: We've got a problem on 1.5 with the task switcher dialog (which, by the way, I love and am very grateful for). We've got a couple of notificationy activities which close, and call finish(), and should never be seen again. But, under some circumstances, these can be seen and switched to via the task switcher. I think this happens when they are the last activity left for the task. What's the proper way to kill these things off ? I've looked at the flags on Activity, but none of them seem to be the right thing. Thanks, Richard -- 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] Re: How to play voice files on Touch Event
MotionEvent has the history of all the points between the last event and the current one you are processing, if you are not able to keep up with them. That said, the driver only reports samples at a limited rate, so it would still be possible to not see points at some places if the finger is moved really fast. If you really want to determine every possible key the finger hit, you will need to compute a line between the points and determine which ones intersect the line. On Thu, May 7, 2009 at 7:12 PM, Leslie sharpbear...@hotmail.com wrote: When want to play voice files on Touch Event. I have a piano Keyboard on Screen, when user Touch move on piano keys, play its' voice files. Issue: I used two way for trails 1. in Touch Move event, check x, y to avoid play twice in same Key region. And when Touch move to a new key region, play the Key voice once. 2. Use Handler Functions for the play action. But when user move touch quickly, both ways cannot play every key voice files in the process. sometime, only the first and last have been played. Do you any suggestions for that? Thanks a lot -- 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: Clone hidden row and display the cloned one with visibility seetings to true
corrections In order to have a decent perf, looking to clone the existing tablerow and add this as new row. Is cloning of existing table row possible assuming that I always clone from a hidden view only. Does clone takes care of cloning the sub views sub components which exist with in table row. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Recent-apps dialog revives finish()'ed activities
Like Marco said, this is NOT running tasks, it is just the most recent tasks the user has started. If they select one of these items, either the current task will be brought to the foreground or a new one started if there is not an existing one. It makes perfect sense if you look at this as recent tasks (for example like the recent applications in the windows start menu). And as a general rule, activities that are created from a notification should not be in this list. If it makes sense for the user to come back to that activity, they can do so by going back through the notification. On Fri, May 8, 2009 at 11:50 AM, jarkman jark...@gmail.com wrote: Well, they definitely do something that feels a lot like lingering, in that they go away when the user tells them to (in a manner which was effectively permanent in 1.1), and then they are later revived by the switcher. It's a rather odd user experience. Here's an activity which the user can't launch directly, and which they have said they are finished with, so they will be confused to find a way back to it. Or, to put it another way, in 1.1 a call of finish() meant the activity was finished, and it went away forever. In 1.5 that is no longer true. It seems very strange to say that an activity has no way to really terminate itself, so I'm trying to understand the context which makes that sensible. Do you see what I mean ? Richard On May 8, 7:24 pm, Marco Nelissen marc...@android.com wrote: They don't really 'linger' or 'survive'. What you called the 'task switcher' dialog is actually the 'recent tasks' dialog. It's different from the windows or mac task switcher that shows you currently running apps. On Fri, May 8, 2009 at 11:00 AM, jarkman jark...@gmail.com wrote: OK, thanks. Is it easy to explain why these activities linger on so ? After reading today's discussions of tasks and activities I have the vague idea that they survive because they are the last activity for a task, and the system hasn't decided to kill the task yet. Richard On May 8, 6:17 pm, Dianne Hackborn hack...@android.com wrote: No, you can't do that, sorry. On Fri, May 8, 2009 at 10:11 AM, jarkman jark...@gmail.com wrote: Thanks - that's not exactly what I want (although it may be as close as I can get). That will stop the activity ever appearing in the task switcher, whereas I only want it to not appear in the task switcher after the activity calls finish(). Is theer something else I should be doing at finishing time that would tell the framework that this activity was not revivable ? Richard On May 8, 5:53 pm, Dianne Hackborn hack...@android.com wrote: The one you want is android:excludeFromRecents on your Activity that gets launched from the notification. On Fri, May 8, 2009 at 8:00 AM, jarkman jark...@gmail.com wrote: We've got a problem on 1.5 with the task switcher dialog (which, by the way, I love and am very grateful for). We've got a couple of notificationy activities which close, and call finish(), and should never be seen again. But, under some circumstances, these can be seen and switched to via the task switcher. I think this happens when they are the last activity left for the task. What's the proper way to kill these things off ? I've looked at the flags on Activity, but none of them seem to be the right thing. Thanks, Richard -- 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. -- 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
[android-developers] Re: How to detect whether the virtual keyboard is visible or not? SDK 1.5
Actually I want to configure my layout and views (making some views invisible) if the keyboard is visible Any way to check the visibility of the IME (virtual keyboard)? On May 7, 1:56 pm, Dianne Hackborn hack...@android.com wrote: By your view hierarchy being resized with all of the corresponding layout traversal and callbacks. On Thu, May 7, 2009 at 10:44 AM, Rob not...@gmail.com wrote: How do you detect a resize of this nature? On Apr 29, 12:28 am, Dianne Hackborn hack...@android.com wrote: There is no way to discover this, except for indirectly as your UI is resized to accommodate the IME. On Tue, Apr 28, 2009 at 4:06 PM, havexz bali.param...@gmail.com wrote: Hi I want to know is there a way one can check(programmatically) whether currently virtual keyboard is visible or not? I want to run some code when the keyboard is visible. Is there a even that occurs when the keyboard is being visible and when it goes back to hidden state? -- 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.- 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: Recent-apps dialog revives finish()'ed activities
Dianne Hackborn wrote: And as a general rule, activities that are created from a notification should not be in this list. That assumes activities that are created from a notification are different than activities created by the Launcher. For some apps, those are the same activity, doing different things based on the received Intent. In that case, android:excludeFromRecents wipes out the activity in both scenarios. I have not played with activity aliases -- is that still around? If so, is that a way to address this? Or something else that allows a single Activity implementation to somehow be in the recent-task list (when started via the Launcher) and not in the recent-task list (when started via a notification)? Worst-case scenario, we can create a do-nothing subclass of the activity, then register both the parent and the child in the manifest, with the one to be used in notifications having the android:excludeFromRecents flag set. I'm just trying to figure out if that's the best answer. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy 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 Detect Soft Keyboard / Resize?
I have bad news and good news. There is no direct API to detect this. But you can detect if your layout is forcibly changed by Android due to the soft keyboard [dis]appearing, which you can detect. 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 May 7, 3:27 am, Rob not...@gmail.com wrote: Hi, How can you detect when the soft keyboard is enabled and the layout resized? 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: Recent-apps dialog revives finish()'ed activities
On Fri, May 8, 2009 at 12:01 PM, Mark Murphy mmur...@commonsware.comwrote: That assumes activities that are created from a notification are different than activities created by the Launcher. For some apps, those are the same activity, doing different things based on the received Intent. In that case, android:excludeFromRecents wipes out the activity in both scenarios. Okay, sure if the notification brings you to the main activity if your app (as it does with Gmail) you certainly don't want to exclude that from recents. That's fine, it has a clear icon in the launcher that is associated with all of these things. -- 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: How to detect whether the virtual keyboard is visible or not? SDK 1.5
No, sorry. On Fri, May 8, 2009 at 11:57 AM, havexz bali.param...@gmail.com wrote: Actually I want to configure my layout and views (making some views invisible) if the keyboard is visible Any way to check the visibility of the IME (virtual keyboard)? On May 7, 1:56 pm, Dianne Hackborn hack...@android.com wrote: By your view hierarchy being resized with all of the corresponding layout traversal and callbacks. On Thu, May 7, 2009 at 10:44 AM, Rob not...@gmail.com wrote: How do you detect a resize of this nature? On Apr 29, 12:28 am, Dianne Hackborn hack...@android.com wrote: There is no way to discover this, except for indirectly as your UI is resized to accommodate the IME. On Tue, Apr 28, 2009 at 4:06 PM, havexz bali.param...@gmail.com wrote: Hi I want to know is there a way one can check(programmatically) whether currently virtual keyboard is visible or not? I want to run some code when the keyboard is visible. Is there a even that occurs when the keyboard is being visible and when it goes back to hidden state? -- 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.- Hide quoted text - - Show quoted text - -- 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: Updated to 1.5 and R.java is not regeneratated
Not sure what problem you have, but if it's related to the gen folder, just create it manually, and then right click it and choose Build Path Use as source folder Xav 2009/5/7 LambergaR martin.s...@gmail.com: I am having the same problem. Richards solution doasnt help either. Any advice? On 5 maj, 00:13, Jinru He mikehe1...@gmail.com wrote: Hi, Xavier, I encounter the same problem. and I am pretty sure that I didnot have thegenfolderbefore updating to ADT 0.9 How can i solve this problem? Thanks! On 4月30日, 下午5时54分, Xavier Ducrohet x...@android.com wrote: When updating an old project that doesn't have thegensourcefolder setup, it first detects if thegenfolderalreadyexists, and if so, generates this error. The idea was tonotconvertand pre-existinggenfolder(or file) into an Eclipsesourcefolder. Are you sure you didn't have thegenfolderbefore updating to ADT 0.9? thanks Xav On Thu, Apr 30, 2009 at 2:46 PM, Richard Schilling richard.rootwirel...@gmail.com wrote: O.K. I resolved this. The problem was related to the fact that Eclipse couldn't properly handle thegendirectory that it created. This error is generated: [2009-04-30 14:14:15 - MyApp] /MyApp/genalreadyexistsbutisnota sourcefolder.Convertto asourcefolderorrenameit. So, here's how I resolved this problem: 1. Make sure Android 1.1 platform is selected for the project. 2. Delete thegendirectory - let Eclipse update .classpath (if it asks). 3. Clean the project - Eclipse will regenerate thegendirectory 4. Add the directorygento the Javasourceclasspath if R.java cannot be resolved. 5. Clean the project again. 6. if you still have a problem with the above error showing up, delete thegendirectory again and let Eclipse regenerate it. This should clear up the error. Perhaps a change to the Eclipse plugin or the Eclipse API needs to be made - I don't know. But, at least my projects are building now. Cheers, Richard Schilling Root Wireless, Inc. www.rootwireless.com On Apr 30, 2:34 pm, Richard Schilling richard.rootwirel...@gmail.com wrote: I also get this in the message window: [2009-04-30 14:14:15 - MyApp] /MyApp/genalreadyexistsbutisnota sourcefolder.Convertto asourcefolderorrenameit. Richard On Apr 30, 2:29 pm, Richard Schilling richard.rootwirel...@gmail.com wrote: I have a number of projects that were built and ran just fine under the 1.1 version of the SDK. I'm updating all of my projects. Some projects update with no problem. But, some Eclipse projects don't regenerate R.java properly in thegen directory. I've set the Android platform to 1.1. I've cleaned the project. I've refreshed the project. R.java is stillnotbeing generated. Help! This issue prevents production applications from being bult at the moment. Richard Schilling Root Wireless- Hide quoted text - - Show quoted text - -- Xavier Ducrohet Android Developer Tools Engineer Google Inc. -- Xavier Ducrohet Android Developer Tools Engineer Google Inc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---