Problem with Android Notification

After the successful importance of the com.urbanairship.android:urbanairship-fcm:9.6.0 I cannot understand where is the problem.

I am doing the following in Application.java file:

UAirship.shared().takeOff(this);
UAirship.shared().getPushManager().setPushEnabled(true);
UAirship.shared().getPushManager().setUserNotificationsEnabled(false);

and I can see the following logs:

2019-01-30 15:19:07.811 1838-1868/? I/....... - UALib: Airship taking off!
2019-01-30 15:19:07.812 1838-1868/? I/....... - UALib: Airship log level: 3
2019-01-30 15:19:08.017 1838-1868/? I/....... - UALib: Airship ready!
2019-01-30 15:19:08.017 1838-1868/? D/....... - UALib: Autopilot - Airship ready!

Everything seems ok, but then I try to send a Notification from urban-airship platform and I see the following:

and as you can see the Status is Inactive while the "Last Registration" is the same like "Created".

and I cannot understand why 2 devices in Android are Opted-out.

Didn't find what you were looking for?

New post

Comments

3 comments

  • Hey Matthias,

    Thanks for contacting Urban Airship. My name is Chilun and I would be happy to help.

    So what you're doing here is you are disabling the user notification functionality:

    UAirship.shared().getPushManager().setUserNotificationsEnabled(false);

    In this case, just set it to true and it should be okay.

    UAirship.shared().getPushManager().setUserNotificationsEnabled(true);

    Kind regards,
    Chilun Liu
    Senior Technical Support Engineer
    Urban Airship

    25 Lavington Street | London | SE1 0NZ
    Portland | San Francisco | London | New York | Gurgao

    Comment actions Permalink
    0
  • Hi Chilun,

    I changed it and the "Android Channel Id" is still INACTIVE. About the next Image I cannot see it today, I am going to have new results tomorrow.

    I have also noticed the followings:

    getPushTokenRegistrationEnabled: true
    isPushAvailable: false                                ?????
    isPushEnabled: true
    getRegistrationToken: null                          ?????
    channelCaptureEnabled: true

    Why Push is Available and RegistrationToken is null?

     

    Comment actions Permalink
    0
  • Finally I found the solution but I cannot understand why!

     

    The problem was in app gradle where I was setting:

    implementation 'com.urbanairship.android:urbanairship-fcm:9.6.0'

    because I was using the Firebase.

    Although when I tried to set:

    implementation 'com.urbanairship.android:urbanairship-gcm:9.6.0'

    everything was ok!

     

    Does it make sense?

    Comment actions Permalink
    0

Please sign in to leave a comment.