Code Monkey home page Code Monkey logo

Comments (4)

rlepinski avatar rlepinski commented on July 17, 2024

Are you enabling user notifications ? What OS versions? Did you disable notifications at the app level? Settings -> App Info -> App -> Notifications ?

from react-native-airship.

Diego-Franco avatar Diego-Franco commented on July 17, 2024

Yes, and yes, I did all the steps for notifications, the OS versions is pointed in the issue, for the Galaxy S6 is Android 7.0 and for the galaxy On 5 is Android 6.0.1

and like I said, my previous native android app is working fine on the Galaxy S6

from react-native-airship.

rlepinski avatar rlepinski commented on July 17, 2024

This is running the same SDK that runs on a native app.

Here is the call that determines that opt in status:
https://github.com/urbanairship/android-library/blob/fbfbcde094cca307cfd2906a508d4262546d2e37/urbanairship-sdk/src/main/java/com/urbanairship/push/PushManager.java#L544

Things that could cause it to be opted out:

  • User notifications disabled on PushManager
  • Push disabled on PushManager
  • GCM/FCM not configured properly
  • Notifications are disabled at the app level
  • Google Play Services is out of date

Assuming its the same code running on both phones, you can probably rule out push and user notifications being disabled on the SDK. My guess its most likely Google Play Services being out of date. Your react version is probably pulling in a newer version of the Play Services than your native app.

You should see something in the logs during start up. You can also add

import com.urbanairship.google.PlayServicesUtils;
...

public class MainActivity extends ReactActivity {
    ...

    @Override
    public void onResume() {
        super.onResume();

        // Handle any Google Play services errors
        if (PlayServicesUtils.isGooglePlayStoreAvailable(this)) {
            PlayServicesUtils.handleAnyPlayServicesError(this);
        }
}

To the MainActivity.java to have it prompt the user to install latest version.

from react-native-airship.

Diego-Franco avatar Diego-Franco commented on July 17, 2024

Thanks for your help, I forgot about Play services, and I just updated the Google play services and works, I'm going to put this check in the native code.

from react-native-airship.

Related Issues (20)

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.