Skip to content
This repository has been archived by the owner on Oct 3, 2022. It is now read-only.

Local Notification with stopped app #172

Closed
pawel82 opened this issue Jul 20, 2014 · 1 comment
Closed

Local Notification with stopped app #172

pawel82 opened this issue Jul 20, 2014 · 1 comment

Comments

@pawel82
Copy link

pawel82 commented Jul 20, 2014

Hello distriqt Team,
i use your local notification ane. It works fine when the app is running or runs in background. But i don't get any notifications, when the app ist stopped (e.g. by NativeApplication.nativeApplication.exit()). So i extend your example project by the instructions in your documentation.
First i set the receiver in the TestNotifications-app.xml file:
...
< android>
< manifestAdditions> < uses-permission android:name="android.permission.INTERNET"/> < uses-permission android:name="android.permission.VIBRATE"/> < application> < receiver android:name="com.distriqt.extension.notifications.NotificationsReceiver"> < intent-filter> < action android:name="air.com.distriqt.test.debug.NOTIFICATION" /> < action android:name="air.com.distriqt.test.debug.DELAYED_NOTIFICATION" /> ]]></ manifestAdditions>
</ android>
...

Second i call the register method in the constructor after appending the events:
...
Notifications.service.addEventListener( NotificationEvent.NOTIFICATION_DISPLAYED, notifications_notificationDisplayedHandler, false, 0, true );
Notifications.service.addEventListener( NotificationEvent.NOTIFICATION_SELECTED, notifications_notificationSelectedHandler, false, 0, true );
Notifications.service.register();
...

In the end i increase the notification delay from 1 to 10, to have some time to act.

Now when i start your example project, click on the panel and close the application, but nothing happens. No notification is shown on my andriod 4.0.4 device. Please tell me, if i have forgot something or misunderstood your documentation.

Best regrads
pawel

@marchbold
Copy link
Contributor

Hi,

You need to make sure that you change all references in the manifest additions of:

air.com.distriqt.test.debug

to your application id. Also you need to make sure if you are running in debug mode, whether your application has the automatic prepended 'debug' addition to the application id.

Cheers

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants