[android-developers] Re: GPS Background Service Stops Receiving Updates
Try running it in a different process: android:processThe name of the process where the service is to run. Normally, all components of an application run in the default process created for the application. It has the same name as the application package. The application http://developer.android.com/guide/topics/manifest/application-element.html element's process http://developer.android.com/guide/topics/manifest/application-element.html#proc attribute can set a different default for all components. But component can override the default with its own process attribute, allowing you to spread your application across multiple processes. If the name assigned to this attribute begins with a colon (':'), a new process, private to the application, is created when it's needed and the service runs in that process. If the process name begins with a lowercase character, the service will run in a global process of that name, provided that it has permission to do so. This allows components in different applications to share a process, reducing resource usage. Nir On Sunday, November 23, 2014 8:44:45 AM UTC+2, Tony Pitman wrote: I am writing an app that needs to get gps location information in the background. I created a class derived from Service to do this. I copied the example on the Android developer site about making a background service. It uses the ServiceHandler thread to do the work. I use location manager and set up the receiving of updates. I have my main activity create the service using the normal way like this: Intent intent = new Intent(_context, MyService.class); _context.startService(intent); Inside my service I create the location manager and start getting location updates. This works great so far. I am doing this as a service because I want my service to receive updates even if my application is shut down. I test this by holding down the home button and killing my app. The problem is that as soon as I kill my app the service stops getting updates. The service does not go away, as far as I can tell, it just quits receiving GPS updates. As long as I leave the app running, even in the background, the service keeps getting the GPS updates. Can someone tell me how to continue to get GPS updates in my service even if the app that started it gets killed? I have some settings in my AndroidManifest.xml that might be affecting it. I have the service set up so it is not exported and has permissions. I do this because I don't want other applications to use my service. Could these be affecting it? Here is my service entry in the xml: service android:name=com.mycompany.mypackage.MyService android:permission=com.mycompany.MY_SERVICE android:exported=false / Just after that outside of the application tag I have this: permission android:name=com.mycompany. MY_SERVICE/ uses-permission android:name=com.mycompany. MY_SERVICE / -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: GPS Background Service Stops Receiving Updates
Hi, What do you mean by - ...I test this by holding down the home button and killing my app ? If I start an app, then press hold down the Home button, the app that was running is sent to the background (not killed) the only option that appears is a circle that pops up to run Google Now - if I then swipe upwards. There is no option to kill any apps via the Home button interaction you described as far as I know, I tested this on (stock) Nexus 5 with Android 5 as well as Sony Xperia 2 with Android 4.4 phone devices. The only (stock) standard way I know to kill apps is via Android Settings-Apps-Downloaded-(select App)-Press 'Force stop' button. I'd suggest you try in the service manifest entry android:exported=true if that is ok for your app. Other things to try are android:process also make sure you are using startForeground(..) stopForeground(.) calls in your service or it will be killed by the OS after a period of time and finally you probably need to use a wake lock to keep the CPU running when the display is turned off. I use these settings to get a GPS (background) Service to continue to run ok indefinitely after the uses exits my app or presses the home button or turns the screen off. (But be warned that these actions can deplete the device battery fairly quickly which many users do not like). The user can still always kill the app background service even when the app is stopped / service in the background via Android Settings-Apps-Downloaded-(select App)-Press 'Force stop', there is nothing your app can do to avoid this... Regards On Sunday, November 23, 2014 5:44:45 PM UTC+11, Tony Pitman wrote: I am writing an app that needs to get gps location information in the background. I created a class derived from Service to do this. I copied the example on the Android developer site about making a background service. It uses the ServiceHandler thread to do the work. I use location manager and set up the receiving of updates. I have my main activity create the service using the normal way like this: Intent intent = new Intent(_context, MyService.class); _context.startService(intent); Inside my service I create the location manager and start getting location updates. This works great so far. I am doing this as a service because I want my service to receive updates even if my application is shut down. I test this by holding down the home button and killing my app. The problem is that as soon as I kill my app the service stops getting updates. The service does not go away, as far as I can tell, it just quits receiving GPS updates. As long as I leave the app running, even in the background, the service keeps getting the GPS updates. Can someone tell me how to continue to get GPS updates in my service even if the app that started it gets killed? I have some settings in my AndroidManifest.xml that might be affecting it. I have the service set up so it is not exported and has permissions. I do this because I don't want other applications to use my service. Could these be affecting it? Here is my service entry in the xml: service android:name=com.mycompany.mypackage.MyService android:permission=com.mycompany.MY_SERVICE android:exported=false / Just after that outside of the application tag I have this: permission android:name=com.mycompany. MY_SERVICE/ uses-permission android:name=com.mycompany. MY_SERVICE / -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] App Crash
HI guys, I am using intent service to upload some data to server. Some times its fully uploaded and some times the app will be crashed. I am getting below log 11-24 14:59:12.198: E/(9367): Device driver API match 11-24 14:59:12.198: E/(9367): Device driver API version: 23 11-24 14:59:12.198: E/(9367): User space API version: 23 11-24 14:59:12.198: E/(9367): mali: REVISION=Linux-r3p2-01rel3 BUILD_DATE=Wed Oct 9 21:05:57 KST 2013 11-24 15:03:39.659: A/libc(9367): Fatal signal 6 (SIGABRT) at 0x08b8 (code=0), thread 9367 Please help me -- *Regards* *Arun* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] Device Default DatePicker Dialog not showing
Hi, my issue solved on Nexus S and Nexus 4 using device default theme but It has not been resolved on HTC devices, I have HTC one and HTC Desire C devices. Do you have any idea about HTC devices? Why it will not show device native date picker dialog? I have set minSdkVersion = 5 and target sdk version not yet set. On Tue, Nov 18, 2014 at 10:27 PM, TreKing treking...@gmail.com wrote: On Mon, Nov 17, 2014 at 12:25 AM, Surabhi Jain surabhi17.j...@gmail.com wrote: But When I run same app on Nexus S, Nexus 4, s4 and HTC One, it is not showing the device default datepicker dialog. These devices api level is 11 or above of 11. What is your app's target SDK? If you have a low target, the system might be running your app in compatibility mode and using an older picker? Just a thought. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Thanks Regards Surabhi Jain -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] Re: GPS Background Service Stops Receiving Updates
On my Samsung Galaxy 4 phone from T-Mobile, I can hold down the home button and get a list of running apps. I can kill each one individually with a swipe, and there is a trashcan icon at the bottom of the screen that will kill all the apps running. I use this feature to extend my battery time when the batter is getting low. It may be a special Samsung app that does this. Mark On Mon, Nov 24, 2014 at 1:13 AM, gjs garyjamessi...@gmail.com wrote: Hi, What do you mean by - ...I test this by holding down the home button and killing my app ? If I start an app, then press hold down the Home button, the app that was running is sent to the background (not killed) the only option that appears is a circle that pops up to run Google Now - if I then swipe upwards. There is no option to kill any apps via the Home button interaction you described as far as I know, I tested this on (stock) Nexus 5 with Android 5 as well as Sony Xperia 2 with Android 4.4 phone devices. The only (stock) standard way I know to kill apps is via Android Settings-Apps-Downloaded-(select App)-Press 'Force stop' button. I'd suggest you try in the service manifest entry android:exported=true if that is ok for your app. Other things to try are android:process also make sure you are using startForeground(..) stopForeground(.) calls in your service or it will be killed by the OS after a period of time and finally you probably need to use a wake lock to keep the CPU running when the display is turned off. I use these settings to get a GPS (background) Service to continue to run ok indefinitely after the uses exits my app or presses the home button or turns the screen off. (But be warned that these actions can deplete the device battery fairly quickly which many users do not like). The user can still always kill the app background service even when the app is stopped / service in the background via Android Settings-Apps-Downloaded-(select App)-Press 'Force stop', there is nothing your app can do to avoid this... Regards On Sunday, November 23, 2014 5:44:45 PM UTC+11, Tony Pitman wrote: I am writing an app that needs to get gps location information in the background. I created a class derived from Service to do this. I copied the example on the Android developer site about making a background service. It uses the ServiceHandler thread to do the work. I use location manager and set up the receiving of updates. I have my main activity create the service using the normal way like this: Intent intent = new Intent(_context, MyService.class); _context.startService(intent); Inside my service I create the location manager and start getting location updates. This works great so far. I am doing this as a service because I want my service to receive updates even if my application is shut down. I test this by holding down the home button and killing my app. The problem is that as soon as I kill my app the service stops getting updates. The service does not go away, as far as I can tell, it just quits receiving GPS updates. As long as I leave the app running, even in the background, the service keeps getting the GPS updates. Can someone tell me how to continue to get GPS updates in my service even if the app that started it gets killed? I have some settings in my AndroidManifest.xml that might be affecting it. I have the service set up so it is not exported and has permissions. I do this because I don't want other applications to use my service. Could these be affecting it? Here is my service entry in the xml: service android:name=com.mycompany.mypackage.MyService android:permission=com.mycompany.MY_SERVICE android:exported=false / Just after that outside of the application tag I have this: permission android:name=com.mycompany. MY_SERVICE/ uses-permission android:name=com.mycompany. MY_SERVICE / -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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
Re: [android-developers] Re: GPS Background Service Stops Receiving Updates
As my understanding here, the service was stopped some where in the code and hence it is behaving like that. On Mon, Nov 24, 2014 at 7:38 PM, Mark Phillips m...@phillipsmarketing.biz wrote: On my Samsung Galaxy 4 phone from T-Mobile, I can hold down the home button and get a list of running apps. I can kill each one individually with a swipe, and there is a trashcan icon at the bottom of the screen that will kill all the apps running. I use this feature to extend my battery time when the batter is getting low. It may be a special Samsung app that does this. Mark On Mon, Nov 24, 2014 at 1:13 AM, gjs garyjamessi...@gmail.com wrote: Hi, What do you mean by - ...I test this by holding down the home button and killing my app ? If I start an app, then press hold down the Home button, the app that was running is sent to the background (not killed) the only option that appears is a circle that pops up to run Google Now - if I then swipe upwards. There is no option to kill any apps via the Home button interaction you described as far as I know, I tested this on (stock) Nexus 5 with Android 5 as well as Sony Xperia 2 with Android 4.4 phone devices. The only (stock) standard way I know to kill apps is via Android Settings-Apps-Downloaded-(select App)-Press 'Force stop' button. I'd suggest you try in the service manifest entry android:exported=true if that is ok for your app. Other things to try are android:process also make sure you are using startForeground(..) stopForeground(.) calls in your service or it will be killed by the OS after a period of time and finally you probably need to use a wake lock to keep the CPU running when the display is turned off. I use these settings to get a GPS (background) Service to continue to run ok indefinitely after the uses exits my app or presses the home button or turns the screen off. (But be warned that these actions can deplete the device battery fairly quickly which many users do not like). The user can still always kill the app background service even when the app is stopped / service in the background via Android Settings-Apps-Downloaded-(select App)-Press 'Force stop', there is nothing your app can do to avoid this... Regards On Sunday, November 23, 2014 5:44:45 PM UTC+11, Tony Pitman wrote: I am writing an app that needs to get gps location information in the background. I created a class derived from Service to do this. I copied the example on the Android developer site about making a background service. It uses the ServiceHandler thread to do the work. I use location manager and set up the receiving of updates. I have my main activity create the service using the normal way like this: Intent intent = new Intent(_context, MyService.class); _context.startService(intent); Inside my service I create the location manager and start getting location updates. This works great so far. I am doing this as a service because I want my service to receive updates even if my application is shut down. I test this by holding down the home button and killing my app. The problem is that as soon as I kill my app the service stops getting updates. The service does not go away, as far as I can tell, it just quits receiving GPS updates. As long as I leave the app running, even in the background, the service keeps getting the GPS updates. Can someone tell me how to continue to get GPS updates in my service even if the app that started it gets killed? I have some settings in my AndroidManifest.xml that might be affecting it. I have the service set up so it is not exported and has permissions. I do this because I don't want other applications to use my service. Could these be affecting it? Here is my service entry in the xml: service android:name=com.mycompany.mypackage.MyService android:permission=com.mycompany.MY_SERVICE android:exported=false / Just after that outside of the application tag I have this: permission android:name=com.mycompany. MY_SERVICE/ uses-permission android:name=com.mycompany. MY_SERVICE / -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this
Re: [android-developers] Re: GPS Background Service Stops Receiving Updates
Thank you everyone for the replies. Here are my responses: I am holding the home button and the list of apps comes up and I swipe away my app to kill it. This is what others have mentioned above. I don't know if this is samsung only or not. Maybe this method is supposed to kill all running services and processes of the app and is not a good way to test. I tried giving the service a different process. I tried 2 things. First I just added the android:process tag to my service. I gave it a name with the ':' in front so it would be private to my app. This did not change anything. The service still dies when I kill the app. The other thing I noticed is when I go to the Settings - Application Manager - Running I see my app. If I tap on it to see what it is doing I get the following sections / information: Active App: MyApp 1 process and 1 service Services: MyService Start by application Processes: MyApp com.mycompany.myappspace:MyService Main process in use. So I decided to try adding the android:process section to the main application entry in the xml as well. I gave it a different name just in case. I called it MyApp instead of MyService. This did not make any difference. The information shown in the settings panel were the same. So am I to assume that the service is running in the same process as the app so that when I kill the app using the method above that is why the service is also dying? Is killing the app that way the wrong way to test? The whole reason I am doing this is because originally I just put my gps stuff inside the app itself. I would start my app and then many hours later I would enter the geofence area I had set up and the app did not trigger what I wanted it to do. I would go to the app and it looked like it was starting all over. Maybe I should just start my app and let it run for several hours and see if the service keeps going. Thanks for all the help. On Monday, November 24, 2014 7:58:36 AM UTC-7, Mukesh Srivastav wrote: As my understanding here, the service was stopped some where in the code and hence it is behaving like that. On Mon, Nov 24, 2014 at 7:38 PM, Mark Phillips ma...@phillipsmarketing.biz javascript: wrote: On my Samsung Galaxy 4 phone from T-Mobile, I can hold down the home button and get a list of running apps. I can kill each one individually with a swipe, and there is a trashcan icon at the bottom of the screen that will kill all the apps running. I use this feature to extend my battery time when the batter is getting low. It may be a special Samsung app that does this. Mark On Mon, Nov 24, 2014 at 1:13 AM, gjs garyjam...@gmail.com javascript: wrote: Hi, What do you mean by - ...I test this by holding down the home button and killing my app ? If I start an app, then press hold down the Home button, the app that was running is sent to the background (not killed) the only option that appears is a circle that pops up to run Google Now - if I then swipe upwards. There is no option to kill any apps via the Home button interaction you described as far as I know, I tested this on (stock) Nexus 5 with Android 5 as well as Sony Xperia 2 with Android 4.4 phone devices. The only (stock) standard way I know to kill apps is via Android Settings-Apps-Downloaded-(select App)-Press 'Force stop' button. I'd suggest you try in the service manifest entry android:exported=true if that is ok for your app. Other things to try are android:process also make sure you are using startForeground(..) stopForeground(.) calls in your service or it will be killed by the OS after a period of time and finally you probably need to use a wake lock to keep the CPU running when the display is turned off. I use these settings to get a GPS (background) Service to continue to run ok indefinitely after the uses exits my app or presses the home button or turns the screen off. (But be warned that these actions can deplete the device battery fairly quickly which many users do not like). The user can still always kill the app background service even when the app is stopped / service in the background via Android Settings-Apps-Downloaded-(select App)-Press 'Force stop', there is nothing your app can do to avoid this... Regards On Sunday, November 23, 2014 5:44:45 PM UTC+11, Tony Pitman wrote: I am writing an app that needs to get gps location information in the background. I created a class derived from Service to do this. I copied the example on the Android developer site about making a background service. It uses the ServiceHandler thread to do the work. I use location manager and set up the receiving of updates. I have my main activity create the service using the normal way like this: Intent intent = new Intent(_context, MyService.class); _context.startService(intent); Inside my service I create the location manager and start getting location updates. This works
[android-developers] Translate animation in oncreatview of the fragment
I have a fragment placed in a View Pager. I need to do translate animation of a view once the fragment is launched. The animation works if I click on the view(for which I have added animation to on click listener) but onCreateView I try to do the animation, it doesn't happen. What can I do to make the animation work once the fragment is launched -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Getting Unsupported major.minor version 51.0 in eclipse w/ lollipop
I think the problem is the JRE. Which one do I need. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: Getting Unsupported major.minor version 51.0 in eclipse w/ lollipop
JRE = Java Runtime Enviorment JDK = Java Development Kit I think you need to get the latest version of JDK 7 On Monday, November 24, 2014 12:35:34 PM UTC-5, dashman wrote: I think the problem is the JRE. Which one do I need. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: Getting Unsupported major.minor version 51.0 in eclipse w/ lollipop
Installed JRE 7 and works fine. Thanks. On Monday, November 24, 2014 1:29:49 PM UTC-5, Jonathan S wrote: JRE = Java Runtime Enviorment JDK = Java Development Kit I think you need to get the latest version of JDK 7 On Monday, November 24, 2014 12:35:34 PM UTC-5, dashman wrote: I think the problem is the JRE. Which one do I need. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] Re: GPS Background Service Stops Receiving Updates
It looks like calling startForeground was the key. I am still not able to kill the app using the method mentioned above, but at least now when I let the app sit for a long period of time the GPS notifications keep coming into the service even when it looks like the app has been shut down by the OS for lack of use. I do have another related question. When I did my service I was following the example of a service on the google dev site. This is the link to what I followed: http://developer.android.com/guide/components/services.html You will notice about the middle of the page there is the example code that I followed and then modified. They use a HandlerThread to create the Looper that gets used in the mServiceHandler thread to process the actual work. They pass in a parameter to that HandlerThread called Process.THREAD_PRIORITY_BACKGROUND. Is this different than using the startForeground that now fixed my issue? I left that HandlerThread the way it was and it now works with the startForeground. Thanks! On Monday, November 24, 2014 8:17:18 AM UTC-7, Tony Pitman wrote: Thank you everyone for the replies. Here are my responses: I am holding the home button and the list of apps comes up and I swipe away my app to kill it. This is what others have mentioned above. I don't know if this is samsung only or not. Maybe this method is supposed to kill all running services and processes of the app and is not a good way to test. I tried giving the service a different process. I tried 2 things. First I just added the android:process tag to my service. I gave it a name with the ':' in front so it would be private to my app. This did not change anything. The service still dies when I kill the app. The other thing I noticed is when I go to the Settings - Application Manager - Running I see my app. If I tap on it to see what it is doing I get the following sections / information: Active App: MyApp 1 process and 1 service Services: MyService Start by application Processes: MyApp com.mycompany.myappspace:MyService Main process in use. So I decided to try adding the android:process section to the main application entry in the xml as well. I gave it a different name just in case. I called it MyApp instead of MyService. This did not make any difference. The information shown in the settings panel were the same. So am I to assume that the service is running in the same process as the app so that when I kill the app using the method above that is why the service is also dying? Is killing the app that way the wrong way to test? The whole reason I am doing this is because originally I just put my gps stuff inside the app itself. I would start my app and then many hours later I would enter the geofence area I had set up and the app did not trigger what I wanted it to do. I would go to the app and it looked like it was starting all over. Maybe I should just start my app and let it run for several hours and see if the service keeps going. Thanks for all the help. On Monday, November 24, 2014 7:58:36 AM UTC-7, Mukesh Srivastav wrote: As my understanding here, the service was stopped some where in the code and hence it is behaving like that. On Mon, Nov 24, 2014 at 7:38 PM, Mark Phillips ma...@phillipsmarketing.biz wrote: On my Samsung Galaxy 4 phone from T-Mobile, I can hold down the home button and get a list of running apps. I can kill each one individually with a swipe, and there is a trashcan icon at the bottom of the screen that will kill all the apps running. I use this feature to extend my battery time when the batter is getting low. It may be a special Samsung app that does this. Mark On Mon, Nov 24, 2014 at 1:13 AM, gjs garyjam...@gmail.com wrote: Hi, What do you mean by - ...I test this by holding down the home button and killing my app ? If I start an app, then press hold down the Home button, the app that was running is sent to the background (not killed) the only option that appears is a circle that pops up to run Google Now - if I then swipe upwards. There is no option to kill any apps via the Home button interaction you described as far as I know, I tested this on (stock) Nexus 5 with Android 5 as well as Sony Xperia 2 with Android 4.4 phone devices. The only (stock) standard way I know to kill apps is via Android Settings-Apps-Downloaded-(select App)-Press 'Force stop' button. I'd suggest you try in the service manifest entry android:exported=true if that is ok for your app. Other things to try are android:process also make sure you are using startForeground(..) stopForeground(.) calls in your service or it will be killed by the OS after a period of time and finally you probably need to use a wake lock to keep the CPU running when the display is turned off. I use these settings to get a GPS (background) Service to continue to run ok indefinitely after the uses exits my
[android-developers] Simple PagerAdapter does not display views
I have a fragment in which I want to display a number of similar pages using ViewPager. For some reason I thought that it would be simpler to extend the base PagerAdapter to feed views to the ViewPager. My custom PageAdapter implements instantiateItem by inflating a layout, populating its widgets, and then calling addView against the container view. The containing ViewPager is the view that I return from the onCreateView method of the fragment. The problem is that this is working from a paging point of view, but the screen remains blank. By setting breakpoints, I find that when I swipe across the (blank) screen, my PagerAdapter is called as expected (instantiateView, destroyView, etc.) to return the next/previous view, but nothing is shown -- only the background of the ViewPager. Examining the ViewPager at the breakpoint, the expected instantiated views are in its array of child views. Any clues on where to look? I've implemented a FragmentPagerAdapter elsewhere with no issues, but this does seem like it would be easier, especially since these views have no controls on them (just data). Doug Gordon GHCS Software -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] Simple PagerAdapter does not display views
Did you properly implement the adapter's isViewFromObject? How about getItemPosition? -- K 2014-11-25 0:22 GMT+03:00 Doug Gordon gordo...@gmail.com: I have a fragment in which I want to display a number of similar pages using ViewPager. For some reason I thought that it would be simpler to extend the base PagerAdapter to feed views to the ViewPager. My custom PageAdapter implements instantiateItem by inflating a layout, populating its widgets, and then calling addView against the container view. The containing ViewPager is the view that I return from the onCreateView method of the fragment. The problem is that this is working from a paging point of view, but the screen remains blank. By setting breakpoints, I find that when I swipe across the (blank) screen, my PagerAdapter is called as expected (instantiateView, destroyView, etc.) to return the next/previous view, but nothing is shown -- only the background of the ViewPager. Examining the ViewPager at the breakpoint, the expected instantiated views are in its array of child views. Any clues on where to look? I've implemented a FragmentPagerAdapter elsewhere with no issues, but this does seem like it would be easier, especially since these views have no controls on them (just data). Doug Gordon GHCS Software -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Changes in GPS or compass sensors for Android 5.0?
Android 5.0 is coming out to my customers (not to me yet), and so of course I have to filter through any claims that feature X is broken and when are you going to support Android 5.0. Some are claiming that Compass is broken or GPS is broken. There are always a few that have those problems any way, so I am not assuming that it is something to do with Android 5.0 Nothing here tells me that GPS or compass sensors should be broken. http://developer.android.com/about/versions/android-5.0-changes.html 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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: Translate animation in oncreatview of the fragment
onActivityCreated() -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] Device Default DatePicker Dialog not showing
On Mon, Nov 24, 2014 at 5:54 AM, Surabhi Jain surabhi17.j...@gmail.com wrote: I have set minSdkVersion = 5 and target sdk version not yet set. You should target the highest version you've tested and support. Since it's not set, it defaults to your min, which is 5, which is fairly ridiculous. Your min really shouldn't be anything less than 10 these days, unless there's a good reason to support such a low level. Set your target to something high (like 19 or 21) and see what happens. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] Re: Adding an image to the right of a Preference
On Sun, Nov 23, 2014 at 7:49 AM, dashman erjdri...@gmail.com wrote: I haven't subclassed Preference class. Is that what I have to do? Yes. Have a look at http://developer.android.com/reference/android/preference/Preference.html#setWidgetLayoutResource%28int%29 http://developer.android.com/reference/android/preference/Preference.html#onBindView%28android.view.View%29 - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] App Crash
On Mon, Nov 24, 2014 at 4:53 AM, Arun Kumar K arunkuma...@npcompete.net wrote: Some times its fully uploaded and some times the app will be crashed. Debug your app to determine where it is crashing. I am getting below log If your app crashes, there should be more than 5 lines in the log. And they should have some of your app's class names in there somewhere. This is not the correct log. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] Re: GPS Background Service Stops Receiving Updates
On Mon, Nov 24, 2014 at 9:17 AM, Tony Pitman t...@shatalmic.com wrote: The whole reason I am doing this is because originally I just put my gps stuff inside the app itself. I would start my app and then many hours later I would enter the geofence area I had set up and the app did not trigger what I wanted it to do. I would go to the app and it looked like it was starting all over. A little late to this party, but ... If you're after geo-fencing, see here: http://developer.android.com/training/location/geofencing.html If you want to do stuff in response to location changes while your app is not active, use this: http://developer.android.com/reference/android/location/LocationManager.html#requestLocationUpdates%28long,%20float,%20android.location.Criteria,%20android.app.PendingIntent%29 On Mon, Nov 24, 2014 at 2:29 PM, Tony Pitman t...@shatalmic.com wrote: They pass in a parameter to that HandlerThread called Process.THREAD_PRIORITY_BACKGROUND. Is this different than using the startForeground that now fixed my issue? Yes, the thread priority is for the system to manage and schedule threads. This relates to* time and frequency allocation* for threads to run. startForeground is specifically to mark a Service object as being important to a user's experience, such that the system will favor it when memory gets tight. The system will kill other components (background services, Activities no longer visible, etc) before killing a foreground service. This relates to *memory allocation* for system resources. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] Device Default DatePicker Dialog not showing
Hi I have set targetSdkVersion = 21 but it is not showing native date picker dialog on HTC device whose android version is 4.0.3 When I will run same apk on S4 whose android version is 4.4.2, it works fine. Thanks Regards Surabhi Jain On Tue, Nov 25, 2014 at 11:27 AM, TreKing treking...@gmail.com wrote: On Mon, Nov 24, 2014 at 5:54 AM, Surabhi Jain surabhi17.j...@gmail.com wrote: I have set minSdkVersion = 5 and target sdk version not yet set. You should target the highest version you've tested and support. Since it's not set, it defaults to your min, which is 5, which is fairly ridiculous. Your min really shouldn't be anything less than 10 these days, unless there's a good reason to support such a low level. Set your target to something high (like 19 or 21) and see what happens. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Thanks Regards Surabhi Jain -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.