Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3307] Android: Expose onNewIntent on Activities

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-26T10:26:42.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.7.0, Sprint 2011-11
ComponentsAndroid
Labelsandroid, feature, release-1.7.0, reported-1.7.0
ReporterDon Thorp
AssigneeDon Thorp
Created2011-04-15T03:41:48.000+0000
Updated2011-04-26T10:26:42.000+0000

Description

create a callback for newIntent that's called synchronously on Ti.Android.currentActivity. Similar to pause and resume.

See the http://developer.android.com/reference/android/app/Activity.html#onNewIntent(android.content.Intent"> Android Docs) make sure setIntent is also exposed so an Activities intent can be updated if needed.

Attachments

FileDateSize
newintent.zip2011-04-15T03:41:49.000+00003061229

Comments

  1. Don Thorp 2011-04-15

    (from [576b6298029ec8b4e67de3f2feb1c4d665f8ca89]) [#3307 state:fixed-in-qa] Added support. A test app will be attached https://github.com/appcelerator/titanium_mobile/commit/576b6298029ec8b4e67de3f2feb1c4d665f8ca89"> https://github.com/appcelerator/titanium_mobile/commit/576b6298029e...

  2. Don Thorp 2011-04-15

    This one is a fun one to test. You'll need the attached app. After you import it once and launch it, you'll need to edit the theme.xml file and remove .Fullscreen from the Theme. After you do that don't touch tiapp.xml because there is a couple of bugs where it won't properly honor the flags in tiapp.xml and if you edit tiapp.xml it wipes out the edits. You need to be able to see the status bar to test.

    This feature centers around this http://developer.android.com/reference/android/app/Activity.html#onNewIntent(android.content.Intent"> method). There are several variations that need to be performed to test all of the combinations.

    App Already in Foreground

    1) Launch the app
    2) Click the Notify button, you should see an icon appear in the status bar
    3) Pull down the status bar, select the notification and you should see a Toast pop up saying a new intent was received.

    App In Background

    1) Launch the app
    2) Click the Notify button, you should see an icon appear in the status bar
    3) Press the Home button
    4) Pull down the status bar, select the notification and you should see the application brought to front and a Toast pop up saying a new intent was received.

    App Closed

    1) Launch the app
    2) Click the Notify button, you should see an icon appear in the status bar
    3) Press the Back button to exit the app.
    3) Pull down the status bar, select the notification and you should NOT see a Toast pop up

JSON Source