Re: [android-developers] Re: Start an App via the Web
You can also build an intent: URI. Note that the browser automatically tacks the BROWSABLE category on to any such intents, so you can only reach activities that have explicitly said that support that category. See the Intent documentation for the API to convert an Intent object in to its String URI representation. On Wed, Jun 16, 2010 at 10:41 PM, haric zhu haric@gmail.com wrote: You can use hooked javascript to call Activity for your website. 2010/6/17 Kumar Bibek coomar@gmail.com Well, The cloud-to-device messaging feature that was announced with Froyo will help you in this.Check out the vidoes at Google I/O 2010 Thanks and Regards, Kumar Bibek http://tech-droid.blogspot.com On Jun 13, 9:44 pm, EricM3 ericmorg...@gmail.com wrote: Hello everyone, I would like to create a website that has a button, and whenever the button is pushed, an application or service on my phone will begin. Could someone please push me in the right direction for where I should look to accomplish this? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Best Regards Haric -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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
Re: [android-developers] Re: Even with Min SDK version, building app against 2.2 breaks 1.5?
On Wed, Jun 16, 2010 at 8:55 PM, blab boolbal...@googlemail.com wrote: As far as I understand the scaling happens only once - when the image is loaded into memory (Bitmap object is created). After this there should not be any scaling happening as the object is already sitting in memory. Therefore, no loss to performance during the gameplay. Please correct me if I'm wrong. It very much depends on what you are doing. There are many situations where it can't pre-scale. And I'll say again... whatever code there was in 1.5 to handle bitmaps of different sizes was not complete in 1.5, and should not be used. If you really need to do this, I would suggest putting your bitmaps in as raw resources and scaling them yourself at load time. -- 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
Re: [android-developers] power manager (Light off) in android
Sorry, applications can't get this permission. You should see a message in the log when installing the app that it wasn't granted. On Mon, Jun 7, 2010 at 4:08 AM, Nandan . bhavesh2...@gmail.com wrote: hii . Currently i m facing a problem to switch off light in android application. i m trying to power manager gotosleep method but its giving a below problem . *java.lang.RuntimeException: Unable to start activity ComponentInfo{org.bhavesh/org.bhavesh.mainactivity}: * * * *java.lang.SecurityException: Neither user 10024 nor current process has android.permission.DEVICE_POWER.* but i already given a android.permission.DEVICE_POWER in manifest file. can any one tell me why its happened in android. yaa any other method to off the light in android.. Thank you in advanced With Regrads bhavesh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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
Re: [android-developers] power manager (Light off) in android
what you are exactly trying to do ... just turn dimm/on/off display light or you want to send the entire device to sleep ? Best Regards, Dileep On Thu, Jun 17, 2010 at 11:43 AM, Dianne Hackborn hack...@android.comwrote: Sorry, applications can't get this permission. You should see a message in the log when installing the app that it wasn't granted. On Mon, Jun 7, 2010 at 4:08 AM, Nandan . bhavesh2...@gmail.com wrote: hii . Currently i m facing a problem to switch off light in android application. i m trying to power manager gotosleep method but its giving a below problem . *java.lang.RuntimeException: Unable to start activity ComponentInfo{org.bhavesh/org.bhavesh.mainactivity}: * * * *java.lang.SecurityException: Neither user 10024 nor current process has android.permission.DEVICE_POWER.* but i already given a android.permission.DEVICE_POWER in manifest file. can any one tell me why its happened in android. yaa any other method to off the light in android.. Thank you in advanced With Regrads bhavesh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] java.lang.OutOfMemoryError: bitmap size exceeds VM budget
Hi java.lang.OutOfMemoryError: bitmap size exceeds VM budget I am getting this message in my log. As I investigated and found out while loading contact image this error comes.I checked size of the image file and it was normal so came to a conclusion that other processes filling up the memory and hence at the time this image is being loaded ,VM running low of memory. My question is that, is there any tool to figure out which process is responsible for occupying memory so that we can look into the process for the exact reason. Thanks, Amit -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 use AudioManager.OnAudioFocusChangeListener in FroYo?
I'd like to respond in my music player to other apps (like Maps) gaining an audio focus. However, I only found requestAudioFocus to pass a listener. But I don't want the focus (it's just fine to have music in background), I just want to be notified if some other app requests it. Did I miss(understand) something? Or isn't own handling necessary at all and Android mutes/softens the volume itself? However, esp. for audio books it might be a good idea to pause instead of just mute the sound, so having a listener wound be nice anyway... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Droid Incredible Not Returning Valid DeviceID?
Have you considered using Settings.Secure.ANDROID_ID instead? It seems relatively stable and doesn't require additional permissions to use it. -John Coryat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 live stream (RTP) in MediaPlayer
Thanks, I'll give this a try on the 2.1 (Desire) and see if it'll work - as I'm slightly suspiscious that it may have problems with TRUE live video (aka from an encoder) but will post here with what I find. Hoping always On Jun 9, 9:00 am, Andy Savage a...@bluewire.net.nz wrote: On the subject of this thread I have submitted a bug report... For those interested you may want to star it or add any useful comments:http://code.google.com/p/android/issues/detail?id=8959q=rtpcolspec=... I hope we can get this resolved. I'm not really a skilled enough coder to fix this issue myself (in the C sources). But anybody who could help would be much appreciated. -- The greatest challenge to any thinker is stating the problem in a way that will allow a solution - Bertrand Russell Andy Savage Cell Phone: +852 936 34341 Skype ID: andy_savage Linked In:http://www.linkedin.com/in/andysavage On Wed, Jun 9, 2010 at 3:58 PM, Andy Savage a...@bluewire.net.nz wrote: You simply pass the RTSP url to MediaPlayer (although I think this functionality was somewhat broken before 2.1 so I can't be certain that it will work in 1.6-2.0). You can play it in the same way that you would play a file (but instead of passing the file descriptor pass the URL as a string). -- The greatest challenge to any thinker is stating the problem in a way that will allow a solution - Bertrand Russell Andy Savage Cell Phone: +852 936 34341 Skype ID: andy_savage Linked In:http://www.linkedin.com/in/andysavage On Mon, Jun 7, 2010 at 5:35 PM, Jez jeremy.a.co...@baesystems.com wrote: I'm confused by RTSP streaming - I've been trying to stream a LIVE video to Android (2.1) and not sure from the discussion here and previous posts that I've seen if Android can actually receive and play a LIVE video stream? I don't need any control of the video at all so just need to stream it. Jez On Jun 1, 2:30 am, Andy Savage a...@bluewire.net.nz wrote: In my example I am using SIP, so the SDP information is actually exchanged this way. The RTSP is simply for receiving as a hack to Android's built in (arbitrary) limitations. So the idea is to take the SDP for receiving and wrap it over RTSP. -- The greatest challenge to any thinker is stating the problem in a way that will allow a solution - Bertrand Russell Andy Savage Cell Phone: +852 936 34341 Skype ID: andy_savage Linked In:http://www.linkedin.com/in/andysavage On Mon, May 31, 2010 at 9:26 AM, Ignas ignas.limanaus...@gmail.com wrote: There is a technical limitation to what SDP can legally convey. A single SDP document can contain only one end of media conversation. Therefore it is technically impossible to setup streaming with just one SDP document there have to be an exchange. When using RTSP or SIP terminals exchange their SDP information and thus get to know where to stream to and from where to accept the stream. MediaPlayer could accept just one SDP (i.e. streamer's), but then how would streamer would know where to transmit? Both of them have to exchange at least supported CODEC information and connection information (port and IP). Maybe I am just not aware of SDP format with two node's information. Can someone share an example? On May 27, 3:22 pm, debelyoo jean.ross...@gmail.com wrote: I agree with Andy's comment: On May 25, 8:36 am, Andy Savage a...@bluewire.net.nz wrote: There seems to be a limitation that means that it will only accept SDP information with RTP streams inside if it gets them from the RTSP stream (e.g. it gets this information from SETUP in the RTSP protocal). It is possible to play a stream by requesting it via a RTSP request (both audio and video are sent over RTP and the MediaPlayer is able to decode and play them). But it is not possible to play live RTP stream by requesting the SDP file directly (via an HTTP request). The RTP streams (audio and video) are sent to the device from the server. The MediaPlayer should just get the SDP file, listen on the proper ports and decode the streams. But it generates an error and do not play the streams. Jean -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en-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
Re: [android-developers] java.lang.OutOfMemoryError: bitmap size exceeds VM budget
When you get such an error it's because *your* process is running out of memory. Other processes have nothing to do with it. You are using too much memory in your process and blowing past the heap limit (16 MB or 24 MB depending on the device you're using.) On Thu, Jun 17, 2010 at 12:07 AM, Amit magic.man.a...@gmail.com wrote: Hi java.lang.OutOfMemoryError: bitmap size exceeds VM budget I am getting this message in my log. As I investigated and found out while loading contact image this error comes.I checked size of the image file and it was normal so came to a conclusion that other processes filling up the memory and hence at the time this image is being loaded ,VM running low of memory. My question is that, is there any tool to figure out which process is responsible for occupying memory so that we can look into the process for the exact reason. Thanks, Amit -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Disabling back button when the alert dialog box is on the screen
Alert Dialogs have a few methods to achieve this. setCancellable ... Check them out. Thanks and Regards, Kumar Bibek http://tech-droid.blogspot.com On Jun 17, 10:34 am, beneesh baby bineeshtb...@googlemail.com wrote: Hi, How to disable the back button when the alert box is on the screen I used onKeyDown function in the activity.but when back button button is clicked it first cancels the dialog box and goes to our activity...I want both either both activity and dialog box closed when clicking the back button or disable the back button when the dialog box is shown... can any one suggest any solutions for this Thanks in advance, Beneesh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] what is the better application to implement XML program
what is the better application to implement XML program , XML Schema please I have problem with implement XML 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: ProgressBar.setProgressDrawable bug
When using the progress drawable provided by the Android platform it should not be possible to change the color dynamically as you cannot access the GradientDrawable. The resource ID for the GradientDrawable used as progress indication is defined in com.android.internal.R and you do not have access to it from your application. Changing colors dynamically should be possible if you use your own drawable as progress drawable. The platform's (horizontal) progress drawable is a clipped GradientDrawable inside a LayerDrawable (see http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob_plain;f=core/res/res/drawable/progress_horizontal.xml;hb=HEAD). You can use it in your application and replace the progress drawable with it. However, to get access to the GradientDrawable from Java you should package the GradientDrawable inside a ScaleDrawable (instead of packaging it inside of a ClipDrawable). Then you can get access to it via ScaleDrawable.getDrawable(). Kind regards Droidsan On Jun 17, 7:39 am, haric zhu haric@gmail.com wrote: Have you made an xml like default theme does? 2010/6/17 ls02 agal...@audible.com Apparently ProgressBar.setProgressDrawable has bug, if called to set new drawable, progress bar disappears completely. Is there any other way to change progress bar color dynamically at run time? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Best Regards Haric -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: bug with notifyDataSetChanged() in ArrayAdapter ?
the only example I have found for ArrayAdapter in the API example doesn't show how to add element in the array : http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/List1.html and getCount() is not overrided in this example ... On Jun 16, 9:39 pm, Kumar Bibek coomar@gmail.com wrote: You have to override the getCount method. Please go through the examples to check how the Adapters work. Thanks and Regards, Kumar Bibekhttp://tech-droid.blogspot.com On Jun 16, 6:07 pm, Christophe christophe.lebesner...@gmail.com wrote: hello everyone, I have a strange problem with one of my ListActivity. I have overrided the default ArrayAdapter in order to customize my list. I have then filled the adapter with an ArrayList. If I insert an element on the list and then call notifyDataSetChanged() on the adapter everything works fine. But if I insert an element at the END of the list and then call notifyDataSetChanged(), the new element doesn't appear ... And finally if I override getCount() on my adapter like this : @Override public int getCount() { return myArrayList.size(); } then everything works fine. Is this a bug or am I doing something wrong ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ProgressBar.setProgressDrawable bug
hi is02 I found the same problem :( It only occurs setting the ProgressDrawable in code. If you set it in xml it works ok. A workaround is to define another (dummy) ProgressBar/SeekBar in your xml layout (you can define it as invisible), and set that one's ProgressDrawable in your xml to your drawable (e.g. android:progressDrawable=my_progress_drawable). You can then access and use the invisible progressbar's progressDrawable in code (dummyProgressBar.getProgressDrawable), and set it as the progressDrawable of any other progressbar/seekbar (e.g. myMainProgressBar.setProgressDrawable(myDummyProgressBar.getProgressDrawable). If you need several alternative progressdrawables for your progressbar, you can define a dummy invisible progressbar for each alternative. (adds an overhead to screen layout of course but hey, it is a workaround). Putting dummy progressbar's progressdrawables into Drawable objects in your activity is better than re-acquiring them every time from a dummy progressbar. e.g. Drawable progressDrawableDefault; Drawable progressDrawable2; progressDrawableDefault = myProgressBar.getProgressDrawable(); progressDrawable2 = dummyProgressBar2.getProgressDrawable(); You can then allocate any of your drawables to your main progressbar. e.g. myProgressBar.setProgressDrawable(progressDrawable2); Do remember though, allocating the same drawable to multiple progress bars is NOT good. e.g. changes to one ProgressBar.progress affects the display of ALL progress bars progress sharing the same progressdrawable resource(hence the need to use dummy progressbars). Hope this helps. On Jun 16, 11:38 pm, ls02 agal...@audible.com wrote: Apparently ProgressBar.setProgressDrawable has bug, if called to set new drawable, progress bar disappears completely. Is there any other way to change progress bar color dynamically at run time? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ProgressBar.setProgressDrawable bug
Hey, @IS02 I have faced the same Problems. I Defined my own ProgressDrawable and changed the PrimaryProgess Drawable inside it but then the Backgrounddrawable still was there but the Progress disapeared. @Droidsan could you post an example please? I don't quite get what you mean. Thanks David On 17 Jun., 10:02, droidsan droid...@googlemail.com wrote: When using the progress drawable provided by the Android platform it should not be possible to change the color dynamically as you cannot access the GradientDrawable. The resource ID for the GradientDrawable used as progress indication is defined in com.android.internal.R and you do not have access to it from your application. Changing colors dynamically should be possible if you use your own drawable as progress drawable. The platform's (horizontal) progress drawable is a clipped GradientDrawable inside a LayerDrawable (seehttp://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob_...). You can use it in your application and replace the progress drawable with it. However, to get access to the GradientDrawable from Java you should package the GradientDrawable inside a ScaleDrawable (instead of packaging it inside of a ClipDrawable). Then you can get access to it via ScaleDrawable.getDrawable(). Kind regards Droidsan On Jun 17, 7:39 am, haric zhu haric@gmail.com wrote: Have you made an xml like default theme does? 2010/6/17 ls02 agal...@audible.com Apparently ProgressBar.setProgressDrawable has bug, if called to set new drawable, progress bar disappears completely. Is there any other way to change progress bar color dynamically at run time? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Best Regards Haric -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Misplaced Layout after “home ”-button and/or powersave screen
Hi, I have an app which also includes a service with a Notification. Right now I am experiencing the foillowing problem : * I start my app which will work fine * after couple of minutes the powersave kicks in and I get a black screen * I (or hte user) click the Menu-button to dismiss the black screen and to unlock the screenlock * Now my (fullscreen) app will have moved like 30-40 pixels downwards, creating an ugly black border or hole. When I move the scrollwheel it will move up and down, and when I press the Menu button (showing my ap''s menu) it will fix the view... or * I start my app which will work fine * I press the Home button exiting the app, my service though will (correctly) keep running * when selecting my service from the notification-bar I will get once again : -Now my (fullscreen) app will have moved like 30-40 pixels downwards, creating an ugly black border or hole. When I move the scrollwheel it will move up and down, and when I press the Menu button (showing my ap''s menu) it will fix the view... Any idea what the problem is ? The app is running on a ADP2 with Android 1.6 Thanks in advance ! Ok, after some testing I noticed that if I don't run the Activity on Fullscreen, but just leave the TtileBar away this won't happen... Still this is no solution to me, I want it to be fullscreen... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: bug with notifyDataSetChanged() in ArrayAdapter ?
I have a strange problem with one of my ListActivity. I have overrided the default ArrayAdapter in order to customize my list. I have then filled the adapter with an ArrayList. This is a custom array adapter. Thanks and Regards, Kumar Bibek http://tech-droid.blogspot.com On Jun 17, 1:27 pm, Christophe christophe.lebesner...@gmail.com wrote: the only example I have found for ArrayAdapter in the API example doesn't show how to add element in the array : http://developer.android.com/resources/samples/ApiDemos/src/com/examp... and getCount() is not overrided in this example ... On Jun 16, 9:39 pm, Kumar Bibek coomar@gmail.com wrote: You have to override the getCount method. Please go through the examples to check how the Adapters work. Thanks and Regards, Kumar Bibekhttp://tech-droid.blogspot.com On Jun 16, 6:07 pm, Christophe christophe.lebesner...@gmail.com wrote: hello everyone, I have a strange problem with one of my ListActivity. I have overrided the default ArrayAdapter in order to customize my list. I have then filled the adapter with an ArrayList. If I insert an element on the list and then call notifyDataSetChanged() on the adapter everything works fine. But if I insert an element at the END of the list and then call notifyDataSetChanged(), the new element doesn't appear ... And finally if I override getCount() on my adapter like this : @Override public int getCount() { return myArrayList.size(); } then everything works fine. Is this a bug or am I doing something wrong ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android finishActivity()
Hi Mike, Yes I have done similar thing earlier. And it surely works. You should have missed some entries in Activity, manifest, styles etc for making the Activity background blur/translucent. I have created a demo project to demonstrate this. Tell me how can I send u the project. mail or some web upload? -- Regards, Udayan Warnekar Android Application Developer On Jun 17, 8:15 am, mike hasitharand...@gmail.com wrote: hi UD, thanks for your explanation. but this solution will not work for Blur Screen. i have tried it out before. if you starts Activity C (Blur Activity) like Intent i = new Intent(ActivityB.this, ActivityC.class); startActivityForResult(i, 1001); then the Activity C will not appear as blur. have you tried this before. or i'll send you a simple sample regards, Mike -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 launch browser from wallpaper?
I'm trying to launch the browser from a wallpaper, but I get a NullpointerException... code looks like this: Intent i = new Intent(); i.setAction(Intent.ACTION_VIEW); i.addCategory(Intent.CATEGORY_BROWSABLE); i.setData(Uri.parse(http://google.com;)); Activity activity = new Activity(); activity.startActivity(i); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: bug with notifyDataSetChanged() in ArrayAdapter ?
by overriding the default ArrayAdapter I mean overriding the getView(), getViewTypeCount() and getItemViewType() methods. This is the recommended way of changing the ways the items are displayed according to the javadoc, so I guess it should not cause problem : To use something other than TextViews for the array display, for instance, ImageViews, or to have some of data besides toString() results fill the views, override getView(int, View, ViewGroup) to return the type of view you want. Anyways, I have tried to remove all my overrided methods and the problem is still there ... On Jun 17, 10:42 am, Kumar Bibek coomar@gmail.com wrote: I have a strange problem with one of my ListActivity. I have overrided the default ArrayAdapter in order to customize my list. I have then filled the adapter with an ArrayList. This is a custom array adapter. Thanks and Regards, Kumar Bibekhttp://tech-droid.blogspot.com On Jun 17, 1:27 pm, Christophe christophe.lebesner...@gmail.com wrote: the only example I have found for ArrayAdapter in the API example doesn't show how to add element in the array : http://developer.android.com/resources/samples/ApiDemos/src/com/examp... and getCount() is not overrided in this example ... On Jun 16, 9:39 pm, Kumar Bibek coomar@gmail.com wrote: You have to override the getCount method. Please go through the examples to check how the Adapters work. Thanks and Regards, Kumar Bibekhttp://tech-droid.blogspot.com On Jun 16, 6:07 pm, Christophe christophe.lebesner...@gmail.com wrote: hello everyone, I have a strange problem with one of my ListActivity. I have overrided the default ArrayAdapter in order to customize my list. I have then filled the adapter with an ArrayList. If I insert an element on the list and then call notifyDataSetChanged() on the adapter everything works fine. But if I insert an element at the END of the list and then call notifyDataSetChanged(), the new element doesn't appear ... And finally if I override getCount() on my adapter like this : @Override public int getCount() { return myArrayList.size(); } then everything works fine. Is this a bug or am I doing something wrong ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
RE: [android-developers] How to launch browser from wallpaper?
Hi, Doing Activity activity = new Activity() is probably not a good idea. instead, get the application context from the wallpaper: getApplicationContext().startActivity(i); That will probably work better. /Anders -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Stu.Axon Sent: den 17 juni 2010 11:30 To: Android Developers Subject: [android-developers] How to launch browser from wallpaper? I'm trying to launch the browser from a wallpaper, but I get a NullpointerException... code looks like this: Intent i = new Intent(); i.setAction(Intent.ACTION_VIEW); i.addCategory(Intent.CATEGORY_BROWSABLE); i.setData(Uri.parse(http://google.com;)); Activity activity = new Activity(); activity.startActivity(i); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 finishActivity()
Hi Mike, I have mailed u a sample project. Check out and reply back in case of any issues. -- Regards, UD On Jun 17, 8:15 am, mike hasitharand...@gmail.com wrote: hi UD, thanks for your explanation. but this solution will not work for Blur Screen. i have tried it out before. if you starts Activity C (Blur Activity) like Intent i = new Intent(ActivityB.this, ActivityC.class); startActivityForResult(i, 1001); then the Activity C will not appear as blur. have you tried this before. or i'll send you a simple sample regards, Mike -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: bug with notifyDataSetChanged() in ArrayAdapter ?
On Jun 16, 11:07 am, Christophe christophe.lebesner...@gmail.com wrote: hello everyone, I have a strange problem with one of my ListActivity. I have overrided the default ArrayAdapter in order to customize my list. I have then filled the adapter with an ArrayList. If I insert an element on the list and then call notifyDataSetChanged() on the adapter everything works fine. But if I insert an element at the END of the list and then call notifyDataSetChanged(), the new element doesn't appear ... And finally if I override getCount() on my adapter like this : @Override public int getCount() { return myArrayList.size(); } what is myArrayList and how do you append item to your ArrayAdapter? pskink -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] power manager (Light off) in android
Hi Nandan, I think it's impossible to do...maybe it's possible on a rooted phone, but that's not what I'm after. Maybe it will be possible in the future, with Gingerbread. It appears to be something that only apps with Google's signature can access. On that quote you have from my previous message, I was just wondering if running the app from the emulator (rather that going through the normal install process) somehow was bypassing some important part of the the phones security process. But, it's clear it isn't. You are testing on a real phone and have the same issue. Regards, Richard hi Richard i m running my application on device . any solution you find about this problem. i cant understand this line I'm wondering if you have to officially install the package to get it recognized by the emulator? what this mean... thank you With Regrads bhavesh On Mon, Jun 14, 2010 at 6:09 AM, Richard Cox conard...@gmail.com wrote: I'm having the same issue. I made sure the permission was set as a child of the manifest element in the manifest file. It always fails in the emulator with the same security exception you have. I'm wondering if you have to officially install the package to get it recognized by the emulator? I just run it from eclipse with the 'run as' command. Also, does anybody know why the 'reboot' method in the PowerManager class seems to be missing in 2.1? Regards Richard hii . Currently i m facing a problem to switch off light in android application. i m trying to power manager gotosleep method but its giving a below problem . *java.lang.RuntimeException: Unable to start activity ComponentInfo{org.bhavesh/org.bhavesh.mainactivity}: * * * *java.lang.SecurityException: Neither user 10024 nor current process has android.permission.DEVICE_POWER.* but i already given a android.permission.DEVICE_POWER in manifest file. can any one tell me why its happened in android. yaa any other method to off the light in android.. Thank you in advanced With Regrads bhavesh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsu bscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 in stopping thread
Hello, I want to stop currently running thread but -Thread.stop() -Thread.destroy() are DEPRECATED so can any one tell me how to stop the Thread -- Regards, Brijesh Masrani -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 in stopping thread
On Thu, Jun 17, 2010 at 4:07 PM, brijesh masrani masrani.brij...@gmail.comwrote: Hello, I want to stop currently running thread but -Thread.stop() -Thread.destroy() are DEPRECATED so can any one tell me how to stop the Thread -- Regards, Brijesh Masrani -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: bug with notifyDataSetChanged() in ArrayAdapter ?
On Jun 16, 11:07 am, Christophe christophe.lebesner...@gmail.com wrote: hello everyone, I have a strange problem with one of my ListActivity. I have overrided the default ArrayAdapter in order to customize my list. I have then filled the adapter with an ArrayList. If I insert an element on the list and then call notifyDataSetChanged() on the adapter everything works fine. But if I insert an element at the END of the list and then call notifyDataSetChanged(), the new element doesn't appear ... And finally if I override getCount() on my adapter like this : @Override public int getCount() { return myArrayList.size(); } what's myArrayList and how do you append items to your ArrayAdapter? pskink -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Thread Problem
Hello, I want to stop currently running thread but -Thread.stop() - Thread.destroy() are DEPRECATED so can any one tell me how to stop the Thread -- Regards, Brijesh Masrani -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: bug with notifyDataSetChanged() in ArrayAdapter ?
On Jun 16, 11:07 am, Christophe christophe.lebesner...@gmail.com wrote: hello everyone, I have a strange problem with one of my ListActivity. I have overrided the default ArrayAdapter in order to customize my list. I have then filled the adapter with an ArrayList. If I insert an element on the list and then call notifyDataSetChanged() on the adapter everything works fine. But if I insert an element at the END of the list and then call notifyDataSetChanged(), the new element doesn't appear ... And finally if I override getCount() on my adapter like this : @Override public int getCount() { return myArrayList.size(); } what's myArrayList and how do you append items to your ArrayAdapter? pskink -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Problem in stopping thread
Hi, Thread.stop() and destroy were risk in the Threading class. the method I use to stop thread is to use return; statement where I want to stop the thread. like new Thread ( new Runnable() { public void run(){ if ( condition ) return; // this will stop the thread. } }).start(); On Thu, Jun 17, 2010 at 3:37 PM, brijesh masrani masrani.brij...@gmail.comwrote: Hello, I want to stop currently running thread but -Thread.stop() -Thread.destroy() are DEPRECATED so can any one tell me how to stop the Thread -- Regards, Brijesh Masrani -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Regards, Abdul Mateen, Software Engineer at Rounded Labs Ltd. Linux Administrator at Addictive Mobility Inc Mobile : +92-333-3265875. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Prevent application from showing up when dialing.
On Thu, Jun 17, 2010 at 12:41 AM, Achanta krishna.acha...@gmail.com wrote: But I just discovered that whenever I try to add another call when I am in a call, it promps me to complete the action using. 1. my app 2. The normal phone And when I click on my app, it just opens my app. I do not understand what is causing this and do not want my app to be shown in that list. Here is the snippet from manifest activity android:name=.MyActivity android:label=@string/main_header intent-filter action android:name=android.intent.action.DIAL / category android:name=android.intent.category.DEFAULT / /intent-filter /activity Get rid of your intent-filter. and here is what I have in my onClick method of the emergency button. Intent dial_911 = new Intent(Intent.ACTION_DIAL, Uri.parse(tel://911)); startActivity(dial_911); Use new Intent(this, MyReallyScaryActivity.class) instead. -- Mark Murphy CommonsWare mmur...@commonsware.com http://commonsware.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
Re: [android-developers] AlarmManager ceasing to function. Dropping single shot alarms.
On Wed, Jun 16, 2010 at 10:28 PM, Robert Macaulay robert.macau...@gmail.com wrote: What does the numbers in Alarm stats mean here? I'm assuming its the alarm count totals, but not sure on the time or the flg parts. The flg=0x4 is the set of flags on the Intent in the PendingIntent. I think 0x4 is FLAG_FILL_IN_CATEGORIES. The 142 alarms is the number of times this alarm was fired, near as I can tell. The 51759ms running is the aggregate time spent in onReceive(), again, near as I can tell. -- Mark Murphy CommonsWare mmur...@commonsware.com http://commonsware.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: bug with notifyDataSetChanged() in ArrayAdapter ?
myArrayList is a simple ArrayList : ArrayListStep myArrayList = new ArrayListstep(); which I give to my adapter in my ListActivity : adapter = new StepItemAdapter(this, myArrayList); this.setListAdapter(adapter); Later I add item to my list and try to refresh the view : myArrayList.add(position, new Step()); adapter.notifyDataSetChanged(); On Jun 17, 12:42 pm, skink psk...@gmail.com wrote: On Jun 16, 11:07 am, Christophe christophe.lebesner...@gmail.com wrote: hello everyone, I have a strange problem with one of my ListActivity. I have overrided the default ArrayAdapter in order to customize my list. I have then filled the adapter with an ArrayList. If I insert an element on the list and then call notifyDataSetChanged() on the adapter everything works fine. But if I insert an element at the END of the list and then call notifyDataSetChanged(), the new element doesn't appear ... And finally if I override getCount() on my adapter like this : @Override public int getCount() { return myArrayList.size(); } what's myArrayList and how do you append items to your ArrayAdapter? pskink -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: bug with notifyDataSetChanged() in ArrayAdapter ?
On Jun 17, 9:37 am, Christophe christophe.lebesner...@gmail.com wrote: myArrayList is a simple ArrayList : ArrayListStep myArrayList = new ArrayListstep(); which I give to my adapter in my ListActivity : adapter = new StepItemAdapter(this, myArrayList); this.setListAdapter(adapter); if your StepItemAdapter extends ArrayAdapter you dont need myArrayList Later I add item to my list and try to refresh the view : myArrayList.add(position, new Step()); adapter.notifyDataSetChanged(); just use adapter.add() and/or adapter.insert() pskink -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Problem in stopping thread
I personally do that kind of thing: class MyThread extends Thread { private boolean done; public void run() { while (true) { synchronized (this) { if (done) break; } /* do a small part of the heavy work */ } /* cleanup, close files, etc.. */ } /* Call release() to stop/cancel */ public void release() { synchronized (this) { done = true; } /* Wait for run() to return */ try { join(); } catch (InterruptedException e) { } } } Olivier On 06/17/2010 12:42 PM, Abdul Mateen wrote: Hi, Thread.stop() and destroy were risk in the Threading class. the method I use to stop thread is to use return; statement where I want to stop the thread. like new Thread ( new Runnable() { public void run(){ if ( condition ) return; // this will stop the thread. } }).start(); On Thu, Jun 17, 2010 at 3:37 PM, brijesh masrani masrani.brij...@gmail.com mailto:masrani.brij...@gmail.com wrote: Hello, I want to stop currently running thread but -Thread.stop() -Thread.destroy() are DEPRECATED so can any one tell me how to stop the Thread -- Regards, Brijesh Masrani -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Regards, Abdul Mateen, Software Engineer at Rounded Labs Ltd. Linux Administrator at Addictive Mobility Inc Mobile : +92-333-3265875. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: bug with notifyDataSetChanged() in ArrayAdapter ?
Shink, thank you for your answer. the add() and insert() work as expected. However it is a lot easier for me to manipulate directly my ArrayList (it is more flexible and the ArrayAdapter API lack some methods). I think I will keep my current code with the overrided getCount() method so I don't have to add to code to keep the ArrayAdapter in sync with my ArrayList. On Jun 17, 1:53 pm, skink psk...@gmail.com wrote: On Jun 17, 9:37 am, Christophe christophe.lebesner...@gmail.com wrote: myArrayList is a simple ArrayList : ArrayListStep myArrayList = new ArrayListstep(); which I give to my adapter in my ListActivity : adapter = new StepItemAdapter(this, myArrayList); this.setListAdapter(adapter); if your StepItemAdapter extends ArrayAdapter you dont need myArrayList Later I add item to my list and try to refresh the view : myArrayList.add(position, new Step()); adapter.notifyDataSetChanged(); just use adapter.add() and/or adapter.insert() pskink -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Unmarshal Parcleable in Broadcast Reviever
Hello, anyone can point me why i get alway a ClassNotFoundException in my BroadcastReviever using a custom Parcleable ? I enqueue Alarms, which trigger the BroadcastReciever: for (int i = 0; i alertsToEnqueue.size(); i++) { final Alert alert = alertsToEnqueue.get(i); final Intent intent = new Intent(_context, AlarmBroadcastReciever.class); intent.putExtra(IntentConstants.ALERT, alert); intent.setAction(IntentConstants.DE_MACSYSTEMS_WINDROID_ALERT_TRIGGER); final PendingIntent pendingIntent = PendingIntent.getBroadcast(_context, REQUEST_COUNTER.incrementAndGet(), intent, PendingIntent.FLAG_ONE_SHOT); alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, now + INITIAL_DELAY, (10L * 1000L), pendingIntent); if (Logging.isLoggingEnabled()) { Log.d(LOG_TAG, Enqueued Alert + alert.toString()); } } // In my Manifest: receiver android:name=de.macsystems.windroid.receiver.AlarmBroadcastReciever android:label=@string/app_name android:enabled=true android:exported=false intent-filter action android:name=de.macsystems.windroid.ALERT_TRIGGER / /intent-filter /receiver Thx for your help, Jens -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: blank screen with opengl
Thank you SO much, it's just what I needed. Awesome tutorial. Simone On 16 Giu, 23:40, Max Gilead max.gil...@gmail.com wrote: I'd suggest going with some basic tutorial likehttp://insanitydesign.com/wp/projects/nehe-android-ports/and building on what you learn, modifying code little step by step so you're always a couple of Ctrl-Zs from a working version. Max -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: bug with notifyDataSetChanged() in ArrayAdapter ?
On Jun 17, 10:48 am, Christophe christophe.lebesner...@gmail.com wrote: Shink, thank you for your answer. the add() and insert() work as expected. However it is a lot easier for me to manipulate directly my ArrayList (it is more flexible and the ArrayAdapter API lack some methods). I think I will keep my current code with the overrided getCount() method so I don't have to add to code to keep the ArrayAdapter in sync with my ArrayList. so extend BaseAdapter or ResourceAdapter then, not ArrayAdapter pskink -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Unmarshal Parcleable in Broadcast Reviever
On Thu, Jun 17, 2010 at 8:53 AM, mac-systems jens.h...@gmx.de wrote: anyone can point me why i get alway a ClassNotFoundException in my BroadcastReviever using a custom Parcleable ? I've seen mention of this before on this list. IIRC, Android attempts to de-serialize the Parcelable inside the AlarmManagerService, and it does not have your class in the OS, just in your process. Hence, the operation fails. -- Mark Murphy CommonsWare mmur...@commonsware.com http://commonsware.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Unmarshal Parcleable in Broadcast Reviever
Yes, docu sucks big time there, no bock even has examples how to do this! Any way to go around this ? If tried to set the ClassLoader like this: @Override public void onReceive(final Context context, final Intent intent) { intent.setExtrasClassLoader(Alert.class.getClassLoader()); Now i get new exception output (first line): 06-17 15:37:45.456: ERROR/Bundle(226): readBundle: bad magic number 06-17 15:37:45.456: ERROR/Bundle(226): readBundle: trace = java.lang.RuntimeException 06-17 15:37:45.456: ERROR/Bundle(226): at android.os.Bundle.readFromParcelInner(Bundle.java:1473) 06-17 15:37:45.456: ERROR/Bundle(226): at android.os.Bundle.init(Bundle.java:82) 06-17 15:37:45.456: ERROR/Bundle(226): at android.os.Parcel.readBundle(Parcel.java:1344) 06-17 15:37:45.456: ERROR/Bundle(226): at de.macsystems.windroid.alarm.Alert$1.createFromParcel(Alert.java:182) 06-17 15:37:45.456: ERROR/Bundle(226): at de.macsystems.windroid.alarm.Alert$1.createFromParcel(Alert.java:1) Whatever Magic Number there means, i beginn to think google wont like to fix any bugs just add features! regards, Jens -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Unmarshal Parcleable in Broadcast Reviever
On Thu, Jun 17, 2010 at 9:51 AM, mac-systems jens.h...@gmx.de wrote: Yes, docu sucks big time there, no bock even has examples how to do this! Any way to go around this ? Don't use custom Parcelables in Intents used with alarms. Whatever you are putting in the Parcelable is hopefully backed by a database or other persistent storage. If so, put the key to the data in the Intent as a primitive extra (e.g., string, integer), and load in the rest of the data as needed. -- Mark Murphy CommonsWare mmur...@commonsware.com http://commonsware.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: switching GPS on and off
ok, so if I have a widget on my desktop on the phone and gps is switch off (dispabled) how should I enable/disable it. I couldn't find anything on that. the other thing is that when I use ddms to fake gps and I send long/ lat-d manually my location listener is telling me that for first time status is temporary unavailable then it is available but no updates on positions comes as I click. is it a bug or feature. I need to try this in my phone. On Jun 16, 2:04 pm, Mark Murphy mmur...@commonsware.com wrote: On Wed, Jun 16, 2010 at 7:42 AM, kamiseq kami...@gmail.com wrote: funny cos I ve always turned on GPS before using maps or other application :-) You may be confusing enabled and on. For example, HTC Sense phones have a home screen feature that looks like an on/off switch for GPS. That, however, controls whether GPS is enabled. GPS is only truly powered on if some application is looking for location data. GPS receivers consume a fair bit of battery life, so you do not want to keep them powered on all of the time. -- Mark Murphy CommonsWare mmur...@commonsware.comhttp://commonsware.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
Re: [android-developers] Re: switching GPS on and off
On Thu, Jun 17, 2010 at 10:04 AM, kamiseq kami...@gmail.com wrote: ok, so if I have a widget on my desktop on the phone and gps is switch off (dispabled) how should I enable/disable it. I couldn't find anything on that. The user does that (e.g., via the Settings application). Your code cannot change whether GPS is enabled or disabled. -- Mark Murphy CommonsWare mmur...@commonsware.com http://commonsware.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: usb driver mytouch slide
All you need to do is open the android_winusb.ini file that is in the drivers folder of the SDK. then add this to the file ;MyTouch Slide %SingleAdbInterface%= USB_Install, USB\VID_0BB4PID_0E03 %CompositeAdbInterface% = USB_Install, USB\VID_0BB4PID_0E03MI_01 %SingleBootLoaderInterface% = USB_Install, USB\VID_0BB4PID_0FFF then reinstall the driver for your device On Jun 3, 12:00 am, dlugolinski dlugolinsk...@gmail.com wrote: I need the adb driver for the mytouchslide. does it exist yet? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Repackaging Android System Classes in an application
I understand don't do this... trust me I don't want to, but it doesn't answer the question if it will work in a market app. The rationale behind it, is that the rendering implementations between 1.5 and newer versions forward have a minor change with a large impact with regards to Z ordering. Since bug fixes aren't back ported there needs to be some way to intercept the call and correct it. I understand it's fragile however it's only meant to support 1.5, which as much as it gets neglected, still has a decent amount of people using it. We use a wrapper around WindowSession to correct the Z ordering on calls to relayout(). Again, trust me, the fragility is known. However a better rationale is, that when this app, that as you said will likely break, ... breaks, it would be assumed that support for the broken version of the OS would also be dropped ;) -Greg On Jun 16, 6:57 pm, Dianne Hackborn hack...@android.com wrote: Don't do this. This is not a security issue at all; it just makes an app that will likely break itself. On Wed, Jun 16, 2010 at 12:47 PM, Greg Giacovelli miyamo...@gmail.comwrote: Hi, So I came across this today and was wondering does this work in production app or does it merely work because my phone allows non market apks. Here is an example, Take a class like, android.view.IWindow, and copy it's source into your project and recompile it after changing a few things. (Don't rename or repackage it). Now when your APK loads in the VM, something odd happens. 06-15 23:30:32.148: DEBUG/installd(555): DexInv: --- BEGIN '/data/app/ vmdl22987.tmp' --- 06-15 23:30:32.818: DEBUG/dalvikvm(1062): DexOpt: 'Landroid/view/ IWindow;' has an earlier definition; blocking out 06-15 23:30:32.818: DEBUG/dalvikvm(1062): DexOpt: 'Landroid/view/ IWindowSession;' has an earlier definition; blocking out 06-15 23:30:33.218: DEBUG/dalvikvm(1062): DexOpt: not verifying 'Landroid/view/IWindow;': multiple definitions 06-15 23:30:33.218: DEBUG/dalvikvm(1062): DexOpt: not verifying 'Landroid/view/IWindowSession;': multiple definitions So the logging is a little ambiguous, but is it saying that the classes in this APK are blocking out previous versions and that these new classes aren't being verified. If so I hope this is only succeeding because as developers most targets are in development mode when allowing non market apks (non rooted phones). However does this work in market released apps as well? This seems like a really nasty security exploit if I can override system interfaces just for my application. -Greg -Greg -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 interrupt a blocked URLConnect call?
I'm having issue when I'm trying to connect to a url and it takes longer than expected. My code tries to close the connection but sometimes it is blocked by the URLconnection connect call. The block happens even before I can get my InputStream. What are good ways to stop the request fast without waiting for the timeout set for the connection? Thanks! -Moto -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to change the divider height of listview dynamically?
Hi, Can you let me know how can one return two different views from getView method? I am able to return the row from the getView method but have no idea about how to return the listview height. Let me know how to do that in case you know it. Thanks Regards Sunil -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to change the divider height of listview dynamically?
On Thu, Jun 17, 2010 at 10:52 AM, javame_android su...@softwebsolutions.com wrote: Can you let me know how can one return two different views from getView method? Override getViewTypeCount() and getItemViewType() in your Adapter. -- Mark Murphy CommonsWare mmur...@commonsware.com http://commonsware.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
Re: [android-developers] what is the better application to implement XML program
I suppose you are asking for a recommendation for an XML parsing library. There are about four on Android. I mostly use org.xml.sax. Which one is better? I think you can understand that means better for what. So you have to tell us what you're trying to do. Or you can do some research on the web to understand the pros and cons of the different XML parsing technologies. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Making the Java assert statement work
I think most Java programmers use Exceptions or logging instead of asserts. The philosophy is that your code should always be able to gracefully handle any impossible condition. The great advantage of Exceptions is they can be caught and handled by your code, re-thrown with wrapper Exceptions, and they can propagate up the call chain. The downside is you need to code them intelligently. I won't go into all the details here, and a good Java book would do the topic better justice than I. Logging usually provides a better time-sequence context for exceptional conditions. Additional code quality tools are unit tests and a good IDE with debugger (I always get a kick out of debugging Java servlets with Eclipse). -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Unmarshal Parcleable in Broadcast Reviever
Of course this is always an option. But sometimes its just annoying. But its always wise to keep informations together without always asking the Database. thx, Jens On 17 Jun., 15:56, Mark Murphy mmur...@commonsware.com wrote: On Thu, Jun 17, 2010 at 9:51 AM, mac-systems jens.h...@gmx.de wrote: Yes, docu sucks big time there, no bock even has examples how to do this! Any way to go around this ? Don't use custom Parcelables in Intents used with alarms. Whatever you are putting in the Parcelable is hopefully backed by a database or other persistent storage. If so, put the key to the data in the Intent as a primitive extra (e.g., string, integer), and load in the rest of the data as needed. -- Mark Murphy CommonsWare mmur...@commonsware.comhttp://commonsware.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
Re: [android-developers] java.lang.OutOfMemoryError: bitmap size exceeds VM budget
Yup. We've been running in that case too many times. Invest in a good tool like Yourkit, use HPROF Heap dumps to find the objects with the sticky connects to JVM root and prepare to spend nights on trying again and again.. I recommend writing automated Unit-Tests for that as well. So that you can call certain activities 100 times and see whether they retain in memory or not. Very helpful for us. Also check basics like background pictures can be encoded as JPG instead of PNG to save some memory... BR On Thu, Jun 17, 2010 at 3:33 PM, Romain Guy romain...@android.com wrote: When you get such an error it's because *your* process is running out of memory. Other processes have nothing to do with it. You are using too much memory in your process and blowing past the heap limit (16 MB or 24 MB depending on the device you're using.) On Thu, Jun 17, 2010 at 12:07 AM, Amit magic.man.a...@gmail.com wrote: Hi java.lang.OutOfMemoryError: bitmap size exceeds VM budget I am getting this message in my log. As I investigated and found out while loading contact image this error comes.I checked size of the image file and it was normal so came to a conclusion that other processes filling up the memory and hence at the time this image is being loaded ,VM running low of memory. My question is that, is there any tool to figure out which process is responsible for occupying memory so that we can look into the process for the exact reason. Thanks, Amit -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Not show a ProgressDialog from my Activity
I try to show a ProgressDialog at the beginning of my application from an Activity. I debug the application and in theory the dialog is created because it prints a line from onCreateDialog... method. Any idea? For more test, I try to show a toast with: Toast.makeText(MyActivity.this, test, Toast.LENGTH_LONG); And nothing is showed. If is useful, the application is a widget. Thanks for all, SBC http://desbc.blogspot.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: video player using hardware to encode/decode
No ideas? At least, how can I call the hardware from my ndk native application? On Jun 8, 3:33 pm, Android dev gian23...@gmail.com wrote: I know that the mediaplayer api uses hardware acceleration to encode/ decode video. Now I want to develop my own video player application without using the mediaplayer api, but still using the hardware to encode/decode video. Any tips on how can I 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
Re: [android-developers] Thread Problem
In your thread you probably have something like: public void run () { while (true) { doSomeWork(); } } what you need is a boolean var that checks whether to continue 'doing work', or stop the thread. Like this: public void run () { while (!stopThread) { doSomeWork(); } } Then, when you want to stop the thread, set stopThread to true. Yuvi On Thu, Jun 17, 2010 at 12:40 PM, brijesh masrani.brij...@gmail.com wrote: Hello, I want to stop currently running thread but -Thread.stop() - Thread.destroy() are DEPRECATED so can any one tell me how to stop the Thread -- Regards, Brijesh Masrani -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- YuviDroid http://android.yuvalsharon.net -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Repackaging Android System Classes in an application
On Thu, Jun 17, 2010 at 7:12 AM, Greg Giacovelli miyamo...@gmail.comwrote: I understand don't do this... trust me I don't want to, but it doesn't answer the question if it will work in a market app. It means don't do this. That means this won't work, or at the very least expect your app to break in random ways at random times because you are very obviously using private APIs in it. The rationale behind it, is that the rendering implementations between 1.5 and newer versions forward have a minor change with a large impact with regards to Z ordering. Which change is that? Since bug fixes aren't back ported there needs to be some way to intercept the call and correct it. You can't. I understand it's fragile however it's only meant to support 1.5, which as much as it gets neglected, still has a decent amount of people using it. We use a wrapper around WindowSession to correct the Z ordering on calls to relayout(). You don't know what that interface may look like. The standard open-source platform has a particular definition -- but even that can change as the platform is patched, and any device manufacturer can change it however they'd like. Again, trust me, the fragility is known. However a better rationale is, that when this app, that as you said will likely break, ... breaks, it would be assumed that support for the broken version of the OS would also be dropped ;) How about we stepping back a bit and we can talk about what the problem is you are trying to solve, to see if there is another better way to do it? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] AutoCompleteTextView with autoText
I am trying to get autoText to work with AutoCompleteTextView. Since AutoCompleteTextView is a subclass of EditText, it should work but doesn't. Is this possible? Thanks in advance for any help, Orville -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Not show a ProgressDialog from my Activity
On Jun 17, 5:07 pm, sergi...@gmail.com sergi...@gmail.com wrote: I try to show a ProgressDialog at the beginning of my application from an Activity. I debug the application and in theory the dialog is created because it prints a line from onCreateDialog... method. Are you trying to create the dialog/toast on your UI thread? If so, they won't appear if that thread is busy; you need to launch another thread for them. Or preferably, move your long-running process (the one that needs a progress indicator) from the UI thread into the background, and keep the UI thread for the UI. That'll also help you avoid app-not-responding errors. String -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] setContentView of a Custom View
Hello, My current painting activity is built off of FingerPaint.java from the API Demos. In my xml I declared the custom view, see below. When I setContentView(view); everything works fine, but the problem is when I setContentView(paint_layout.xml) it does not work properly. ///PaintActivity/// public class Paint extends PaintActivity implements ColorPickerDialog.OnColorChangedListener { private Paint mPaint; private PaintView view; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); view = new PaintView(this); setContentView(view); //Set mPaint code } public class PaintView extends View { //PaintView code } //Paint code } ///paint_layout.xml/// FrameLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/paint android:layout_width=fill_parent android:layout_height=fill_parent com.myname.appname.PaintView android:id=@+id/PaintView android:layout_width=fill_parent android:layout_height=fill_parent / !-- other buttons and text -- /FrameLayout Can anyone inform me of why exactly? Am I missing an attribute for the custom layout in the xml? Thank you! Matt. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] MarkerClusterer for MapView
Hi All, I've just been playing with MarkerClusterer in the Google Maps API. I love it. Fantastic way to handle large numbers of Markers in a map. An example here: http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclusterer/1.0/examples/advanced_example.html Does anyone know if there are plans to support this kind of thing in an Android MapView? Many thanks in advance CHEERS SAM -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Two way contact sync
Hey, I'm developing an application that needs a two way sync of its own custom contacts. I saw the sample code on Android developer website (talking about AccountManager here and the sample sync adapter code), but that only syncs from the cloud to the device. Is there a way to do the two way sync? Can someone point me in the right direction with this? Could really use the help here. 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: How to avoid PlayerDriver invalid percentage value error?
¿no help? :( On Jun 10, 12:20 am, Androide tonipr...@gmail.com wrote: I want to play a live streaming in mp3, but when i call prepareAsync, invalidpercentagevalue xxx shows. This is a example of live streaming: http://83.231.187.202:80/rtve/radio1.mp3 And this is my simplified code: mp = new MediaPlayer(); try { mp.setDataSource(http://83.231.187.202:80/rtve/radio1.mp3;); } catch (Exception e) { } mp.setOnPreparedListener( new OnPreparedListener() { @Override public void onPrepared(MediaPlayer mp) { mp.start(); } }); Button button = (Button) findViewById(R.id.Button01); button.setOnClickListener( new OnClickListener() { @Override public void onClick(View v) { mp.prepareAsync(); } I understand why this is happening, but other apps use this method and don't show any error in logcat. How can i get this? Regards. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Should I bother with my own sync adapter?
In my current app I decided to integrate into account management and create a sync adapter. I'm wondering if it's worth doing this over an alarm manager approach as I don't believe it's supported below 2.0? Even worse I'm currently using a 2.2 API to set the sync interval (not possible before ??) which is definitely a problem! Also the users accounts have no contacts associated with them so at times my account type shows up in dialogues that aren't really applicable. Sounds like I've answered my own question but I'm curious to hear other perspectives. Cheers, Stace -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Not show a ProgressDialog from my Activity
I'm trying to create the Toast (for example) on onResume() method from the configuration Activity of my widget Thanks for all, SBC On 17 jun, 18:44, String sterling.ud...@googlemail.com wrote: On Jun 17, 5:07 pm, sergi...@gmail.com sergi...@gmail.com wrote: I try to show a ProgressDialog at the beginning of my application from an Activity. I debug the application and in theory the dialog is created because it prints a line from onCreateDialog... method. Are you trying to create the dialog/toast on your UI thread? If so, they won't appear if that thread is busy; you need to launch another thread for them. Or preferably, move your long-running process (the one that needs a progress indicator) from the UI thread into the background, and keep the UI thread for the UI. That'll also help you avoid app-not-responding errors. String -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Two way contact sync
There is no conceptual difference between a one-way and a two-way sync. My understanding is that most people start the sync by sending local changes to the server and then get incoming changes. The DIRTY column on RawContact will tell you what changed locally. Make sure you reset the flag after the changes have been successfully sent to the server. You can use the Exchange sync as a source of inspiration. Unfortunately, it's crazy complex (out of necessity). Still you may dig up some copy/paste opportunities there, e.g. the commit method: http://android.git.kernel.org/?p=platform/packages/apps/Email.git;a=blob;f=src/com/android/exchange/adapter/ContactsSyncAdapter.java http://android.git.kernel.org/?p=platform/packages/apps/Email.git;a=blob;f=src/com/android/exchange/adapter/ContactsSyncAdapter.java Cheers, Dmitri On Thu, Jun 17, 2010 at 10:06 AM, BeerBelly bostjan.bru...@gmail.comwrote: Hey, I'm developing an application that needs a two way sync of its own custom contacts. I saw the sample code on Android developer website (talking about AccountManager here and the sample sync adapter code), but that only syncs from the cloud to the device. Is there a way to do the two way sync? Can someone point me in the right direction with this? Could really use the help here. 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] AutoCompleteTextView with autoText
hii in this code i m used autocomplete text box to display phone no from contect list and dialed no. this can help you phonetext = (AutoCompleteTextView) findViewById(R.id.PhoneText); ContentResolver content = getContentResolver(); Cursor cursor = content.query(Calls.CONTENT_URI, PROJECTION, Calls.NUMBER+ like ?, new String[] { %...@% }, Calls.DEFAULT_SORT_ORDER); CallsAdapter adapter = new CallsAdapter(this, cursor); phonetext.setAdapter(adapter); String phoneno = (String) getIntent().getCharSequenceExtra( org.adore.callstring); phonetext.setText(phoneno); logotab1 = (ImageView) findViewById(R.id.tab1ImageView); eventsData = new EventDataSQLHelper(getBaseContext()); logotab1.setImageResource(R.drawable.logso); SQLiteDatabase db = eventsData.getReadableDatabase(); cursor = db.query(EventDataSQLHelper.TABLE, null, null, null, null, null, _id DESC); ContentResolver content = getContentResolver(); Cursor cursor = content.query(Contacts.People.CONTENT_URI, PEOPLE_PROJECTION, null, null, Contacts.People.DEFAULT_SORT_ORDER); tabactivity4.ContactListAdapter adapter = new tabactivity4.ContactListAdapter( this, cursor); phonetext.setAdapter(adapter); With regrads bhavesh On Thu, Jun 17, 2010 at 10:14 PM, creativepragmatic creativepragma...@gmail.com wrote: I am trying to get autoText to work with AutoCompleteTextView. Since AutoCompleteTextView is a subclass of EditText, it should work but doesn't. Is this possible? Thanks in advance for any help, Orville -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- B!-!/-\\/!=$!-! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Video plays audio after device sleeps (OS 2.1 only)
To replicate: 1. Play any video with audio. 2. Put the device to sleep using the hard key (varies by device). Audio for the selected video will start playing after a few seconds while the device is asleep. I am calling VideoView.pause() in the onPause() of the activity and VideoView.stopPlayback() in the onStop() of the activity. This does not happen prior to the 2.1 SDK from all our testing but in 2.1 it now appears to happen almost every time. We have tested this on the moto DROID and the Google NexusOne. Any ideas would be VERY welcome. Mark -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Two way contact sync
The DIRTY column looks like exactly the thing I need. Didn't see it when browsing the documentation...was like for a CHANGED flag or something like it... I'm gonna try my luck with this and see how it goes. Thanks for the help. On Jun 17, 7:47 pm, Dmitri Plotnikov dplotni...@google.com wrote: There is no conceptual difference between a one-way and a two-way sync. My understanding is that most people start the sync by sending local changes to the server and then get incoming changes. The DIRTY column on RawContact will tell you what changed locally. Make sure you reset the flag after the changes have been successfully sent to the server. You can use the Exchange sync as a source of inspiration. Unfortunately, it's crazy complex (out of necessity). Still you may dig up some copy/paste opportunities there, e.g. the commit method: http://android.git.kernel.org/?p=platform/packages/apps/Email.git;a=b... http://android.git.kernel.org/?p=platform/packages/apps/Email.git;a=b... Cheers, Dmitri On Thu, Jun 17, 2010 at 10:06 AM, BeerBelly bostjan.bru...@gmail.comwrote: Hey, I'm developing an application that needs a two way sync of its own custom contacts. I saw the sample code on Android developer website (talking about AccountManager here and the sample sync adapter code), but that only syncs from the cloud to the device. Is there a way to do the two way sync? Can someone point me in the right direction with this? Could really use the help here. 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Line return when aligning to parent right
Hi all, thanks to myself... my workaround is : RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/input android:layout_height=wrap_content android:layout_width=fill_parent android:layout_alignRight=@+id/ main TextView android:text=€ android:id=@+id/TxtCurr android:layout_height=wrap_content android:textSize=48sp android:layout_width=wrap_content android:layout_alignParentRight=true / TextView android:text=0 android:id=@+id/TxtAdd android:layout_toLeftOf=@ +id/TxtCurr android:layout_height=wrap_content android:textSize=48sp android:layout_width=wrap_content/ On Jun 15, 11:57 pm, thanat0s thans...@trollprod.org wrote: Hi all, I try to display a sum .. for example 1945€ , i use this layout in portrait in a relative layout. TextView android:text=0€ android:id=@+id/TxtAdd android:layout_height=wrap_content android:textSize=48sp android:layout_width=wrap_content android:layout_alignParentRight=true It's works very well.. but if my number is 19.45€ the € is below the number on a new line.. more interesting... 919.45€ , all is displayed on the same line.. This append on a Real Nexus One, on the emulator in QVGA or HVGA it's works without any problems.. Someone got an idea ? Bye. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: switching GPS on and off
once again, maybe it is too much sun over here :) 1. gps is on (powered, whatever) when some app tries to obtain location info 2. gps is off if there is no app looking for location 3. you then said that For example, HTC Sense phones have a home screen feature that looks like an on/off switch for GPS. That, however, controls whether GPS is enabled. so there is some other state that gps can be in and it can be controlled by application. and yes I dont really understand the difference between on and enabled. On 17 Cze, 16:07, Mark Murphy mmur...@commonsware.com wrote: On Thu, Jun 17, 2010 at 10:04 AM, kamiseq kami...@gmail.com wrote: ok, so if I have a widget on my desktop on the phone and gps is switch off (dispabled) how should I enable/disable it. I couldn't find anything on that. The user does that (e.g., via the Settings application). Your code cannot change whether GPS is enabled or disabled. -- Mark Murphy CommonsWare mmur...@commonsware.comhttp://commonsware.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Google Maps and KMZ Files...Please help
Anyone have any suggestions on how I can get radar loops to display in my App? Even if its not using google maps...Please? On Jun 17, 1:37 am, Tommy droi...@gmail.com wrote: Hey everyone, I am currently wanting to display radar loops from the NOAA in my app as an overlay... On my computer I have been able to get them to work using google earth. Is there a way to replicate this with android using google maps or earth. Thanks for your time and help, Tommy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: AutoCompleteTextView with autoText
Thank you for your help Bhavesh. My question might have been vague. What I am trying to do is get the auto correct text to show above the soft keyboard in addition to the auto complete options. It always shows in EditText but not AutoCompleteTextView. I am wondering if what I am trying to do is impossible or if I should attempt a work around. Thanks again, Orville -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Unable To run Service
How can I access another service that's inside another package ,as when I did that using the normal way of updating the intent to the new package using i.setclassName(packageName,ClassName); updating the AndroidManifest.xml file with the new name ,,I got unable to start the service intent error as previous? Do i forget something that has to be done? On Wed, Jun 16, 2010 at 11:55 PM, tarek attia tarek.m.at...@gmail.comwrote: The problem was this in the AndroidManifest.xml :SS I was registering the service as following Service android:enabeled=true android:name.MyService/ and there was no problem in the compilation,,,I changed it to a lower-case letter not upper-case letter it worked fine service android:enabeled=true android:name.MyService/ On Tue, Jun 15, 2010 at 10:35 PM, Mark Murphy mmur...@commonsware.comwrote: On Tue, Jun 15, 2010 at 2:10 PM, tarek attia tarek.m.at...@gmail.com wrote: The Same Error What could cause this? I would recommend starting with an example that is known to work, then determining where the differences are. Here is an example of a local service: http://github.com/commonsguy/cw-android/tree/master/Service/WeatherPlus/ -- Mark Murphy CommonsWare mmur...@commonsware.com http://commonsware.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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- tarek -- tarek -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: switching GPS on and off
Hope this is some help, 2 use cases: Case 1 - starting with the GPS not enabled in the device settings User enables the GPS -- GPS is now enabled but not active Application uses the GPS -- GPS is now active {GPS things happen} Application stops using the GPS -- GPS goes back to not active Case 2 - starting with the GPS not enabled in the device settings Application uses the GPS -- GPS does NOT become active {errors} Application stops using the GPS -- no change in GPS state /Richard On Jun 17, 7:14 pm, kamiseq kami...@gmail.com wrote: once again, maybe it is too much sun over here :) 1. gps is on (powered, whatever) when some app tries to obtain location info 2. gps is off if there is no app looking for location 3. you then said that For example, HTC Sense phones have a home screen feature that looks like an on/off switch for GPS. That, however, controls whether GPS is enabled. so there is some other state that gps can be in and it can be controlled by application. and yes I dont really understand the difference between on and enabled. On 17 Cze, 16:07, Mark Murphy mmur...@commonsware.com wrote: On Thu, Jun 17, 2010 at 10:04 AM, kamiseq kami...@gmail.com wrote: ok, so if I have a widget on my desktop on the phone and gps is switch off (dispabled) how should I enable/disable it. I couldn't find anything on that. The user does that (e.g., via the Settings application). Your code cannot change whether GPS is enabled or disabled. -- Mark Murphy CommonsWare mmur...@commonsware.comhttp://commonsware.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Not show a ProgressDialog from my Activity
Resolved The problem was with the update method of widget Thanks, SBC On 17 jun, 19:43, sergi...@gmail.com sergi...@gmail.com wrote: I'm trying to create the Toast (for example) on onResume() method from the configuration Activity of my widget Thanks for all, SBC On 17 jun, 18:44, String sterling.ud...@googlemail.com wrote: On Jun 17, 5:07 pm, sergi...@gmail.com sergi...@gmail.com wrote: I try to show a ProgressDialog at the beginning of my application from an Activity. I debug the application and in theory the dialog is created because it prints a line from onCreateDialog... method. Are you trying to create the dialog/toast on your UI thread? If so, they won't appear if that thread is busy; you need to launch another thread for them. Or preferably, move your long-running process (the one that needs a progress indicator) from the UI thread into the background, and keep the UI thread for the UI. That'll also help you avoid app-not-responding errors. String -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: I've found a way to stop piracy of my apps
AAL has now been open-sourced. Find details here: http://bit.ly/coz0yB. On May 10, 4:24 pm, niko20 nikolatesl...@yahoo.com wrote: Well I will say one thing, if it was opened up, that would allow each dev to make small code changes, so it would never be cookie cutter then...however, I am not against that you are trying to make some income from it, I mean you still did have to do the work. -niko On May 10, 10:06 am, dadical keyes...@gmail.com wrote: That argument assumes that I don't respond to those cracks with improvements toAALthat will make it more difficult! :) Also, each app will need to be cracked individually, and I'm trying to work out some ways to make that a job that isn't cookie-cutter. The point here is to get this past the pain threshold where it won't be worth the trouble for an app that is only a few bucks. This is fascinating stuff, but very, very non-lucrative. I don't really want to engage in this game, but I don't see an alternative until it gets solved at the platform level. Given the lack of commercial interest (and the prodding of several smart devs), I've considered opening this up, but I'm not sure how to do that without it simply lowering the barrier for pirates. On May 10, 3:55 am, MobDev developm...@mobilaria.com wrote: It took several days (almost a week) for crackers to decompile Screebl Pro and find a way to circumventAAL. Typically it takes about 90 secs from the time that we publish to the market for the various warez sites to start tweeting the location of the download. I was wondering, after the first crack-run they obviously will have devised a crack-method, which means that every other app usingAAL will be cracked within 90 seconds till a new version is released... A week of cracking will only be the case during the first attempt... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: switching GPS on and off
On Thu, Jun 17, 2010 at 2:14 PM, kamiseq kami...@gmail.com wrote: once again, maybe it is too much sun over here :) 1. gps is on (powered, whatever) when some app tries to obtain location info Right. 2. gps is off if there is no app looking for location Correct. 3. you then said that For example, HTC Sense phones have a home screen feature that looks like an on/off switch for GPS. That, however, controls whether GPS is enabled. so there is some other state that gps can be in and it can be controlled by application. Not an ordinary SDK application. Whether or not GPS is enabled is a so-called secure setting (Settings.Secure), which cannot be modified by ordinary SDK applications. and yes I dont really understand the difference between on and enabled. You cannot turn GPS on if it is disabled. Think of enabled/disabled as a lock, controlled by the user, which determines whether or not applications even have an option to use GPS. -- Mark Murphy CommonsWare mmur...@commonsware.com http://commonsware.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Unparsed aapt error
Dear All, I am not able not fix this issue by given solution. After doing right click and deleting the error, it does not show the error in project explorer and error window. but the project is not getting run. if i delete gen folder and give clean build, it does not generate R.java. even it is not creating apk also. I have got one more error: Project has no default.properties file! Edit the project properties to set one. how to fix it. On May 2, 1:24 am, Carlito carl.dhall...@gmail.com wrote: Thanks! Lost only 10 minutes. On Mar 16, 3:57 pm, Patrick Noffke patrick.nof...@gmail.com wrote: Hi all, I found some old posts on this problem, and I was having a similar issue, so I thought I'd share what I learned. I was getting this error after modifying an XML file, and I was unable to start a debug session until I fixed the problem. It seems if there are errors that cause aapt to fail, eclipse can get in a state where it doesn't know when the problem gets fixed. Deleting R.java did not work for me. What I ended up doing after I fixed the XML file is right-clicking on the error message in the Problems view, and deleting the error. Then modify some files to force a rebuild and you should be okay. I found it helps to turn the android log level to Verbose (Preferences - Android - Build). This led me to know that once I fixed the XML file, aapt was happy, but eclipse was not. Hopefully this will save someone else the 3 hours I burned trying to figure it out! Patrick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en- 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: I've found a way to stop piracy of my apps
On Jun 17, 8:05 pm, keyeslabs keyes...@gmail.com wrote: AAL has now been open-sourced. Find details here: http://bit.ly/coz0yB. Cool. Thanks for sharing it. Are you still having good luck using AAL with your own app(s)? Any downsides you've found? String -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Supplying your own custom sqlite library
I need some features of sqlite which are not compiled in the supplied version: the R*Tree module and histograms used in query optimization enabled by SQLITE_ENABLE_STAT2. I would like to know if it is possible to bundle my own version of sqlite with these things enabled, and still use the existing android.database.sqlite.* bindings. If so, what are the general steps? I am not looking to replace the existing version of sqlite on the phone which all programs use; I just need a local version specific to my 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: I've found a way to stop piracy of my apps
Biggest issues that I've seen for my own apps (and those other brave souls who use AAL) have been related to legitimate users that somehow can't validate their purchase. For example: 1. user buys app on marke using a 2.0-based phone. validation happens just fine. 2. user backs up app, flashes rom to as-of-yet unreleased 2.2, and restores app 3. Upon startup of the app on the newly-flashed phone, AAL properly detects the missing license. 4. AAL fails validation, since 2.2-based devices can't see paid apps on the market since Google hasn't registered that release in the market database. Other fringe scenarios similar to this. When I deployed AAL into my apps, I had a few loud complainers that has tapered off now and I don't really have any serious problems. I now get a lot of emails from people in countries that can't buy from Android market. Overall, AAL seems to be working quite well. Lately I've been wondering if there's a way that I can offer the user an alternative mechanism for purchasing the pirated app. For example, I upload to Android Market, pirates post on download boards, others download, and then when validation fails offer to let them buy from PayPal and license things that way. I don't think that would break any of the Android Market rules (since the pirated version isn't being distributed by the market -- it's being distributed by a pirate board), and it sure would open up distribution to markets that Google doesn't currently serve. Dave On Jun 17, 3:39 pm, String sterling.ud...@googlemail.com wrote: On Jun 17, 8:05 pm, keyeslabs keyes...@gmail.com wrote: AALhas now been open-sourced. Find details here: http://bit.ly/coz0yB. Cool. Thanks for sharing it. Are you still having good luck usingAALwith your own app(s)? Any downsides you've found? String -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] SQLiteCursor on that has not been deactivated or closed
I've followed the try/finally approach but still get this error. Is there anything else that can be done? Here is what I have. MediaDbAdapter mDbHelper = null; Cursor c = null; try { mDbHelper = new MediaDbAdapter(ctxt); mDbHelper.open(); c = mDbHelper.findByX(data.getX()); if(c != null) { //Do an Update on the database } else if(c == null) { //Do an Insert on the database } } finally { if(c != null) { c.deactivate(); c.close(); c = null; } if(mDbHelper != null mDbHelper.isOpen()) { mDbHelper.close(); } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Handle to browser that got invoked by app under test
Hi there, As part of automating testing our app, there is test which clicks button in the app and launch browser (Android browser , not using webview, but creating intent and then starting activity with that intent). Test runs that steps and browser comes up. But now I need handle to that browser to verify that it openeded the expected site. But I could not find way to do that yet. Any help 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: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
Are any of those tools helpful with bitmaps? I've analyzed an HPRof where all the bitmaps are taking up32 bytes. that would be nice if it were true. I know that bitmaps are not on the regular heap, so the tools don't seem to find them. Since the bitmaps are marked as purgeable, they could be taking only 20K bytes, or as much as 256K bytes, so there is a wide range. Nathan On Jun 17, 8:35 am, Sebastian Roth sebastian.r...@gmail.com wrote: Yup. We've been running in that case too many times. Invest in a good tool like Yourkit, use HPROF Heap dumps to find the objects with the sticky connects to JVM root and prepare to spend nights on trying again and again.. I recommend writing automated Unit-Tests for that as well. So that you can call certain activities 100 times and see whether they retain in memory or not. Very helpful for us. Also check basics like background pictures can be encoded as JPG instead of PNG to save some memory... BR -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: switching GPS on and off
ok, I thought that those widgets are ordinary android apps written by other smart gays, so that s why I was confused. thanks On 17 Cze, 21:13, Mark Murphy mmur...@commonsware.com wrote: On Thu, Jun 17, 2010 at 2:14 PM, kamiseq kami...@gmail.com wrote: once again, maybe it is too much sun over here :) 1. gps is on (powered, whatever) when some app tries to obtain location info Right. 2. gps is off if there is no app looking for location Correct. 3. you then said that For example, HTC Sense phones have a home screen feature that looks like an on/off switch for GPS. That, however, controls whether GPS is enabled. so there is some other state that gps can be in and it can be controlled by application. Not an ordinary SDK application. Whether or not GPS is enabled is a so-called secure setting (Settings.Secure), which cannot be modified by ordinary SDK applications. and yes I dont really understand the difference between on and enabled. You cannot turn GPS on if it is disabled. Think of enabled/disabled as a lock, controlled by the user, which determines whether or not applications even have an option to use GPS. -- Mark Murphy CommonsWare mmur...@commonsware.comhttp://commonsware.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Bitmaps and OutOfMemoryError: Best Practices needed
Still stuck here. Can anyone answer me the question of whether inPurgeable works? By works, I mean will the JVM go and purge all of those purgeable bitmaps before returning an OutOfMemoryError for CreateBitmap? Nathan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: ScrollView and programmatically scrolling
Anyone? This must have been encountered before? :-) On Jun 16, 1:32 pm, Neilz neilhorn...@gmail.com wrote: Hi all. When I update the textview within my scrollview, I want the scrollview to automatically scroll down to the bottom, so that the latest text is displayed. I've tried this code: scroll.fullScroll(ScrollView.FOCUS_DOWN); ...and it worked once or twice, intermittently, but generally has no effect at all. Anyone know a better way to achieve this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] The linked program is no longer installed on the phone
Someone upgraded my app, and receive this message The linked program is no longer installed on the phone What did I do wrong to cause this? The app and the upgrade were signed with the same key as far as I know. Some of the builds were on a linux machine, and other were on Windows. Could that cause this message? 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: ScrollView and programmatically scrolling
There are past threads on this you can dig up. Basically you have to give the ScrollView a chance to realize it has had stuff added to it. For example: scroll.post(new Runnable() { public void run() { scroll.fullScroll(ScrollView.FOCUS_DOWN); } }); On Jun 17, 7:49 pm, Neilz neilhorn...@gmail.com wrote: Anyone? This must have been encountered before? :-) On Jun 16, 1:32 pm, Neilz neilhorn...@gmail.com wrote: Hi all. When I update the textview within my scrollview, I want the scrollview to automatically scroll down to the bottom, so that the latest text is displayed. I've tried this code: scroll.fullScroll(ScrollView.FOCUS_DOWN); ...and it worked once or twice, intermittently, but generally has no effect at all. Anyone know a better way to achieve this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] how to filter the objects (addresses) to display only the onscreen objects on map
HI Frank, Thank you very very much, really appreciate your kind reply.. Now, I need to values (minimum and maximum) to get the range of the visible part of the map, right? so what is this returned number? is the starting left end of the plan? or is it the width? and if it is the width, how can I use it to find the range of (GeoLocations) that 's visible on the map?? In other words, I need to have a range of ScreenCoordinates, or GeoLocations (lat and long) that represent the visible part of the map, so that I can compare all the POI to show only the onscreen object and omit the off-screen ones. Thank you very much for your time and great support. Cheers Hasn On Thu, Jun 17, 2010 at 2:11 AM, Frank Weiss fewe...@gmail.com wrote: The return type of the *Span() methods is int as follows: Latitude: 47° 30' 21, in decimal degrees 47.505833, times one million 47505833. This allows for using integers instead of floats for storing and comparing lat/longs. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- (Hasn) Hasnain AlTaiar Web Developer TayTech Smart Solutions http://TayTechs.com h...@taytechs.com Mob. +61 422 04 2629 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: The linked program is no longer installed on the phone
On Thu, Jun 17, 2010 at 7:58 PM, Robert Macaulay robert.macau...@gmail.comwrote: Someone upgraded my app, and receive this message The linked program is no longer installed on the phone Google results with your phone subbed for the phone seem to indicate it's a SenseUI problem. So it seems this is not relevant. Thansk -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Avoid non-static inner classes in an activity?
Since I seem to have caught two activity references in a heapdump, where the Activity is set to singleTask. Romain's advice on avoiding memory leaks includes: Avoid non-static inner classes in an activity if you don't control their life cycle, use a static inner class and make a weak reference to the activity inside What does this mean exactly? I can't find any examples, positive, or negative for this rule. I do have some non static inner classes in my activity. Most of them are anonymous inner classes like this one. I see hundreds of them in the samples: button.setOnClickListener(new Button.OnClickListener() { public void onClick(View v) { progressHorizontal.incrementSecondaryProgressBy(-1); // Title progress is in range 0..1 setSecondaryProgress(100 * progressHorizontal.getSecondaryProgress()); } }); Are anonymous inner classes okay? I also see something like this in the samples: private OnClickListener mStopRepeatingListener = new OnClickListener() { . . . Are member variables points to a non static anonymous inner class okay? I might think so because a member variable's lifecycle is controlled by the activity's lifecycle. Or do I assume that all the API samples leak a lot of contexts? Thanks for any insights Nathan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] how to filter the objects (addresses) to display only the onscreen objects on map
I think you're ready to write some code, since I can't really answer your latest questions without writing code. I hope you're familiar with Android logging and Eclipse debugging, because they make it so much easier to see what's going on in your code. Good luck! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Emulator and cellular access
Hi all, I think the Android emulator has the capability to emulate incoming phone calls but I am wondering if there is a capability to place outgoing calls to existing cellular networks through the appropriate hardware interface. Is there any documentation of such a functionality I look into? 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
Re: [android-developers] how to filter the objects (addresses) to display only the onscreen objects on map
Since I just happen to have written code for this recently, I don't mind sharing what I have: boolean onVisibleMap(GeoPoint point) { boolean visible = false; try { Log.v(TAG, onvisiblemap, geopoint: lat: + point.getLatitudeE6() + , lng: + point.getLongitudeE6()); GeoPoint mapCenter = this.mapView.getMapCenter(); // mapView is a private member of the class, set by the MapView's onCreate() int mapCenterlatitude = mapCenter.getLatitudeE6(), mapCenterLongitude = mapCenter.getLongitudeE6(); int halfLatSpan = latitudeSpan / 2, halfLongSpan = longitudeSpan / 2; int top = halfLatSpan + mapCenterlatitude, bottom = mapCenterlatitude - halfLatSpan, right = mapCenterLongitude + halfLongSpan, left = mapCenterLongitude - halfLongSpan; Log.v(TAG, top: + top + bottom: + bottom + \nright: + right + left: + left); if (point.getLatitudeE6() = top point.getLatitudeE6() = bottom point.getLongitudeE6() = right point.getLongitudeE6() = left) visible = true; Log.v(TAG, location is visible? + (visible ? yes : no)); } catch (NullPointerException e) { e.printStackTrace(); } return visible; } On 06/17/2010 09:27 PM, Hasn AlTaiar wrote: HI Frank, Thank you very very much, really appreciate your kind reply.. Now, I need to values (minimum and maximum) to get the range of the visible part of the map, right? so what is this returned number? is the starting left end of the plan? or is it the width? and if it is the width, how can I use it to find the range of (GeoLocations) that 's visible on the map?? In other words, I need to have a range of ScreenCoordinates, or GeoLocations (lat and long) that represent the visible part of the map, so that I can compare all the POI to show only the onscreen object and omit the off-screen ones. Thank you very much for your time and great support. Cheers Hasn On Thu, Jun 17, 2010 at 2:11 AM, Frank Weiss fewe...@gmail.com mailto:fewe...@gmail.com wrote: The return type of the *Span() methods is int as follows: Latitude: 47° 30' 21, in decimal degrees 47.505833, times one million 47505833. This allows for using integers instead of floats for storing and comparing lat/longs. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- (Hasn) Hasnain AlTaiar Web Developer TayTech Smart Solutions http://TayTechs.com h...@taytechs.com Mob. +61 422 04 2629 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Smooth Image Rotation with Gesture Control?
Can anyone help get me started? I can program all the logic I need for my program really well, I just need some help with designing the UI to function the way I want it to. On Jun 1, 6:28 pm, ocdtrekkie jtn...@gmail.com wrote: I'm trying to figure out the best way to make an image rotate along with a user's finger dragging it left or right. I want to try and match the rate a user's finger is moving with the rate the image is rotating. I've got the basic setup for my application going, with the menus and whatnot I want to have, and that's all running great on the emulator, I'm just not sure how to approach this part. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Avoid non-static inner classes in an activity?
While my inner classes could be wrong, I have a bigger suspect. It seems one of my custom views has a background thread that waits for work requests and communicates back through a handler. When the activity ends and restarts, the thread is still alive, waiting for a work request. Since that thread references a Handler, which references a View which has a context, so the activity stays alive even as a new one is created. I believe what I should do is in MyActvity.OnDestroy, propagate the message down the chain such that the worker thread exists gracefully. I suppose I should also make it a daemon thread - since it is one, but that will only help when the process exits and not when there are other activities or services running. Nathan On Jun 17, 8:43 pm, Nathan critter...@crittermap.com wrote: Since I seem to have caught two activity references in a heapdump, where the Activity is set to singleTask. Romain's advice on avoiding memory leaks includes: Avoid non-static inner classes in an activity if you don't control their life cycle, use a static inner class and make a weak reference to the activity inside What does this mean exactly? I can't find any examples, positive, or negative for this rule. I do have some non static inner classes in my activity. Most of them are anonymous inner classes like this one. I see hundreds of them in the samples: button.setOnClickListener(new Button.OnClickListener() { public void onClick(View v) { progressHorizontal.incrementSecondaryProgressBy(-1); // Title progress is in range 0..1 setSecondaryProgress(100 * progressHorizontal.getSecondaryProgress()); } }); Are anonymous inner classes okay? I also see something like this in the samples: private OnClickListener mStopRepeatingListener = new OnClickListener() { . . . Are member variables points to a non static anonymous inner class okay? I might think so because a member variable's lifecycle is controlled by the activity's lifecycle. Or do I assume that all the API samples leak a lot of contexts? Thanks for any insights Nathan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: setContentView of a Custom View
-it does not work properly. means what. What error are you getting ?. Do you override all the constructors. Nithin On Jun 17, 9:54 pm, Matt M matthew.mag...@gmail.com wrote: Hello, My current painting activity is built off of FingerPaint.java from the API Demos. In my xml I declared the custom view, see below. When I setContentView(view); everything works fine, but the problem is when I setContentView(paint_layout.xml) it does not work properly. ///PaintActivity/// public class Paint extends PaintActivity implements ColorPickerDialog.OnColorChangedListener { private Paint mPaint; private PaintView view; �...@override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); view = new PaintView(this); setContentView(view); //Set mPaint code } public class PaintView extends View { //PaintView code } //Paint code } ///paint_layout.xml/// FrameLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/paint android:layout_width=fill_parent android:layout_height=fill_parent com.myname.appname.PaintView android:id=@+id/PaintView android:layout_width=fill_parent android:layout_height=fill_parent / !-- other buttons and text -- /FrameLayout Can anyone inform me of why exactly? Am I missing an attribute for the custom layout in the xml? Thank you! Matt. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] PopUpWindow not displaying when tapping on marker
Hi, I am displaying google map and on top of that some overlay items(Markers) are there. When tapping on the markers, I need to display PopUpWindow. The code is executing but popup is not displaying. popUp.showAtLocation(layout, Gravity.TOP, 0, 0); popUp.setFocusable(true); popUp.setTouchable(true); popUp.setOutsideTouchable(false); popUp.update(0,50, 320, 70); Here layout is an object of LinearLayout. I created another android application, in that, I put the above code and its working perfectly. PopupWindow is displaying. Nithin -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en