1

I'm using Mosync SDK 3.2.1 to develop a HTML 5 application for Android 2.2, 2.3 and 4.03. I had the issue described in this post http://jira.mosync.com/browse/MOSYNC-2367 . The fix proposed

android:launchMode="singleTask"

solved the "restarting of the app" issue when launching the app from menu but broke the launching behavior of the app via notifications when the app is working in background. (in launchMode="standard", works fine, the app resumes). With this fix it crashes with the message "Unfortunately, Zymbo has stopped" (4.0.3) and "The application Zybmbo has stopped unexpectedly."

If the application is not working in background the launch via notification works fine, the app is started.

This is how the MAIN activity is declared in manifest file.

<activity android:name=".MoSync"
            android:screenOrientation="portrait"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:label="@string/app_name"
            android:launchMode="singleTask">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

This is how the application behaves right now:
1. Launch the application via menu shortcut
2. Press "Home"
3. Launch the application via menu shortcut (launchMode="standard" => restarts the app BAD / launchMode="singleTask" resumes the background app OK)
4. Press "Home"
5. Launch the application via notification item (launchMode="standard" - opens the app working in background OK / launchMode="singleTask" the app crashes BAD)

What I want to achieve is if the application is running in background and I click the notification or the app icon from menu, i want the application to resume and not to start again.

Any hint is appreciated, Thank you, Mike

0 Answers0