Git Product home page Git Product logo

Comments (9)

TheAlphamerc avatar TheAlphamerc commented on July 21, 2024

You are getting json data from remote getting so you have to extract value of key from data.

void getFCMServerKey() async {
    final RemoteConfig remoteConfig = await RemoteConfig.instance;
    await remoteConfig.fetch(expiration: const Duration(hours: 5));
    await remoteConfig.activateFetched();
    var data = remoteConfig.getString('FcmServerKey');
    if (data != null) {
      serverToken = jsonDecode(data)["key"];
    }
  } 

from flutter_twitter_clone.

ajatsoft avatar ajatsoft commented on July 21, 2024

yes, I configure it like my photos and I can't recibe notifications, I have to do anything else?
thank you a lot

from flutter_twitter_clone.

TheAlphamerc avatar TheAlphamerc commented on July 21, 2024

First of all please check notification by sending from the Postman.
You can use below demo json for notification.

{
  "notification": {
    "body": "this is a body",
    "title": "this is a title"
  },
  "priority": "high",
  "data": {
    "click_action": "FLUTTER_NOTIFICATION_CLICK",
    "id": "1",
    "status": "done",
    "title":"title",
    "body":"body",
    "tweetId":"wert"
    
     
  },
  "to": "ADD DEVICE FCM TOKEN HERE"
}

Postman notification configuration

Screenshot 2020-04-23 at 10 40 44 PM

Screenshot 2020-04-23 at 10 33 12 PM

from flutter_twitter_clone.

ajatsoft avatar ajatsoft commented on July 21, 2024

{
"multicast_id": 4493036613982111398,
"success": 0,
"failure": 1,
"canonical_ids": 0,
"results": [
{
"error": "MismatchSenderId"
}
]
}

from flutter_twitter_clone.

TheAlphamerc avatar TheAlphamerc commented on July 21, 2024

Probably you are using incorrect server key. Check your server key first.

from flutter_twitter_clone.

ajatsoft avatar ajatsoft commented on July 21, 2024

i cheked it , and y try after generate another one, config in my photos is ok?

from flutter_twitter_clone.

TheAlphamerc avatar TheAlphamerc commented on July 21, 2024

Your config seems ok in the photo. Please check you are using the correct FCM server key.

from flutter_twitter_clone.

ajatsoft avatar ajatsoft commented on July 21, 2024

from flutter_twitter_clone.

TheAlphamerc avatar TheAlphamerc commented on July 21, 2024

I haven't any idea what's wrong in your configuration. If your notification is not working with postman then it is obvious you have either missing something or not using correct values.

from flutter_twitter_clone.

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.