Android: Single instance app

14 posts / 0 new
Last post
Diego Velazquez
diegolv's picture
Offline
Mobile Wizard
Joined: 4 Oct 2010
Posts:
Android: Single instance app

Hi,

Using Motorola Xoom w/ HC 3.1, if I press HOME and click on app icon, it opens a second instance of the app. After that, both instances become unstable and if I quit one of them the other restarts.

How do I avoid opening the 2nd instance?

Regards,

Diego

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Florin Leu
florin_leu's picture
Offline
Joined: 8 Mar 2011
Posts:

Hello,

We can't reproduce this issue on our Motorola XOOM, Android 3.1. Can you give us please more details?
What application are you launching? Is it a MoSync application?

Thanks,
Florin

Abi Waqas
abi's picture
Offline
Mobile Wizard
Joined: 3 May 2010
Posts:

Hi Deigo,

Thanks for finding and sharing it with us. Well, factually, Android HC isn't fully supported and released yet so there are chances that you may encounter problems while testing apps on HC. But what you pointed is something we have to take care of sooner or later. We would like to look into this issue provided with additional information required by developers. Once again, thank you for helping us and making MoSync a better product.

Cheers

Diego Velazquez
diegolv's picture
Offline
Mobile Wizard
Joined: 4 Oct 2010
Posts:

Hi,

I agree w/ you. Android 3 (and 4) is growing and we should be prepared. Please contact me I you need any assistance. I've already reported another issue w/ that (16bit image problems). I have a suggestion (posted in a diff thread): If you prepare a VM w/ build env I could help you more.

Regards,

Diego

Abi Waqas
abi's picture
Offline
Mobile Wizard
Joined: 3 May 2010
Posts:

Hi Diego,

Thanks for your offering and we heartily appreciate it. We, at the moment, are hard at work to finish 3.0 off within the promised timeline. However, I will look into the details and see what we can set up in order to get your assistance. Its really nice when our developers come back to us and they want to contribute their bits to make MoSync better and rich.
Regards,
Abi Waqas

Diego Velazquez
diegolv's picture
Offline
Mobile Wizard
Joined: 4 Oct 2010
Posts:

Hi Abi,

another xmas gift: my app consumes +/- 2 minutes of cpu before getting ready to user. In order to delude user, i divided the procedure into several steps using runTimerEvent and drawing a progressbar. If I install the app and press "Open" button install tool, app opens but only a blank screen is shown and Android raises the Force Shutdown message box. This behaviour sometimes happens if I lock screen during a tcp/ip socket transfer.

These problems happen on all android versions (2.2 and 2.3.3) and latest nightly build.

Regards,

Diego

Sam Pickard
rival's picture
Online
Mobile Archmage
Joined: 19 Mar 2009
Posts:

Interesting, I'll see if I can discuss this with the Android team today.

Diego Velazquez
diegolv's picture
Offline
Mobile Wizard
Joined: 4 Oct 2010
Posts:

Hi Sam/Abi,

I have a good procedure:

1- Using Mosync 2.7, compile RockPaperScissorsGameNativeUI;
2- Install from sdcard and run it pressing Open from install tool;
3- Press Play and choose the weapon;
4- Press Home button;
5- Run it again from Applications Menu;
6- You'll see that instead of going back to the weapons win/tie page, it opens another instance.
7- If you press back (to close the app) it restarts.

If you run the app right after installing it always have the problem. But I've already noticed that if you answer the phone the same behaviour happens. Another test case is open App, press Home, Lock Screen, Unlock Screen and opens the app. It does not resume.

Look, my problem is not having issues after installing (I could just tell the install guy not to open that way the app), but after answering the phone during a I/O operation that could corrupt my database.

Regards,

Diego

Abi Waqas
abi's picture
Offline
Mobile Wizard
Joined: 3 May 2010
Posts:

Nice observation Diego,

I assume that you experienced this behavior using a honey comb tab device. Give me some time and I will discuss it with folks. I will also re-test it to make sure its not happening on Android 2.x

Regards,
Abi

Diego Velazquez
diegolv's picture
Offline
Mobile Wizard
Joined: 4 Oct 2010
Posts:

Hi Abi,

I'm sorry for the uncomplete post (now I have a sticknote here to remind me to tell you platform and devices). This issue happens on all devices I have (GalaxyTab, Defy, Xperia X10, Xoom, ...). It's not related to HC.

Mosync: 2.6, 2.7, Nightly build
Devices: GalaxyTab, Defy, Xperia X10, Xoom
OS: 2.1, 2.2, 2.3.3, 3.0, 3.0.1, 3.1

Regards,

Diego

Diego Velazquez
diegolv's picture
Offline
Mobile Wizard
Joined: 4 Oct 2010
Posts:

Hi Abi,

btw, I'm using this thread to all startup related problems.

MoSync: 2.7
Device: Defy
OS: 2.2

If you create an app w/ a program.comb embedded into resources and try to maLoadProgram right after installing the apk (pressing open button), the app crashes w/ a widget image problem. It seems that resources of the just loaded program.comb are not loaded well. This problem does not occur when opening from applications menu.

Regards,

Diego

Diego Velazquez
diegolv's picture
Offline
Mobile Wizard
Joined: 4 Oct 2010
Posts:

Hi,

Any update?

Diego

Abi Waqas
abi's picture
Offline
Mobile Wizard
Joined: 3 May 2010
Posts:

Diego,

Haven't spared sometime to test it yet, stuff here at the moment is being backed at a high pace and we are trying our best to finish it off asa we can. But things do not finish to pop up. So in short, I haven't tested it yet. The reason behind this late reply is that I am not getting any notifications for replies to my posts. Which is very strange. Seems MoSync forum doesn't like me anymore. Anyway, will update you asa I get a chance to look into it.
Sorry, for delay.

Diego Velazquez
diegolv's picture
Offline
Mobile Wizard
Joined: 4 Oct 2010
Posts:

Hi Abi,

just a new piece of info:
- Mototola Defy 2.2 + 20111219 snapshot;
- Create an app with showing __TIME__;
- Install from sdcard and run it;
- Press home button;
- Recompile the app to update __TIME__;
- Install it again and run it;
- You see that it wont show the second time.

In order to really start the 2nd one, you should explicity call maExit and run it again.

Regards,

Diego