Application Start

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

Application Start

Postby madkins » Fri Nov 21, 2008 1:15 pm

Hello.

When starting an application that is already running, is android smart enough to know that application is running before opening a new one? Or is this something the developer needs to code for?

It seems that I have multiple version of my app running at one time. I could be crazy...

Thanks.
Mike
madkins
Junior Developer
Junior Developer
 
Posts: 10
Joined: Fri Nov 21, 2008 1:09 pm

Top

Postby MrSnowflake » Fri Nov 21, 2008 6:01 pm

Ofcourse Android is smart enough, if it wasn't the memory would be full after only a couple of text messages.
To start a new task, you can use a special flag in the Intent.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby madkins » Mon Nov 24, 2008 3:51 pm

Thanks for the reply. Let me make sure we are talking about the same thing.

Here is the scenario.
I am in the application, doing whatever the app does. Then I hit the Home button on the phone. This takes me back to the home screen. I know my app is still running because I get notifications. At this point, if I go back to the apps screen and select my app again, will it open a new one or will it open the original.

I just need to be certain.

Thank you.
madkins
Junior Developer
Junior Developer
 
Posts: 10
Joined: Fri Nov 21, 2008 1:09 pm

Postby richard.puckett » Mon Nov 24, 2008 6:39 pm

Android will reuse the existing process if it still exists (ie: it will try to open the original).
Image
richard.puckett
Junior Developer
Junior Developer
 
Posts: 13
Joined: Thu Dec 27, 2007 2:37 am
Location: Seattle, WA

Postby MrSnowflake » Mon Nov 24, 2008 7:15 pm

^^ what he (and I before) says(/said).

Btw: In the most cases, when an app needs to make continues notifications, you'd better use a service for that.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby madkins » Mon Nov 24, 2008 8:17 pm

Okay, I just wanted to make sure we were on the same page.

BTW - I do use a service for notifications.

I appreciate the info.
Mike
madkins
Junior Developer
Junior Developer
 
Posts: 10
Joined: Fri Nov 21, 2008 1:09 pm

Top

Return to General

Who is online

Users browsing this forum: No registered users and 3 guests