Skip to content

Get pending intent for Android > S #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
/src/windows/**/bin
/src/windows/**/obj
.idea
src/cordova-plugin-local-notifications.iml
src/cordova-plugin-local-notifications.iml
.DS_Store
33 changes: 29 additions & 4 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,19 @@
<preference name="ANDROID_SUPPORT_V4_VERSION" default="26.+" />
<framework src="com.android.support:support-v4:$ANDROID_SUPPORT_V4_VERSION" />
<framework src="src/android/build/localnotification.gradle" custom="true" type="gradleReference"/>
<!-- android x -->
<preference name="ANDROIDX_VERSION" default="1.2.0" />
<preference name="ANDROIDX_APPCOMPAT_VERSION" default="1.3.1" />

<framework src="androidx.appcompat:appcompat:$ANDROIDX_APPCOMPAT_VERSION" />

<config-file target="res/xml/config.xml" parent="/*">
<feature name="LocalNotification">
<param name="android-package" value="de.appplant.cordova.plugin.localnotification.LocalNotification"/>
</feature>
</config-file>

<config-file target="AndroidManifest.xml" parent="/manifest/application">
<config-file target="AndroidManifest.xml" parent="application">
<provider
android:name="de.appplant.cordova.plugin.notification.util.AssetProvider"
android:authorities="${applicationId}.localnotifications.provider"
Expand All @@ -119,9 +124,10 @@
android:name="de.appplant.cordova.plugin.localnotification.ClearReceiver"
android:exported="false" />

<service
<activity
android:name="de.appplant.cordova.plugin.localnotification.ClickReceiver"
android:exported="false" />
android:exported="false"
android:theme="@style/Theme.AppCompat.NoActionBar"/>

<receiver
android:name="de.appplant.cordova.plugin.localnotification.RestoreReceiver"
Expand All @@ -134,9 +140,12 @@
</receiver>
</config-file>

<config-file target="AndroidManifest.xml" parent="/manifest">
<config-file target="AndroidManifest.xml" parent="/*">
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
</config-file>

<source-file
Expand Down Expand Up @@ -183,10 +192,18 @@
src="src/android/notification/receiver/AbstractRestoreReceiver.java"
target-dir="src/de/appplant/cordova/plugin/notification/receiver" />

<source-file
src="src/android/notification/receiver/AbstractNotificationReceiver.java"
target-dir="src/de/appplant/cordova/plugin/notification/receiver" />

<source-file
src="src/android/notification/receiver/AbstractTriggerReceiver.java"
target-dir="src/de/appplant/cordova/plugin/notification/receiver" />

<source-file
src="src/android/notification/receiver/NotificationTrampolineActivity.java"
target-dir="src/de/appplant/cordova/plugin/notification/receiver" />

<source-file
src="src/android/notification/trigger/DateTrigger.java"
target-dir="src/de/appplant/cordova/plugin/notification/trigger" />
Expand All @@ -207,6 +224,10 @@
src="src/android/notification/util/AssetUtil.java"
target-dir="src/de/appplant/cordova/plugin/notification/util" />

<source-file
src="src/android/notification/util/LaunchUtils.java"
target-dir="src/de/appplant/cordova/plugin/notification/util" />

<source-file
src="src/android/notification/Builder.java"
target-dir="src/de/appplant/cordova/plugin/notification" />
Expand All @@ -219,6 +240,10 @@
src="src/android/notification/Notification.java"
target-dir="src/de/appplant/cordova/plugin/notification" />

<source-file
src="src/android/notification/NotificationVolumeManager.java"
target-dir="src/de/appplant/cordova/plugin/notification" />

<source-file
src="src/android/notification/Options.java"
target-dir="src/de/appplant/cordova/plugin/notification" />
Expand Down
1 change: 1 addition & 0 deletions src/android/ClearReceiver.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Apache 2.0 License
*
* Copyright (c) Sebastian Katzer 2017
* Contributor Bhumin Bhandari
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apache License
Expand Down
6 changes: 4 additions & 2 deletions src/android/ClickReceiver.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Apache 2.0 License
*
* Copyright (c) Sebastian Katzer 2017
* Contributor Bhumin Bhandari
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apache License
Expand All @@ -22,13 +23,14 @@
package de.appplant.cordova.plugin.localnotification;

import android.os.Bundle;
import android.support.v4.app.RemoteInput;
import androidx.core.app.RemoteInput;

import org.json.JSONException;
import org.json.JSONObject;

import de.appplant.cordova.plugin.notification.Notification;
import de.appplant.cordova.plugin.notification.receiver.AbstractClickReceiver;
import de.appplant.cordova.plugin.notification.util.LaunchUtils;

import static de.appplant.cordova.plugin.localnotification.LocalNotification.fireEvent;
import static de.appplant.cordova.plugin.notification.Options.EXTRA_LAUNCH;
Expand Down Expand Up @@ -95,7 +97,7 @@ private void launchAppIf() {
if (!doLaunch)
return;

launchApp();
LaunchUtils.launchApp(getApplicationContext());
}

/**
Expand Down
Loading