[TIMOB-3307] Android: Expose onNewIntent on Activities
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-26T10:26:42.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.7.0, Sprint 2011-11 |
Components | Android |
Labels | android, feature, release-1.7.0, reported-1.7.0 |
Reporter | Don Thorp |
Assignee | Don Thorp |
Created | 2011-04-15T03:41:48.000+0000 |
Updated | 2011-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
File | Date | Size |
---|---|---|
newintent.zip | 2011-04-15T03:41:49.000+0000 | 3061229 |
(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...
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 bar3) 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 bar3) Press the
Home
button4) 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 bar3) 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