[android-developers] Re: Need Android Service suggestions
yes use alarm manager to start your service and once work is done , self stop the service On Jan 4, 12:43 pm, Kumar Bibek wrote: > Alarm manager is the best option. > > On Jan 4, 9:33 am, Jacob wrote: > > > Hi all > > > My requirement: > > > Need some piece of code executing every 5 minutes (no UI). This code > > needs to access server thru internet and get some data and use them on > > the device. This code is not heavy weight. Just light weight fetch of > > 5K to 10K. And the data is not always fetched. Data fetch from server > > happens only once a day or so. > > > I thought about a service and have written one with a timer and a > > thread (does the server data fetch). But I read some articles and docs > > that a service might be *killed* by the OS in low memory or idle > > situations. > > > Question: > > > Whats the suggested method to achieve this goal in android? I would > > like the code to run even in low memory situations or at least be run > > after the memory situation gets better in the OS (OS can kill my code/ > > app and restart the code when its better; but don't wanna wait for > > hours). > > > Thank you for the help! > > Jacob. > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Start new activity in TAB
the activites are with in the same application , but the thing is that when the user clicks on a particular city i can start the activity which contains the forecast for that city but that new activity launches on the whole screen not within the current tab , i.e it doesn't replaces the activity that launched it with in the current tab rather it covers the whole screen . On Jan 6, 12:29 am, jotobjects wrote: > Unless the Activities that you want to show under the tabs are > activities in the same application you may run into the problem > described here regarding TabWidget - > > http://groups.google.com/group/android-beginners/msg/17c95a6881e1dfe4 > > On Jan 5, 5:50 am, smyl wrote: > > > > > i am working on a travelling application and i am using tabs and each > > tab has an activity i.e world clock in one tab ,weather data in > > another tab and so on > > > with in the weather tab i am displaying the users selected cities and > > the scenario is that when the user selects a city that city's > > forecast is to be displayed and later to view details as well which > > is in another activity . > > > so how can i launch this new activity from the already started > > activity with in the same tab ? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Start new activity in TAB
i am working on a travelling application and i am using tabs and each tab has an activity i.e world clock in one tab ,weather data in another tab and so on with in the weather tab i am displaying the users selected cities and the scenario is that when the user selects a city that city's forecast is to be displayed and later to view details as well which is in another activity . so how can i launch this new activity from the already started activity with in the same tab ? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en