Error while delivering the message: ServiceIntent not found

前端 未结 4 1751
清酒与你
清酒与你 2020-12-21 08:23

I\'m trying to integrate AWS SNS push services with FCM in my Android app.
When I\'m trying to send a push message through SNS online console, I get this error log:

相关标签:
4条回答
  • 2020-12-21 09:06

    First you should apply the google-services plugin after the dependency block not in it. Also I'm not seeing any dependency that is adding FirebaseInstanceID so I'm not sure why that error is showing up. Also using FCM and GCM together is not a good idea since you have multiple receivers for the same message. Use one or the other. That could be why the sns messages are not being received.

    0 讨论(0)
  • 2020-12-21 09:14

    Adding firebase messaging dependency worked for me

    implementation 'com.google.firebase:firebase-analytics:17.0.1'
    implementation 'com.google.firebase:firebase-messaging:19.0.1'
    

    Please note that firebase-messaging have a dependency on firebase-analytics

    0 讨论(0)
  • 2020-12-21 09:15

    add 'implementation'com.google.firebase:firebase-messaging:17.4.0' in to your app level build.gradle file in dependency section.

    dependencies {
        implementation 'com.google.firebase:firebase-core:16.0.7'
        implementation 'com.google.firebase:firebase-database:16.1.0'
        implementation'com.google.firebase:firebase-messaging:17.4.0'
    }
    
    0 讨论(0)
  • 2020-12-21 09:22

    If you have tried all other solutions and still getting the error then try forcefully trying it... add the below code to your code where you asked for the service or getting map synced.
    inside Oncreate try adding:

     if(ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(yourActivity.this, Manifest.permission.ACCESS_COARSE_LOCATION)!= PackageManager.PERMISSION_GRANTED) {
                ActivityCompat.requestPermissions(yourActivity.this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, LOCATION_REQUEST_CODE);
    
            }
            else{
                mapFragment.getMapAsync(this);
            }
    
    
    
    
    and inside onConnected method try adding.
    
    if(ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(yourActivity.this, Manifest.permission.ACCESS_COARSE_LOCATION)!= PackageManager.PERMISSION_GRANTED)
            { 
    ActivityCompat.requestPermissions(youractivity.this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION},LOCATION_REQUEST_CODE );
    
            }
    
    0 讨论(0)
提交回复
热议问题