katzer / cordova-plugin-badge Goto Github PK
View Code? Open in Web Editor NEWAccess and modify badge numbers
License: Apache License 2.0
Access and modify badge numbers
License: Apache License 2.0
I already use the plugin implementation was very easy - thanks for that.
Is it possible to translate the Notification "XXX" Would like to Send you..?
Or is it possible to change the Text?
Maybe Text implimentation whould be nice:
if (window.cordova) {
$ionicPlatform.ready(function() {
console.log("Badge Init");
$cordovaBadge.promptForPermission();
//Set Badge for all Services
$cordovaBadge.hasPermission().then(function(result) {
//Translatable Notification
$cordovaBadge.setText($translate.instant('NOTIFICATION TEXT');
$cordovaBadge.set($rootScope.testCount + $rootScope.testteamCount);
console.log("Badge Count Set");
}, function(error) {
console.log(error);
});
});
}
Hi!
I cannot set the badge using this package with Meteor. Has anyone used this package with Meteor?.
I tried to set the badge using the console too, but nothing works. I only tested it with my Android 4.0 (Samsung Galaxy R)
I'm using also Meteor package 'raix:push' that uses 'phonegap-plugin-push:1.3.0'. Is there any incompatibility with that plugin?
This is my code:
onBadgeSet = () ->
console.log 'badge set'
console.log 'badge get', cordova.plugins.notification.badge.get()
onBadgeRegistration = () ->
console.log 'badge registration done!'
cordova.plugins.notification.badge.set('10', onBadgeSet, this)
console.log 'badge get 2', cordova.plugins.notification.badge.get()
cordova.plugins.notification.badge.registerPermission(onBadgeRegistration, this)
I see badge set
in the console, but badge get
is undefined
I'm not sure I'm using the plugin correctly.
Thank you in advance!
Cordova 5.0.0
cordova plugin add de.appplant.cordova.plugin.badge
Fetching plugin "de.appplant.cordova.plugin.badge" via cordova plugins registry
npm http GET http://registry.cordova.io/de.appplant.cordova.plugin.badge
npm http 304 http://registry.cordova.io/de.appplant.cordova.plugin.badge
Installing "de.appplant.cordova.plugin.badge" for ios
Failed to install 'de.appplant.cordova.plugin.badge':Error: Cannot find module 'cordova-lib/src/cordova/platforms'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Context.requireCordovaModule (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/Context.js:48:12)
at module.exports (/Users/butchewing/Projects/BYP/2015/app/plugins/de.appplant.cordova.plugin.badge/scripts/ios/didRegisterUserNotificationSettings.js:40:29)
at runScriptViaModuleLoader (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:152:18)
at runScript (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:130:16)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:115:20
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
Error: Cannot find module 'cordova-lib/src/cordova/platforms'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Context.requireCordovaModule (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/Context.js:48:12)
at module.exports (/Users/butchewing/Projects/BYP/2015/app/plugins/de.appplant.cordova.plugin.badge/scripts/ios/didRegisterUserNotificationSettings.js:40:29)
at runScriptViaModuleLoader (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:152:18)
at runScript (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:130:16)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:115:20
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
I'm using this plugin along with cordova-plugin-local-notifications. Unfortunately as just after i set badge on iOS8, I can no longer schedule notifications:
Attempting to schedule a local notification <UIConcreteLocalNotification: 0x7f8a5b38e340>{fire date = Thursday, March 5, 2015 at 6:00:25 PM Central European Standard Time, time zone = Europe/Warsaw (GMT+1) offset 3600, repeat interval = NSCalendarUnitEra, repeat count = UILocalNotificationInfiniteRepeatCount, next fire date = Thursday, March 5, 2015 at 6:00:25 PM Central European Standard Time, user info = {
autoCancel = 1;
id = 1;
json = "";
}} with an alert but haven't received permission from the user to display alerts
Is it a bug or am I doing something wrong?
Edit:
There is a way to set badges just with Locale Notifications by passing only id and badge count (in case somebody has the same problem).
Hello, I'm using the badge plugin 0.5.2 version inside a phonegap build 3.3 application using jQuery mobile 1.4.2.
To keep the application running, I'm using the BackgroundJS plugin, which keeps the app in the background (to make sure it's working I added a popup inside a 5 minutes interval, which I can see after having the application minimized for that much time)
However the window.plugin.notification.badge.set()
doesn't seems to be working on background.
If I keep the app open I get the same popups and when I minimize it the application's icon has the badge number correctly applied.
If I minimize the app I never get the badge icon to update, even when I restore it back I get the popups, but when I minimize it back the icon still has no number change inside the badge.
Does the plugin requires the app to be open to upgrade the badges?
For some reason the version on PhoneGap Build is stuck on 0.6.4 and isn't updating to 0.7.1. Is this something you can fix?
HI,
i've just got this error while compiling with Phonegap Build on iOS:
The following build commands failed:
CompileC build/xxx.build/Release-iphoneos/xxx.build/Objects-normal/armv7/APPBadge.o xxx/Plugins/de.appplant.cordova.plugin.badge/APPBadge.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Android is fine. I went back to 0.6.2 for now.
Hey there...PGB doesn't support the Plugin in the latest version. Is there any date i can expect it?
I used the latest version of example-branch and I will get the error when I click back button to exit the app.
Following info is from logcat:
...
09-18 09:51:33.394 12701-12979/de.appplant.cordova.plugin.badge.example D/TilesManager﹕ Starting TG #0, 0xb9864d00
09-18 09:51:44.204 12701-12701/de.appplant.cordova.plugin.badge.example W/IInputConnectionWrapper﹕ showStatusIcon on inactive InputConnection
09-18 09:51:45.130 12701-12701/de.appplant.cordova.plugin.badge.example E/webview﹕ Error: WebView.destroy() called while still attached!
...
hi @katzer
if I use PGB cli-5.2.0 with your 0.7.0 version from npm + ant build => android ios winphone no problem at all
but if I use PGB cli-5.2.0 with your 0.7.1 version from npm + gradle build => all function break in ios and winphone
installing one without the other works perfectly but the two in presence of each other produce below:
** BUILD FAILED **
The following build commands failed:
Ld build/emulator/demo.app/demo normal i386
(1 failure)
Error code 65 for command: xcodebuild with args: -xcconfig,/Users/daniel/demo/platforms/ios/cordova/build-debug.xcconfig,-project,demo.xcodeproj,ARCHS=i386,-target,demo,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/daniel/demo/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/daniel/demo/platforms/ios/build/sharedpch
ERROR building one of the platforms: Error: /Users/daniel/demo/platforms/ios/cordova/build: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: /Users/daniel/demo/platforms/ios/cordova/build: Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:134:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
I was using the latest version of them with the latest version of ionic.
AutoClear is false.
Version cordova-plugin-badge is 0.7.0
I am using PGB 3.3 with 0.5.1 plugin
in Android and ios are all work
Android like => http://developer.android.com/images/ui/notifications/normal_notification_callouts.png
ios like => http://i.stack.imgur.com/m5BJB.jpg
but Windows phone 8 seem not work anymore
because of my Lumia 520 have no "integer" display like the ios or "status bar" display like the Android
Most (if not all? I didn't check) of the plugins use the window.plugins
namespace, this is the only one I noticed that uses window.plugin
.
Not a huge problem, but had me puzzling for a bit (I wrote window.plugins
out of habit).
I'm experiencing App crashes since developing in iOS8 and now testing on iOS7. Obvious change to config.xml
gap:plugin name="de.appplant.cordova.plugin.badge" version="0.6.1"
But, this version isn't available on the cloud based PhoneGap Build?
I am trying to use your plugin inside Phonegap/Cordova generated application. But the problem is it is not compiling when I run the iOS project.
/**
Register permission to show badges.
*
@param callback
The function to be exec as the callback
*/
_command = command;
[self.commandDelegate runInBackground:^{
[self.app registerPermissionToDisplayBadges];
}];
}
/**
First off, thank you for the great plugin - it worked perfectly under iOS 7.
Under iOS 8 apparently Apple has made API changes and now requires the user grant permission for badge updates. Because of this, this plugin no longer works with iOS 8.
Do you have any plans to update your plugin to properly support iOS 8?
Thanks!
hi @katzer
I am using PGB cli-5.2.0 + gradle build
for now 0.7.1 version from npm will cause PGB ios build fail and have these error message
Error - The following plugin (or plugin version) is not on npm or not available for this platform:
[email protected]": Fetching plugin "[email protected]"
via npm Installing "de.appplant.cordova.plugin.badge" for ios Fetching plugin
"de.appplant.cordova.common.registerusernotificationsettings
Hi there,
It seems the badge gets cleared everytime I tap the app icon, even though I disabled this using (as stated here):
cordova.plugins.notification.badge.configure({ autoClear: false });
Also the deprecated cordova.plugins.notification.badge.setClearOnTap(false)
didn't have any effect.
Plugin version: 0.6.3 and 0.6.4.
iOS 8.3
Am I doing missing something, or is this a known issue? For now I've created a workaround that resets the badge to the last known value on Cordova's resume event.
I believe that cordova-plugin-app-event
is the preferred choice for this functionality now.
Currently the latest versions of cordova-plugin-badge
and cordova-plugin-local-notifications
can't be used in the same project since the same dependencies are defined by two different packages.
Hello everyone!
I have integrated plugin into android phonegap app, it works just fine in terms of sending Android notifications (in status bar), but does not show count on icon badge. I've reread code of plugin trying to find where this functionality is — but didn't find it and now I am wondering, how to make it work & integrate it properly? I may provide any additional information if needed.
Thank you in advance!
I got this warning when setting a badge
THREAD WARNING: exec() call to Badge.setBadge blocked the main thread for 101ms. Plugin should use CordovaInterface.getThreadPool().
when i install this plugin ,gradle app throw the error.
FAILURE: Build failed with an exception.
Could not expand ZIP '/Users/hare/.gradle/caches/modules-2/files-2.1/me.leolin/ShortcutBadger/1.1.2/80367deac58e3730ea374f524ea3b927aa8fdaec/ShortcutBadger-1.1.2.aar'.
How can i solve it
I am testing this out on iOS using the PhoneGap debug application. After hitting phonegap serve and loading up in the iPhone, I get my "deviceready" event and I trigger an alert just to get a popup of when this event triggers, I then run:
cordova.plugins.notification.badge.set(10);
After checking the badge in iOS there is not number at all present no less a 10.
I have no errors output on the terminal screen.
Thanks in advanced, great plugin concept!
Hi,
since your last update i' facing a build error but i don't have logs to show you.
the build error only appears on Android build, not IOS.
the problem appears since the update badge for android :
Support for app icon badges on selective Android platforms
thanks in advance :)
The build failed. An error occurred while building the application. Verify your build assets are correct and try again.
Build Log:
Building a Cordova 4.1.2 application.
The application name is "Clara-M"
The package name is "com.eurofirstmultimedia.claram"
Preference android-signed set to false. Application will not be signed.
Plugin "org.apache.cordova.device" (0.2.13) installed.
Plugin "org.apache.cordova.splashscreen" (0.3.5) installed.
Plugin "org.apache.cordova.contacts" (0.2.15) installed.
Plugin "org.apache.cordova.file" (1.3.2) installed.
Plugin "org.apache.cordova.file-transfer" (0.4.8) installed.
Plugin "org.apache.cordova.geolocation" (0.3.11) installed.
Plugin "org.apache.cordova.globalization" (0.3.3) installed.
Plugin "org.apache.cordova.inappbrowser" (0.5.4) installed.
Plugin "org.apache.cordova.dialogs" (0.2.11) installed.
Plugin "org.apache.cordova.vibration" (0.3.12) installed.
Plugin "org.apache.cordova.statusbar" (0.1.9) installed.
Plugin "com.intel.xdk.file" (1.0.1) installed.
Plugin "com.intel.xdk.device" (1.0.7) installed.
Plugin "org.apache.cordova.camera" (0.3.4) installed.
Plugin "org.apache.cordova.media-capture" (0.3.5) installed.
Plugin "org.apache.cordova.network-information" (0.2.14) installed.
Plugin "nl.x-services.plugins.socialsharing" (4.3.19) installed.
Plugin "com.phonegap.plugins.facebookconnect" (0.10.1) installed.
Plugin "com.phonegap.plugins.PushPlugin" (2.4.0) installed.
Plugin "cc.fovea.cordova.purchase" (3.11.0) installed.
Hi everyone, i'm using this plugin, when i set a new badge (with custom configuration) it show a message, just like a push notification, but the badge is not showing in the icon, do you have an idea why this happens? thanks!
I had the local-notification plugin installed and it was working fine
cordova plugin add de.appplant.cordova.plugin.local-notification
then I tried to install badge because I was not able to clear the badge icon
cordova plugin add de.appplant.cordova.plugin.badge
Now I'm getting this error when I try to build in xcode
duplicate symbol _UIApplicationRegisterUserNotificationSettings in:
.../Debug-iphonesimulator/On-the-Go.build/Objects-normal/x86_64/AppDelegate+APPBadge.o
.../Debug-iphonesimulator/On-the-Go.build/Objects normal/x86_64/AppDelegate+APPLocalNotification.o
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am using PGB 3.4 with your plugin 0.5.2
this is my code
window.plugin.notification.badge.get( function (badge) {
// alert('Badge of the app icon: ' + badge);
}, scope);
function scope() { alert('scope'); }
issue one (occur in Android 4.0.3 or 4.1.1 or ...,ios and winphone are all work)
Step 1,I use "window.plugin.notification.badge.get" method to get the badge value,it will return 0,good
Step 2,I use "window.plugin.notification.badge.set(10);" method to set the badge value
Step 3,I use "window.plugin.notification.badge.get" method "again" to get the badge value,it will return 10,good
Step 4,I use "window.plugin.notification.badge.clear" method to clean all badge value
Step 5,I use step 3 again,but it still return 10 but not 0
no mater I use Step 4 Several times,it still return 10
unless,remove the app,re install again,use step 3,It will return 0 finally
issue two
the "scope" function seem not trigger in every platform,because of the "alert" not happened
I'm getting build failed with the following error.
APPBadge.m:158:25: error:
use of undeclared identifier
'UIApplicationRegisterUserNotificationSettings'
name:UIApplicationRegisterUserNotificationSettings
^
1 error generated.
Building with deployment target 7.0.
So on iOS it shows badges and on android is shows notifications in the status with an email icon.
How do i replace the small email icon in it?
cordova.plugins.notification.badge.configure({ smallIcon: 'icon' });
What is this smallIcon should i a provide a location to the icon or something? and when will version 0.60 be released so that i can use configure?
Is it possible that i can show a notification as well on iOS then i can use the same code for both.
After you minimized the android-support-v4.jar, there is an issued building for Android if you use another plugin that uses this jar, such as the Facebook Connect Plugin.
Adobe thinks you should update your jar to reflect the current Android release. http://community.phonegap.com/nitobi/topics/dependency-problem-between-facebookconnect-and-localnotification-plugins.
[dependency] Found 2 versions of android-support-v4.jar in the dependency list,
[dependency] but not all the versions are identical (check is based on SHA-1 only at this time).
[dependency] All versions of the libraries must be the same at this time.
[dependency] Versions found are:
[dependency] Path: /project/com.phonegap.plugins.facebookconnect/LoyaltyNoggin-FacebookLib/libs/android-support-v4.jar
[dependency] Length: 758727
[dependency] SHA-1: efec67655f6db90757faa37201efcee2a9ec3507
[dependency] Path: /project/libs/android-support-v4.jar
[dependency] Length: 19036
[dependency] SHA-1: bc202617b4cfed6673b1e10d87e52c78f7a6de38
Thanks
Greg Alton
Loyalty Noggin
This plugin is really awesome, however in android I'd like to know if there's a chance to make the small icon in the preview at the notification bar to be customizable in the future, or be able to remove the icon at all.
For example to show a smaller version of the application icon, which is mapped already once you open the notification bar.
In most of applications the mail icon is out of context
Hello,
do you see some possibility to create badges through some kind of server communication? I don't see a possibility to execute the javascript code when the Application is not running...
So my scenario is similar to some kind of push notifications!
Thanks!
Hey there,
I'm developing an iOS application with jquery mobile 1.4.2 and phonegap build 3.3. I have this code on my index.html
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
phonegap_ready.resolve();
if (device.platform === 'iOS' && parseFloat(device.version) >= 7.0) {
StatusBar.overlaysWebView(false);
StatusBar.show();
}
window.plugin.notification.badge.setClearOnTap(true);
}
However when I ran the app I noticed it wasn't refreshing the badge icon number. Then I opened the app in debug mode, and when I executed the same line of code the console threw an error saying "undefined is not a function (evaluating window.plugin.notification.badge.setClearOnTap(true);)"
Is this method implemented already? am I using it wrong?
Thanks for your time!
Android 4.03 and Android 4.1.1
issue
http://developer.android.com/images/ui/notifications/normal_notification_callouts.png
when the message appear and click it
4.03 will reback to the app
4.11 will reopen another same app (it means to see the splash screen again and other initiallize thing)
suggestion(maybe future new version)
look at this picture
http://developer.android.com/images/ui/notifications/normal_notification_callouts.png
I hope the text "new message" can be Definitions by myself,if could,This will become more resilient
How can this be resolved?
Error happened [TypeError: Object.keys called on non-object]
TypeError: Object.keys called on non-object
at Function.keys (native)
at Object.getPluginFromFetchJsonByLocator (C:\Users\x\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\lib\state.js:734:26)
at Object.savePlugin (C:\Users\x\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\lib\state.js:670:36)
at C:\Users\x\AppData\Roaming\npm\node_modules\ionic\lib\ionic\cordova.js:90:22
at _fulfilled (C:\Users\x\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\x\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\x\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:749:13)
at C:\Users\x\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:557:44
at flush (C:\Users\x\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:108:17)
at process._tickCallback (node.js:355:11)
The app crashes in IOS7 if its built under IOS8.
This issue is mentioned but i have fixed it by doing a check on runtime with the following code:
/**
(BOOL) hasPermissionToSetBadges
{
if(NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_7_1) {
UIUserNotificationSettings *settings = [[UIApplication sharedApplication]
currentUserNotificationSettings];
return (settings.types & UIUserNotificationTypeBadge);
}else{
return YES;
}
return YES;
}
hope it helps.
Thanks
Hello Katzer,
I've updated your plugin and it seems that i can't build my app anymore.
I'm receiving the following error:
/platforms/android/src/de/appplant/cordova/plugin/badge/LaunchActivity.java:32: Error: This class should be public (de.appplant.cordova.plugin.badge.LaunchActivity) [Instantiatable]
It looks like it's because of the changes in c123e8f
Failed to install 'de.appplant.cordova.plugin.badge':CordovaError: Plugin doesn't support this project's cordova-android version. cordova-android: 3.7.1, failed version requirement: >=4
Hi, forgive me if this is the wrong place to ask.
I'm having some trouble with using the plugin through ng-cordovas badge.js (https://github.com/driftyco/ng-cordova/blob/master/src/plugins/badge.js) in an ionic app.
On cordovas resume event I trigger the bagde update (from my app.js file):
Typescript:
.run("$timeout", "$ionicPlatform", "$cordovaBadge", "BadgeCounterService", "TaskResource", ($timeOut:ng.ITimeoutService, $ionicPlatform:ionic.IonicPlatform, $cordovaBadge:ngcordova.Badge, badgeCounterService:ft.badge.BadgeCounterService, taskResource:ft.resources.TaskResource) => {
$ionicPlatform.on("resume", () => {
console.log("Resuming app");
taskResource.getTaskCount((taskCount:l.TaskCount) => {
// Without timeout here, of at least 500ms the badge won't be set through the service even on single tap of home button.. for some reason.
$timeOut(() => {
badgeCounterService.updateTaskCount(taskCount:l.TaskCount);
}, 500, false);
});
});
}])
The badgeCounterService impl:
Typescript:
public updateTaskCount(num:number):void {
this.$cordovaBadge.set(num);
this.taskCount = num;
}
So the above two code snippets code work (with the exception that I have to set a timeout) when the user normally presses their home button once and goes i and out of the app. The problem occours when the user double taps and switches to e.g. Safari and then double taps back to the app. The count is retrieved and the bagde is updated correctly inside the app, but is not set on the icon on the home screen.
I've also tried to simplify the code (it's still from ionics run method though):
Typescript:
document.addEventListener("deviceready", ()=> {
var config = setTimeout(() => $cordovaBadge.configure({autoClear: false}), 0);
console.log("Config: ", config);
}, false);
document.addEventListener("resume", () => {
$cordovaBadge.set(100).then(() => {
$cordovaBadge.get().then((num) => {
console.log("number on homescreen: ", num)
})
});
}, false)
But still no luck. In this case, without the timeout, the badge number is not set on home screen at all. The console log of badge number on homescreen is also inconsistent:
2015-06-02 10:49:50.354 app[1147:111758] number on homescreen: 100
2015-06-02 10:49:50.785 app[1147:111758] active
2015-06-02 10:49:52.576 app[1147:111758] number on homescreen: 100
2015-06-02 10:49:52.970 app[1147:111758] active
2015-06-02 10:49:55.058 app[1147:111758] number on homescreen: 0
2015-06-02 10:49:55.474 app[1147:111758] active
2015-06-02 10:49:57.207 app[1147:111758] number on homescreen: 100
2015-06-02 10:49:57.630 app[1147:111758] active
2015-06-02 10:50:06.227 app[1147:111758] number on homescreen: 0
2015-06-02 10:50:06.517 app[1147:111758] active
2015-06-02 10:50:17.075 app[1147:111758] number on homescreen: 0
2015-06-02 10:50:17.350 app[1147:111758] active
2015-06-02 10:50:19.965 app[1147:111758] number on homescreen: 100
2015-06-02 10:50:20.387 app[1147:111758] active
Log statement for config reports that autoClear is set to false. Any thoughts?
Version 0.6.3 supposedly resolves the duplicate _UIApplicationRegisterUserNotificationSettings
symbol issue with the local-notification plugin, but I'm still getting that error for AppDelegate.o
and AppDelegate+APPLocalNotification.o
, I guess because UIApplicationRegisterUserNotificationSettings
is extern const
but is assigned to in both files. A #define guard might be the simplest solution if that's the only issue.
For Samsung and Sony devices there might be available a native solution.
is it possible when user click the notification on android opening a specific page of app.
http://stackoverflow.com/questions/16689092/phonegap-pushnotification-to-open-a-specific-app-page
I found this but its for push plugin.
Somehow badge.js doesn't load, so I can't access its methods. But I can run something like cordova.exec(null, null, 'Badge', 'setBadge', [3])
directly in my script.
Any idea what might be wrong?
Dear,
I develop aplications with Phonegap without native SDK´s, instead of Dreamweaver ( html+js+css ).
I´am sorry, but i have not clear how to call in the html to clear the badge in some cases, for example:
Can you help a little ?
Thx you.
WP8 has to be added to the supported platforms.
A custom version of the LiveTiles plugin can be used.
Hello,
When I build the android application from cordova-plugin-badge-example, the badge is showing correctly on the icon (I have a samsung galaxy Note II). But when I do:
"cordova platform remove android"
"cordova platform add android"
"cordova run android"
The badge is not showing anymore after that (for information, I need to tape these commands to install correctly a notification push plugin).
Any idea to how correct this problem?
Thanks in advance!
Can I handle push notifications (from the PushPlugin git) with this badge plugin?
var androidBadge = cordova.plugins.notification.badge;
androidBadge.configure({ smallIcon: 'icon' });
androidBadge.set(6);
I use this when messages come in. And instead of showing 6 as a badge icon. It shows it as a notification. '6 new messages'.
I am testing on a HTC One M7
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.