Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

414
Views
How to add animated stickers packs to WhatsApp using React Native?

I am using image picker to pick animated webp images in react-native android and can add static stickers but it fails to add animated sticker pack. To avoid file type issues I have used sample stickers from WhatsApp's sample animated sticker assets. (png tray icon sized 96x96 under 50kb and 3 animated webp files)

I am using react-native-whatsapp-sticker and modified it according to a repo react-native-dynamic-whatsapp-sticker. Those modules have not get updated since 2-3 years so the repo does not contains code for animated stickers. So I compered my module with WhatsApp sample app and made changes accordingly.There is no errors building the apk and stickers get added if I set animated sticker pack to false. But setting "animated_sticker_pack"=true and then adding sticker pack, WhatsApp show error as "there is problem with this pack...".

below is the code and links for modules file. I have been trying hard to solve it but could not get success. Thanks in advance.

error

Code:

    let pack = {
      "identifier": 'id1',
      "name": 'name1',
      "publisher": 'pub',
      "tray_image_file": tray,
      "publisher_email": Meta['EMAIL'],
      "publisher_website": Meta['SITE'],
      "privacy_policy_website": Meta['POLICY'],
      "license_agreement_website": Meta['LICENSE'],
      "image_data_version":"1",
      "avoid_cache":true,
      "animated_sticker_pack":true, // if false then works fine for static sticker 
      "stickers": stickers // array of {image_file:image.uri, emojis:['๐Ÿ™‚', '๐Ÿ˜‚'],}
    }

  const send = (pack) => {
    return RNWhatsAppStickers.prepare(JSON.stringify(pack))
    .then(str => JSON.parse(str.slice('1')) ) // {"animated_sticker_pack": 1, "identifier": "id1", "isWhitelisted": 0, "name": "name1", "publisher": "pub"}
    .then(res => RNWhatsAppStickers.send(res.identifier,res.name) )
  }

all those 5 java files responsible for sending sticker to WhatsApp. https://github.com/CrackerKSR/temporary

over 4 years ago ยท Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
ยฉ 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!