Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android} There aren't any stickers in this pack #167

Closed
satyapol opened this issue Nov 7, 2018 · 29 comments
Closed

[Android} There aren't any stickers in this pack #167

satyapol opened this issue Nov 7, 2018 · 29 comments

Comments

@satyapol
Copy link

satyapol commented Nov 7, 2018

device-2018-11-07-155421

I can see all the stickers in the preview window, before installing.. and even after successful installation when I navigate to my stickers tab.. I get this msg saying "There aren't any stickers in pack",

I've 7 stickers in my pack. still it is showing that error msg.

@simonzhexu
Copy link
Contributor

try to use a debug version of your sticker app, and try to do a re-add to WhatsApp. It is likely because you have some invalid metadata. Or you can check your logcat.

@cornelg7
Copy link

cornelg7 commented Nov 9, 2018

After a dozen hours of 'try-again's I've managed to solve this for me. When converting from png to webp, be careful not to save any metadata. If you're using the same photoshop plugin as I am ( https://github.com/fnordware/AdobeWebM#download ), then you must have unchecked the "Save Metadata" box.
image

Hope this helps.

@mumayank
Copy link

mumayank commented Nov 9, 2018

This answer is not working. I'm getting the same error.

@simonzhexu
Copy link
Contributor

what do you see when you try to add your pack again?

@mumayank
Copy link

mumayank commented Nov 9, 2018

Then I could see my stickers again. But if I remove my app from background/ recent apps list, then WhatsApp starts showing the same error message. Why would this be happening I wonder.

Device: OnePlus5
Android Studio: 3.2.1
Code: Taken from WhatsApp Sticker Sample Android App, only did minimum changes.

@satyapol
Copy link
Author

After a dozen hours of 'try-again's I've managed to solve this for me. When converting from png to webp, be careful not to save any metadata. If you're using the same photoshop plugin as I am ( https://github.com/fnordware/AdobeWebM#download ), then you must have unchecked the "Save Metadata" box.
image

Hope this helps.

This solution worked properly!!
Thank you

@mumayank
Copy link

@satyapol
I feel bad about this. Firstly, just because a solution worked for only you using the paid tools used by you, doesn't mean it worked for everyone else, right? You have repeatedly posted the same answer multiple times in multiple issues of this repository.

I am using Android Studio along with GIMP. This is just not working!!! How can you close this thread on your own? Please reopen and suggest some Free alternatives instead of Adobe Photoshop.

@satyapol
Copy link
Author

@satyapol
I feel bad about this. Firstly, just because a solution worked for only you using the paid tools used by you, doesn't mean it worked for everyone else, right? You have repeatedly posted the same answer multiple times in multiple issues of this repository.

I am using Android Studio along with GIMP. This is just not working!!! How can you close this thread on your own? Please reopen and suggest some Free alternatives instead of Adobe Photoshop.

Hey I'm really sorry for closing the issue.. I didn't mean any inconvenience

@satyapol satyapol reopened this Nov 10, 2018
@satyapol
Copy link
Author

@satyapol
I feel bad about this. Firstly, just because a solution worked for only you using the paid tools used by you, doesn't mean it worked for everyone else, right? You have repeatedly posted the same answer multiple times in multiple issues of this repository.

I am using Android Studio along with GIMP. This is just not working!!! How can you close this thread on your own? Please reopen and suggest some Free alternatives instead of Adobe Photoshop.

If it helps, take a look at this documentation

https://developer.android.com/studio/write/convert-webp

@mumayank
Copy link

@satyapol No offence to you, and I'm sorry I was impolite. I have tried making it work all night yesterday with no success. Such a non-trival thing becoming a major roadblock you know.

Thanks for the link but I cropped/ edited my files using GIMP, and converted to WebP using Android Studio. I'm actively looking for an answer, and if I find a working solution, I'll post it here.

@satyapol
Copy link
Author

@satyapol No offence to you, and I'm sorry I was impolite. I have tried making it work all night yesterday with no success. Such a non-trival thing becoming a major roadblock you know.

Thanks for the link but I cropped/ edited my files using GIMP, and converted to WebP using Android Studio. I'm actively looking for an answer, and if I find a working solution, I'll post it here.

https://launchpad.net/gimp-webp

Have a look at this as well. But I don't have GIMP, so not sure

@kevinsnijder
Copy link

kevinsnijder commented Nov 11, 2018

I can confirm this issue, when removing the app from my recent app list, my stickers go away 9/10 times.
When I scan my webp files for metadata, I only get

Mimetype: | application/octet-stream

I don't know if this is useful, though.
I hope a fix will arrive for this.

Running a Oneplus 3T with the basic app example, changed some strings and stuff, but nothing major.

EDIT: Changed all files to the no metadata version as suggested by @cornelg7 but that did not solve the issue.
EDIT2: The solution below this comment solves the issue!

@mumayank
Copy link

SOLVED!

Okay guys, thank you for the patience. I have figured out why the issue was occuring for only select developers. Google Android smartphones sport vanilla Android OS, and hence everything works as expected. But, almost all other Android smartphone manufacturers customize the Android OS and then install it on their Android devices before selling/ providing OTAs. This leads to surprizes for devs/ users, like the one few of us are facing here.

One chief thing that most device manufacturers do is to think of ways to prolong the device's battery. One way of doing this is to force stop apps which aren't running in foreground/ or are in recent app list. After trial and error, I figured out this was the issue. I went to Settings > Battery > Optimization > [My app] > and selected Don't Optimize option. My stickers now works flawlessly in WhatsApp! My app doesn't need to be in recent app list!

Sadly, I wasn't able to find an API provided by Google to do this programmatically, so that users of our apps have a seamless experience. And neither other device manufacturers provide an API documentation for developers to do so, nor I would recommend this. Think: even if there was an API for this by each device manufacturer, developers' life would be so misrable! I think it is high time Google puts some restrictions on device manufacturers using Android, for the sake of awesome UX, and of course, for the developers.

For quick reference, here is the combined screenshot:

image

My device: OnePlus 5
OS: OxygenOS 5.1.5 based on Android Oreo 8.1.0

Please put a thumbs up ( 👍 ) if the answer worked for you. I'd highly appreciate it :)

@simonzhexu
Copy link
Contributor

Thank you. I have seen users write in to use for this problem and could not repro it. So far, I have only seen this happen to OnePlus devices, have you seen this for other devices?

@xxxdepy
Copy link

xxxdepy commented Nov 13, 2018

Well, this doesn't solve the issue though. We know exactly why the stickers are disappearing from WhatsApp - that's because for it to be in it the app has to be opened! Why is that even necessary, why can't WhatsApp save the stickers from an app instead of it requiring the app to be opened 24x7 for the user to use the stickers - this is a very poor Sticker mechanism.

@mumayank
Copy link

@xxxdepy Could you please provide the official statement from WhatsApp to support what you are saying? I was not able to find in WhatsApp stickers dev documentation that to use stickers in WhatsApp, the stickers app needs to remain open in the background.

Is it just your assumption, or you have valid official proof to support your claim?

@HareshSolankiibl
Copy link

Hello,
than how can i convert own pic as sticker.can is possible to i convert png to webp programatically?

@xxxdepy
Copy link

xxxdepy commented Nov 17, 2018

@HareshSolankiibl there are lot of ways to convert PNG to webp, and yes, you can also convert your own images to webp, if you want to make use of it in whatsapp sticker app make sure you size it according to the standards. The easiest method I use is using Android studio, open project folder in the IDE, select image, right click and convert to webp (uncheck the box that tells to ignore images with alpha channel).

@HareshSolankiibl
Copy link

@HareshSolankiibl there are lot of ways to convert PNG to webp, and yes, you can also convert your own images to webp, if you want to make use of it in whatsapp sticker app make sure you size it according to the standards. The easiest method I use is using Android studio, open project folder in the IDE, select image, right click and convert to webp (uncheck the box that tells to ignore images with alpha channel).

Thank dear for replay.

@simonzhexu
Copy link
Contributor

OnePlus broke how ContentProvider works in Android. The fix would be to suggest your user to turn on Battery->Do not optimize for the sticker app.

@simonzhexu
Copy link
Contributor

I looked into this issue, it seems the user has to turn on "Advanced Optimizations" in order to see the issue happen. We are talking to OnePlus to hopefully fix it for future OS. I am also looking into a way to remind the user about it for the current OS.

@amrit-citrusleaf
Copy link

Thank you. I have seen users write in to use for this problem and could not repro it. So far, I have only seen this happen to OnePlus devices, have you seen this for other devices?

Facing the same issue on Moto X4 running Android 8.0

@PriyankPainter
Copy link

Hii, I am getting this error but not understand why?
issue : Third party pack cannot be found likely because the corresponding app is restricted, sdk: 27 ,power saving mode: false

Please help as soon as possible.

@RahulPrajapati97
Copy link

@mumayank I have facing the issue is that I already click on don't optimize option and then only I add sticker in whats App but I face same issue that when I kill app sticker are automatically disappear.

@HasmukhBorad
Copy link

Try to Pack Size Small. And After Check Again.

@HerCerM
Copy link

HerCerM commented Jun 1, 2019

I had a very similar problem. I could see the stickers in the stickers app but not on WhatsApp; most of them would be missing in the corresponding pack tab. For some packs, none was visible and the error message Something went wrong appeared.

My solution

I didn´t try @cornelg7 solution, though I tried @mumayank suggestion with no success. I was using ImageMagick to convert PNG images to webP. The webP files were 512x512 px < 100Kb, but WA still didn't show them. After much fiddling around I decided to try another tool for the conversion. The obvious choice was Android Studio, so I converted one PNG and it worked! However, I wanted a conversion tool that could be used from cmd.exe, so I switched to cwebp and that is what I currently use. In fact, I use two batch scripts to automate converting PNG files of varying dimenstions to 512x512px webP < 100Kb. If you are interested, you can find the scripts in my GitHub. I still use ImageMagick for changing the dimensions of the PNG without distorting aspect ratio or removing transparency, but the conversion PNG-webP is done with cwebp.

@hbeita
Copy link

hbeita commented Aug 22, 2019

SOLVED!

Okay guys, thank you for the patience. I have figured out why the issue was occuring for only select developers. Google Android smartphones sport vanilla Android OS, and hence everything works as expected. But, almost all other Android smartphone manufacturers customize the Android OS and then install it on their Android devices before selling/ providing OTAs. This leads to surprizes for devs/ users, like the one few of us are facing here.

One chief thing that most device manufacturers do is to think of ways to prolong the device's battery. One way of doing this is to force stop apps which aren't running in foreground/ or are in recent app list. After trial and error, I figured out this was the issue. I went to Settings > Battery > Optimization > [My app] > and selected Don't Optimize option. My stickers now works flawlessly in WhatsApp! My app doesn't need to be in recent app list!

Sadly, I wasn't able to find an API provided by Google to do this programmatically, so that users of our apps have a seamless experience. And neither other device manufacturers provide an API documentation for developers to do so, nor I would recommend this. Think: even if there was an API for this by each device manufacturer, developers' life would be so misrable! I think it is high time Google puts some restrictions on device manufacturers using Android, for the sake of awesome UX, and of course, for the developers.

For quick reference, here is the combined screenshot:

image

My device: OnePlus 5
OS: OxygenOS 5.1.5 based on Android Oreo 8.1.0

Please put a thumbs up ( 👍 ) if the answer worked for you. I'd highly appreciate it :)

Nailed it!

@farhanrasool63866
Copy link

I am facing the same issue, as soon as I terminate/kill the app from background I could see that stickers are gone.

@MarvinJWendt
Copy link
Collaborator

Hi @farhanrasool63866, an update to the repo was pushed with sticker caching. Please update your sticker app to this version: https://github.com/WhatsApp/stickers/releases/tag/v1.1

Let us know if it solves your problem :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

16 participants