Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4261] Android: Support making changes to root <activity> in <manifest> section of tiapp.xml, and having those changes be carried into generated manifest

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-06-09T08:52:30.000+0000
Affected Version/sRelease 1.7.0
Fix Version/sSprint 2011-23, Release 1.7.2, Release 1.8.0
ComponentsAndroid
Labelsn/a
ReporterBill Dawson
AssigneeEduardo Gomez
Created2011-05-31T13:42:48.000+0000
Updated2017-03-16T20:53:24.000+0000

Description

Example: If I want to add the android:alwaysRetainTaskState="true" attribute to the KitchenSink's root activity entry in AndroidManifest.xml, I should be able to put the manifest entry for the KitchenSink root activity (.KitchensinkActivity) into tiapp.xml like below and have it carry into the generated AndroidManifest.xml
<manifest><application>
<activity android:name=".KitchensinkActivity" 
   android:alwaysRetainTaskState="true" 
   android:configChanges="keyboardHidden|orientation" 
   android:label="Kitchensink" 
   android:name=".KitchensinkActivity" 
   android:theme="@style/Theme.Titanium">
  <intent-filter>
    <action android:name="android.intent.action.MAIN"/>
    <category android:name="android.intent.category.LAUNCHER"/>
  </intent-filter>
</activity>
</application></manifest>
(Note I put android:alwaysRetainTaskState="true" in there.) Currently this works already for all activities *except* the root activity, and now we want it to work for the root activity as well.

Comments

  1. Bill Dawson 2011-06-08

    Pull request done. https://github.com/appcelerator/titanium_mobile/pull/111 To test (with the pull request's changes, of course): * Open KitchenSink's tiapp.xml. * You'll notice that in the android->manifest->application section there is an <activity> entry for the KitchenSink's root activity. * Note that that activity entry has the android:alwaysRetainTaskState="true" attribute on it. That is a non-standard attribute that is *not* part of our template AndroidManifest.xml. * Build and run KS. * Look at the generated AndroidManifest.xml (build/android/AndroidManifest.xml) and confirm that the activity entry for the root activity (the activity with android:name=".KitchensinkActivity has the android:alwaysRetainTaskState="true" as well.
  2. Lee Morris 2017-03-16

    Closing ticket as fixed.

JSON Source