I have searched and made sure there are no existing issues for the issue I am filing
Description
Can't use a singleTask activity by adding android:launchMode="singleTask" to the activity's manifest definition in tiapp.xml.
Expected Behavior
singleTask activity is a must when using Chrome Tab for OAuth login. These tabs open on top of the opening activity and can only be removed by returning to the app with a Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP launch intent.
Actual behavior
With Titanium, when the app returns to foreground, it will be blank.
I suspect it's because of some fault in handling of onNewIntent in TiBaseActivity, TiRootActivity and other activity subsclasses. It may also be related to the implementation of TiRootActivity.onCreate which I don't understand at all...
Reproducible sample
- Download the test
- All I did was to explicitly add
android:launchMode="singleTask" to the activity in the manifest (see: steps to reproduce)
- Build and run:
ti build -p android
- Move the app to background and then click the launch icon to return to foreground
-> The app will be blank.
Steps to reproduce
- Create a new test application for Android (
ti create) - call it TestApp
- open tiapp.xml and inside <android><manifest> replace the default empty <application> tag with:
<application android:icon="@mipmap/ic_launcher">
<activity android:launchMode="singleTask" android:label="@string/app_name" android:name=".TestappActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
- This activity definition only actually adds
android:launchMode="singleTask" to the default manifest that Titanium will create if we left the default <application/>
- Build:
ti build -p android
- When the application starts, put it to background and then click the launch icon to return to foreground
- The app will be blank.
Platform
Android
SDK version you are using
13.0.1.GA
Alloy version you are using
No response
I have searched and made sure there are no existing issues for the issue I am filing
Description
Can't use a singleTask activity by adding
android:launchMode="singleTask"to the activity's manifest definition in tiapp.xml.Expected Behavior
singleTask activity is a must when using Chrome Tab for OAuth login. These tabs open on top of the opening activity and can only be removed by returning to the app with a
Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOPlaunch intent.Actual behavior
With Titanium, when the app returns to foreground, it will be blank.
I suspect it's because of some fault in handling of
onNewIntentinTiBaseActivity,TiRootActivityand other activity subsclasses. It may also be related to the implementation ofTiRootActivity.onCreatewhich I don't understand at all...Reproducible sample
android:launchMode="singleTask"to the activity in the manifest (see: steps to reproduce)ti build -p android-> The app will be blank.
Steps to reproduce
ti create) - call it TestAppandroid:launchMode="singleTask"to the default manifest that Titanium will create if we left the default <application/>ti build -p androidPlatform
Android
SDK version you are using
13.0.1.GA
Alloy version you are using
No response