[android-developers] Re: two activities running at same time

2013-04-04 Thread Piren
Nice :) FYI - Do notice that if the phone has one of those SMS managers/notifiers installed, you might never receive the SMS notification in your app. Some of those are real bastards and they get the notification of the SMS and don't propagate it to other listeners (the notification is an order

[android-developers] Re: two activities running at same time

2013-04-03 Thread g...@deanblakely.com
Since I started this thread I thought I would post a follow up now that I have finished and published the app. My app is a broadcast listener that kicks off on receipt of an SMS message. Under the right conditions it launches an activity that runs for 30 seconds getting reading from a locatio

Re: [android-developers] Re: two activities running at same time

2013-03-04 Thread Kristopher Micinski
You're right, and I've corrected my explanation about services in subsequent posts (with an eye to exactly this scheduling behavior!). That was misworded, but even so I think people conflate activities vs. services as having different threading semantics (they don't, things both run on the main th

Re: [android-developers] Re: two activities running at same time

2013-03-04 Thread Indicator Veritatis
A Service is a lot like an Activity w/o a UI, but the lifecycle is different: you have to override a rather different set of callbacks, for example. Especially for a bound service.The rules for keeping the hosting process alive are different, too. Services do not go on the Activity Stack either

Re: [android-developers] Re: two activities running at same time

2013-03-04 Thread Indicator Veritatis
No, Kristopher is right. You came into a free forum asking for free help without providing much detail, and then told the unpaid assistance they could see the app itself only if they paid a few bucks. That IS unprofessional. It certainly does not encourage people to help you. On Saturday, March

Re: [android-developers] Re: two activities running at same time

2013-03-03 Thread Kristopher Micinski
To clarify: I wasn't correcting your point about using blocking operations. Services are handled differently in Android with scheduling, etc..., and have more options as to when and how they run. I'm just saying that the main point the OP is missing here is that he's missing the thread execution

Re: [android-developers] Re: two activities running at same time

2013-03-03 Thread Piren
Ahh.. i might have been too simplistic when i said they are an activity without a UI, i dont want to pass the wrong impression: you'll get what appears to be similar behavior, but it isnt... Services being Services behave differently when it comes to how they run and what they can do... in his

Re: [android-developers] Re: two activities running at same time

2013-03-03 Thread Kristopher Micinski
Well, since a Service is just an Activity without a UI, you still get the same behavior... You shouldn't be running blocking operations in a service either (even if they're scheduled a bit more nicely), it just coordinates things. Kris On Sun, Mar 3, 2013 at 3:47 AM, Piren wrote: > i think ever

Re: [android-developers] Re: two activities running at same time

2013-03-03 Thread Piren
i think everyone just forgot to mention the obvious and what you seemed to get wrong: At no point what so ever were your activity and the other acitvity running at the same time. Only one activity can be running (as in "Resumed" state) at a time. Android has one UI thread, if you're using it,

Re: [android-developers] Re: two activities running at same time

2013-03-02 Thread Mark Murphy
On Sat, Mar 2, 2013 at 7:30 PM, g...@deanblakely.com wrote: > not sure what you mean. I mean that your BroadcastReceiver should not receive any broadcasts, on Android 3.1+, until the user manually launches some activity of yours once. > If the user runs the app, it's a FlashLight app > where the

Re: [android-developers] Re: two activities running at same time

2013-03-02 Thread g...@deanblakely.com
I'm not being sneeky or underhanded. My question is serious. See my answer to Mark. You can try it out right now for free. You think I'm trying to get rich selling to other developers?? You are kidding right? On Saturday, March 2, 2013 5:22:21 PM UTC-7, Lew wrote: > ga...@deanblakely.com w

Re: [android-developers] Re: two activities running at same time

2013-03-02 Thread g...@deanblakely.com
Mark, not sure what you mean. If the user runs the app, it's a FlashLight app where the user can turn on the led to find his way around in the dark. If the app is kicked off by a sms message it does a completely different thing. I have installed the app, never ran the flashlight, sent a sms

Re: [android-developers] Re: two activities running at same time

2013-03-02 Thread Lew
ga...@deanblakely.com wrote: > Kris > Re:" trying to get money out of them?" I'm a capitalist. I build > products and sell them for money. Nobody has to buy them. Sounds like you > are a little left of me. > It wasn't that you were trying to sell your product, it was that you were trying t

Re: [android-developers] Re: two activities running at same time

2013-03-02 Thread Mark Murphy
On Sat, Mar 2, 2013 at 6:57 PM, g...@deanblakely.com wrote: > It's a broadcast receiver it runs on receipt of an sms message and runs for > less than a second. Just sends the phone location back to the sender. Which, as he noted, will not work on any Android 3.1+ device until the user manually r

Re: [android-developers] Re: two activities running at same time

2013-03-02 Thread g...@deanblakely.com
TreKing. You gressed it. Broadcast receiver. It's an activity that runs for about 600 - 700 mills. On Saturday, March 2, 2013 11:05:23 AM UTC-7, TreKing wrote: > > > On Sat, Mar 2, 2013 at 10:36 AM, ga...@deanblakely.com < > ga...@deanblakely.com > wrote: > >> Well, the app reliably works wh

Re: [android-developers] Re: two activities running at same time

2013-03-02 Thread g...@deanblakely.com
Kris It's a broadcast receiver it runs on receipt of an sms message and runs for less than a second. Just sends the phone location back to the sender. Re:" trying to get money out of them?" I'm a capitalist. I build products and sell them for money. Nobody has to buy them. Sounds like you

Re: [android-developers] Re: two activities running at same time

2013-03-02 Thread TreKing
On Sat, Mar 2, 2013 at 10:36 AM, g...@deanblakely.com wrote: > Well, the app reliably works while other activities are running and when > the phone is locked. This may be the case in your testing, but this is not guaranteed. Your app can and will be killed at any point while it's in the backgrou

Re: [android-developers] Re: two activities running at same time

2013-03-02 Thread Kristopher Micinski
Your app can't run unless you actually run it the first time, that's a security feature. (Yes, I know you're catching on boot.) Doesn't it seem unprofessional to start out asking developers a question and then trying to get money out of them? Kris On Sat, Mar 2, 2013 at 11:36 AM, g...@deanblake

[android-developers] Re: two activities running at same time

2013-03-02 Thread g...@deanblakely.com
Well, the app reliably works while other activities are running and when the phone is locked. I will have it on Google Play next week and you can try it for yourselves (for a couple bucks). It's called SignalBeacon. You send the phone a text and you get back the phones location. It doesn't

[android-developers] Re: two activities running at same time

2013-03-01 Thread Indicator Veritatis
Both Stack Overflow posts your refer to assume that both Activities try to control the display. But the whole point of his post was that he has one that does not use the display at all. So these do not apply. That said, I am a little surprised it works, too. After all, though there is no requir

[android-developers] Re: two activities running at same time

2013-02-28 Thread Tamilarasi Sivaraj
This is not possible. You cannot have multiple activities running at the same time. And you refer this http://stackoverflow.com/questions/6692552/running-two-activities-at-the-same-time-on-the-screen http://stackoverflow.com/questions/11102337/can-you-have-two-activities-running-at-the-same-time