title: How to dynamically add stickers in the whatsapp-sticker pack [Android][Unity-Android plugin]?
body: <p>I have used the <a href="https://github.com/WhatsApp/stickers" rel="nofollow noreferrer">repo</a> to make an android plugin for my unity game, wherein I reward the player with some stickers at each level. So basically Im successful in calling the add sticker function from the android plugin and can add the sticker pack according to the desired identifier and name. (Here the contents.json, is already in the aar.)</p>
  
  <p>But since i now need to edit the contents.json (we cant modify .aar files) so i copy the assets file content checkout the content provider code <a href="https://pastebin.com/urhXTs7z" rel="nofollow noreferrer">https://pastebin.com/urhXTs7z</a>
  And now the contents.json is in my <code>Android/data/packagename/files/</code></p>
  
  <p>From Unity I deserialize and serialize that json and just add items to the sticker pack list. And then overwrite the contents.json <code>if (Application.platform == RuntimePlatform.Android)
          {
              System.IO.File.WriteAllText(Application.persistentDataPath + "/contents.json", contents);
          }</code></p>
  
  <p>It works for the original contents.json but after updating the stickerpack, the new items are not read by the <code>ReadContentFile</code> function
  But this doesnt work, the plugin just reads the original contents.json. (Because copy assets is called in OnCreate, I tried using sharepreferences of android to call the copyassets function only once. But then my app crashes.)</p>
  
  <p>I found people with similar questions here : <a href="https://github.com/WhatsApp/stickers/issues/340" rel="nofollow noreferrer">https://github.com/WhatsApp/stickers/issues/340</a>
  But im not able to figure out what to do.</p>
  
  <p>I dont know even it is possible to handle stickers addition dynamically when the code is inside a plugin.</p>
  
  <p>Please refer to the code in the pastebin link</p>
  
  <p>Would love any suggestions to alternative methods to do this.</p>