Thanks Ver. and Lance... If the funding comes through for this project I will be jumping in with both feet, held nose, and eyes WIDE open.... But it was hard to commit to the "real goal" not knowing if Android would even allow me. (As I originally said, I had gone down the iPhone path looking for the Background / Foreground notion in that SDK and when I couldn't find it; I started asking DIRECTLY and got so much "pushback" it surprised me. I understand that some might not want to "just giveaway" hard learned "secrets" but, making a living myself for the past 25 years as a custom developer has never stopped me from offering easy advice to help someone along. The SDK FAN BOYs seem to carry their APPLE-IS_BEST attitude into the development side too. And this was very disappointing to me.)
So I thought I'd just come right out and ask ... so, many thanks for your reasoned and helpful responses. And BTW, I had to laugh a bit (sorry) when you both gave detailed responses about the TIMER --- as I said that was an made-up-example to give you some insight -- its NOT the timer I need at all but a different subsystem (and am held to NDA constraints so I was NOT able to use the EXACT subsystem as an example) but from your responses I am confident that it is HIGHLY LIKELY that I will be able to get to what I need and run it in the "background." I have seen in some other "android-beginners" threads that there are several useful android tutorial and code-example websites and I shall take full advantage of them as well -- I have a lot of experience in dotNet (both desktop and web(aspx) side) and hopefully the object orientation experience will prove useful as I "mentally convert" dotNet syntax into JAVA... should be fun. Thanks, again for all the help. tob On Nov 1, 6:26 am, Lance Nanek <[email protected]> wrote: > In Android a service can be used to perform work in the background > while the user is using other > apps:http://developer.android.com/intl/fr/reference/android/app/Service.html > > If the work should be done at a certain time, then there is the > AlarmManager:http://developer.android.com/intl/fr/reference/android/app/AlarmManag... > > Using the Timer and TimerTask classes in your app would not allow you > to reliably perform work while other apps are being used. This is > because Android may decide to kill the process for an app that is in > the background. This would interfere with the thread used by the Timer > class. A new process would only get created when the app was again > requested by the user. > > The process for a service may be killed as well, but the system will > try to restart that on its own. Background apps are killed before > services when resources are needed, so it is less likely as well. > > That said, just reporting to the user the elapsed time between uses of > an app requires no background work at all. Just store when the app was > last used and compare with that when it is used again. > > On Nov 1, 3:39 am, Indicator Veritatis <[email protected]> wrote: > > > > > Richard- > > > Your answer is true, and even helpful. But I fear it will sound too > > much like the "fan-boy-turned developer demanding he read 12 gazillion > > pages". > > > Yes, he should read the fundamentals, he should also do some of the > > elementary tutorials, especially the classic "Hello World" in its > > "Hello Android" incarnation. But we could answer his questions a > > little more directly, too. > > > In particular, in the case of his specific example of the app using > > the timer, the answer is yes. Any Activity can relinquish control of > > the screen to be woken up by a timer event. The specifics of how this > > will be done, however, can only be explained once he has read the > > 'Fundamentals' and knows what an 'Activity' is, what an 'Intent' is, > > and how to filter on intents or listen for Broadcasts. > > > Unfortunately, the Fundamentals section says precious little about how > > to use the Timer. For that, he will have to go to the API reference > > and look at the Timer and TimerTask classes. > > > We cannot tell him how to use which of these, he will have to make > > that decision for himself based on the specifics of his planned > > application. But we can at least point him in the right direction. > > > I hope this post will accomplish that. > > > On Oct 30, 1:33 am, RichardC <[email protected]> wrote: > > > > Yes, and here is one page to get you > > > started:http://developer.android.com/intl/fr/guide/topics/fundamentals.html > > > > -- > > > RichardC > > > > On Oct 29, 2:24 pm, tob <[email protected]> wrote: > > > > > Hi, > > > > > I started down the road towards an iPhone app but was dismayed by so > > > > many things (e.g. you do not have access to some very fundamental > > > > aspects of the device such as enabling/disabling Bluetooth, EDGE, WiFi > > > > subsystems; you cannot run your app 'in the background', and, finally, > > > > the arrogance of so many of the developers there.) > > > > > Because my knowledge of Android (and even Java) is currently minimal, > > > > I understand that I may be trashing and smashing terminology such as > > > > PROCESS, THREAD, APPLICATION, TASK, SERVICE, ACTIVITY, etc etc etc > > > > > I would (simply) like to understand if I may develop an Android > > > > "app" (see Trashing and Smashing note above ;<>) that can have > > > > aspects operating "in the background" while the device is being used > > > > in a completely different manner as demanded by the user --- here's > > > > one example --> > > > > > The USER runs my brandy new "App" which monitors the TIMER > > > > subsystem... but then (because staring at my App's GUI CLOCK is really > > > > boring) the user then decides to use the "phone" or play a game, > > > > etc ... > > > > > Can my App continue monitoring the TIMER subsystem while these other > > > > user-initiated activities take "control" ? > > > > > In this example, when the user 'returns' to my App, it could tell him > > > > elapsed time since he "originally started" my App. > > > > > I ask this question so bluntly because the iPhone Fan-Boy-turned- > > > > developers berated me for not having read all 12 gazzillion pages of > > > > documentation first. > > > > > Thanks for any info you can provide... > > > > > tob -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en

