Skip to content
This repository was archived by the owner on Feb 7, 2019. It is now read-only.
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

@Guatom

Description

@Guatom

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions