Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cordova-plugin-background-geolocation
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Aksimaya
cordova-plugin-background-geolocation
Commits
2038b1c0
Commit
2038b1c0
authored
Oct 15, 2013
by
Brian Samson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better notification icon, default icon
parent
a940ddd8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
plugin.xml
plugin.xml
+1
-0
LocationUpdateService.java
src/android/LocationUpdateService.java
+10
-1
notification.png
src/android/notification.png
+0
-0
No files found.
plugin.xml
View file @
2038b1c0
...
...
@@ -26,6 +26,7 @@
<source-file
src=
"src/android/data/sqlite/LocationOpenHelper.java"
target-dir=
"src/com/tenforwardconsulting/cordova/bgloc/data/sqlite"
/>
<source-file
src=
"src/android/data/sqlite/SQLiteLocationDAO.java"
target-dir=
"src/com/tenforwardconsulting/cordova/bgloc/data/sqlite"
/>
<source-file
src=
"src/android/notification.png"
target-dir=
"res/drawable"
/>
<source-file
src=
"src/android/android-support-v4.jar"
target-dir=
"libs"
/>
<config-file
target=
"AndroidManifest.xml"
parent=
"/manifest/application"
>
...
...
src/android/LocationUpdateService.java
View file @
2038b1c0
package
com
.
tenforwardconsulting
.
cordova
.
bgloc
;
import
java.util.Arrays
;
import
org.apache.http.HttpResponse
;
import
org.apache.http.client.methods.HttpPost
;
import
org.apache.http.entity.StringEntity
;
...
...
@@ -113,7 +115,14 @@ public class LocationUpdateService extends Service implements LocationListener {
notificationIntent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_SINGLE_TOP
);
Application
application
=
this
.
getApplication
();
int
backgroundIconId
=
application
.
getResources
().
getIdentifier
(
"background_notification"
,
"drawable"
,
application
.
getPackageName
());
int
backgroundIconId
=
0
;
for
(
String
s:
Arrays
.
asList
(
"ic_launcher"
,
"icon"
,
"notification"
)
)
{
backgroundIconId
=
application
.
getResources
().
getIdentifier
(
s
,
"drawable"
,
application
.
getPackageName
());
if
(
backgroundIconId
!=
0
)
{
break
;
}
}
int
appNameId
=
application
.
getResources
().
getIdentifier
(
"app_name"
,
"string"
,
application
.
getPackageName
());
PendingIntent
contentIntent
=
PendingIntent
.
getActivity
(
this
,
0
,
notificationIntent
,
0
);
...
...
src/android/notification.png
0 → 100644
View file @
2038b1c0
3.58 KB
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