Giter VIP home page Giter VIP logo

react-native-android-badge's Introduction

React Native Android Badge

NPM version

A react native wrapper for leolin310148/ShortcutBadger.

Why?

A react-native PushNotificationIOS provide setting badge of functions, it belongs to the native iOS support, but Android requires third-party library to do.

Setup

$ npm i --save react-native-android-badge
$ react-native link

Usage

var BadgeAndroid = require('react-native-android-badge');

BadgeAndroid.setBadge(10);

react-native-android-badge's People

Contributors

davidstoker avatar haridasu avatar jhen0409 avatar julienusson avatar morenoh149 avatar saeedzhiany avatar yernandus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

react-native-android-badge's Issues

Property 'setBadge' of undefined

I installed this library and linked it. In my index.js I called

var BadgeAndroid = require('react-native-android-badge'); // BadgeAndroid.setBadge(10);

and I am getting this error:

ExceptionsManager.js:65 Cannot read property 'setBadge' of undefined

Any idea?

How to update badge in background?

Hey there,

Is there a way to update the badge icon when the app's in the background? The documentation is sparse, so it's difficult to tell..

Thanks!

import me.jhen.react.BadgePackage

E:\myWorkspace\gey_admin_rn\android\app\src\main\java\com\geyadminrn\MainApplication.java:9: ▒▒▒▒: ▒▒▒▒▒me.jhen.react▒▒▒▒▒▒
import me.jhen.react.BadgePackage;
                    ^
E:\myWorkspace\gey_admin_rn\android\app\src\main\java\com\geyadminrn\MainApplication.java:55: ▒▒▒▒: ▒Ҳ▒▒▒▒▒▒▒
            new BadgePackage(),
                ^
  ▒▒▒▒: ▒▒ BadgePackage
2 ▒▒▒▒▒▒
:app:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

请问这个包咋报错了?

Add an example app in code ?

I use the code you provide, and it doesn't work on my Android simulator (I have the same issue as #2)

Could you add a working basic app in example/ ? This way, I would make it work and find the way to make it work in my app.

java.lang.NoSuchMethodError: No static method applyCount

Hi there,

I'm getting this native exception when calling setBadge:

java.lang.NoSuchMethodError: No static method applyCount(Landroid/content/Context;I)Z in class Lme/leolin/shortcutbadger/ShortcutBadger; or its super classes (declaration of 'me.leolin.shortcutbadger.ShortcutBadger' appears in /data/app/com.bookingsapp-1/base.apk)

Any idea what I'm doing wrong here?

Does it work in an emulator?

Hi,

Does this wrapper work in an android emulator running nougat?

I've tried it and it does not seem to work, I might have done something work though.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.