Jobeso / react-native-whatsapp-stickers

Integrate sticker packs for WhatsApp with your react-native app
Other
81 stars 30 forks source link

[Android]There's a problem with this sticker pack and it can't be added to WhatsApp #51

Closed mr94valerio closed 4 years ago

mr94valerio commented 4 years ago

Hi guys i have this problem and i can't find a solution. Those are the steps i made:

android {
    ...
    aaptOptions {
        noCompress "webp"
    }
    ... 

in build.gradle done

android\app\src\main\assets -

contents.json ----- file powa ------ folder

Inside powa folder sk.webp try.png

This is json file structure:

{
  "android_play_store_link": "https://play.google.com/store/apps/details?id=com.pow3rtv",
  "ios_app_store_link": "",
  "sticker_packs": [
    {
      "identifier": "powa",
      "name": "pow",
      "publisher": "MyName",
      "tray_image_file": "pow.png",
      "publisher_email":",myEmail@email.com",
      "publisher_website": "https://test.test",
      "privacy_policy_website": "",
      "license_agreement_website": "",
      "stickers": [
        {
          "image_file": "sk.webp",
          "emojis": ["🤭"]
        },
{
          "image_file": "ks.webp",
          "emojis": ["🤭"]
        },
{
          "image_file": "skks.webp",
          "emojis": ["🤭"]
        }
      ]
    }
  ]
}

to conclude this the js part

RNWhatsAppStickers.isWhatsAppAvailable()
  .then(isWhatsAppAvailable => {
    if (isWhatsAppAvailable) {
      return RNWhatsAppStickers.send('powa', 'pow')
    }
    return undefined
  })
  .catch(e => console.log(e))

What i'm doing wrong?

mr94valerio commented 4 years ago

Changing identifier and file name i solved

Gnanavel76 commented 3 years ago

Hi, I am also getting same error. I tried changing identifier and file name. It didn't worked. What to do?