Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cordova-plugin-local-notifications
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nabil Sadki
cordova-plugin-local-notifications
Commits
626329de
Commit
626329de
authored
Apr 02, 2014
by
khizar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
android 2.1 support added
parent
c9633123
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
android-support-v4.jar
libs/android/android-support-v4.jar
+0
-0
plugin.xml
plugin.xml
+2
-1
Receiver.java
src/android/Receiver.java
+5
-3
No files found.
libs/android/android-support-v4.jar
0 → 100644
View file @
626329de
File added
plugin.xml
View file @
626329de
...
@@ -76,7 +76,8 @@
...
@@ -76,7 +76,8 @@
<config-file
target=
"AndroidManifest.xml"
parent=
"/manifest"
>
<config-file
target=
"AndroidManifest.xml"
parent=
"/manifest"
>
<uses-permission
android:name=
"android.permission.RECEIVE_BOOT_COMPLETED"
/>
<uses-permission
android:name=
"android.permission.RECEIVE_BOOT_COMPLETED"
/>
</config-file>
</config-file>
<!--libs/android/android-support-v4.jar-->
<framework
src=
"libs/android/android-support-v4.jar"
/>
<source-file
src=
"src/android/LocalNotification.java"
target-dir=
"src/de/appplant/cordova/plugin/localnotification"
/>
<source-file
src=
"src/android/LocalNotification.java"
target-dir=
"src/de/appplant/cordova/plugin/localnotification"
/>
<source-file
src=
"src/android/Receiver.java"
target-dir=
"src/de/appplant/cordova/plugin/localnotification"
/>
<source-file
src=
"src/android/Receiver.java"
target-dir=
"src/de/appplant/cordova/plugin/localnotification"
/>
<source-file
src=
"src/android/Options.java"
target-dir=
"src/de/appplant/cordova/plugin/localnotification"
/>
<source-file
src=
"src/android/Options.java"
target-dir=
"src/de/appplant/cordova/plugin/localnotification"
/>
...
...
src/android/Receiver.java
View file @
626329de
...
@@ -29,7 +29,9 @@ import org.json.JSONObject;
...
@@ -29,7 +29,9 @@ import org.json.JSONObject;
import
android.annotation.SuppressLint
;
import
android.annotation.SuppressLint
;
import
android.app.Notification
;
import
android.app.Notification
;
import
android.app.Notification.Builder
;
//import android.app.Notification.Builder;
import
android.support.v4.app.*
;
import
android.support.v4.app.NotificationCompat.*
;
import
android.app.NotificationManager
;
import
android.app.NotificationManager
;
import
android.app.PendingIntent
;
import
android.app.PendingIntent
;
import
android.content.BroadcastReceiver
;
import
android.content.BroadcastReceiver
;
...
@@ -121,7 +123,7 @@ public class Receiver extends BroadcastReceiver {
...
@@ -121,7 +123,7 @@ public class Receiver extends BroadcastReceiver {
Bitmap
icon
=
BitmapFactory
.
decodeResource
(
context
.
getResources
(),
options
.
getIcon
());
Bitmap
icon
=
BitmapFactory
.
decodeResource
(
context
.
getResources
(),
options
.
getIcon
());
Uri
sound
=
options
.
getSound
();
Uri
sound
=
options
.
getSound
();
Builder
notification
=
new
Notification
.
Builder
(
context
)
Builder
notification
=
new
Notification
Compat
.
Builder
(
context
)
.
setContentTitle
(
options
.
getTitle
())
.
setContentTitle
(
options
.
getTitle
())
.
setContentText
(
options
.
getMessage
())
.
setContentText
(
options
.
getMessage
())
.
setNumber
(
options
.
getBadge
())
.
setNumber
(
options
.
getBadge
())
...
@@ -136,7 +138,7 @@ public class Receiver extends BroadcastReceiver {
...
@@ -136,7 +138,7 @@ public class Receiver extends BroadcastReceiver {
}
}
if
(
Build
.
VERSION
.
SDK_INT
>
16
)
{
if
(
Build
.
VERSION
.
SDK_INT
>
16
)
{
notification
.
setStyle
(
new
Notification
.
BigTextStyle
()
notification
.
setStyle
(
new
Notification
Compat
.
BigTextStyle
()
.
bigText
(
options
.
getMessage
()));
.
bigText
(
options
.
getMessage
()));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment