This repository was archived by the owner on Feb 7, 2019. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 44
This repository was archived by the owner on Feb 7, 2019. It is now read-only.
Couldn't get notification data on launchEvent for Android #137
Copy link
Copy link
Closed
Labels
Description
Hey guys!
First of all, thanks for your work: it's been more than super useful for me.
I'm currently using nativescript-push-notifications@^0.1.4 and the following TNS modules:
┌──────────────────┬─────────────────┬────────────────┬──────────────────┐
│ Component │ Current version │ Latest version │ Information │
│ nativescript │ 3.1.2 │ 3.1.3 │ Update available │
│ tns-core-modules │ 3.1.1 │ 3.1.1 │ Up to date │
│ tns-android │ 3.1.1 │ 3.1.1 │ Up to date │
│ tns-ios │ 3.1.0 │ 3.1.0 │ Up to date │
└──────────────────┴─────────────────┴────────────────┴──────────────────┘
It works just OK for Android and iOS, but on Android I can't get the content of the notification when it arrives while the application is closed. The message arrives, the application starts, but I can't get the content of the notification, no matter what I try.
I tried using on from application before and after platformNativeScriptDynamic().bootstrapModule(AppModule);, and nothing:
I also tried using these ways:
- onMessageReceived function not called on iOS #32
- How to use it with angular 2 #45
- https://github.com/NativeScript/push-plugin#handling-mixed-messages (applying
launchEventinstead ofresumeEvent; the event gets triggered butandroidonly containsconstructor).
Here's my AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"
package="__PACKAGE__"
android:versionCode="1"
android:versionName="1.0">
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"/>
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="__APILEVEL__"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>Ï
<application
tools:replace="allowBackup"
android:name="com.tns.NativeScriptApplication"
android:allowBackup="true"
android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name="com.tns.NativeScriptActivity"
android:label="@string/title_activity_kimera"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="sensorPortrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.tns.ErrorReportActivity"/>
</application>
</manifest>
Any ideas?
Best regards and thanks again.
Reactions are currently unavailable