WhatsApp / stickers

This repository contains the iOS and Android sample apps and API for creating third party sticker packs for WhatsApp.
Other
2.73k stars 1.7k forks source link

[Android] Add to whatsapp button unresponsive #7

Closed seth-rah closed 5 years ago

seth-rah commented 5 years ago

Summary

Uncertain if this is relevant to the sample app or Whatsapp support

Selecting the add to Whatsapp button is not returning any feedback to me, and I am unable to find the stickerpack in Whatsapp.

The button just registers a press event and does nothing further

Phone used in test: Samsung Galaxy S2 Android version 4.1.2

10-27 12:17:08.901 2137-2205/? I/InputReader: Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.17562 ]
10-27 12:17:08.901 2137-2204/? I/InputDispatcher: Delivering touch to current input target: action: 0x0
10-27 12:17:08.901 2137-2204/? I/InputDispatcher: Delivering touch to current input target: action: 0x0
10-27 12:17:08.901 2137-2204/? I/InputDispatcher: Delivering touch to current input target: action: 0x0
10-27 12:17:08.951 2137-2205/? I/InputReader: Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=]
10-27 12:17:08.951 2137-2204/? I/InputDispatcher: Delivering touch to current input target: action: 0x1
10-27 12:17:08.956 2137-2204/? I/InputDispatcher: Delivering touch to current input target: action: 0x1
10-27 12:17:08.956 2137-2204/? I/InputDispatcher: Delivering touch to current input target: action: 0x1
10-27 12:17:08.961 2137-24031/? I/power: *** acquire_dvfs_lock : lockType : 1  freq : 1000000 
10-27 12:17:08.961 2137-24031/? D/PowerManagerService: acquireDVFSLockLocked : type : DVFS_MIN_LIMIT  frequency : 1000000  uid : 1000  pid : 2137  tag : ActivityManager
10-27 12:17:08.961 2137-24031/? W/ActivityManager: mDVFSLock.acquire()
10-27 12:17:09.001 2137-2635/? D/WindowManager: PhoneWindowManager: focusChangedLw
10-27 12:17:09.001 2137-2635/? D/KeyguardViewMediator: setHidden false
10-27 12:17:09.001 2137-2635/? D/WindowManager: mInputFocus is not null.
10-27 12:17:09.001 2137-2635/? D/WindowManager: mInputFocus is not null.
10-27 12:17:09.001 2137-2635/? D/WindowManager: mInputFocus is not null.
10-27 12:17:09.016 2137-2879/? D/WindowManager: PhoneWindowManager: focusChangedLw
10-27 12:17:09.016 2137-2879/? D/WindowManager: mInputFocus is not null.
10-27 12:17:09.041 2137-2149/? D/KeyguardViewMediator: setHidden false
10-27 12:17:09.041 2137-2195/? D/KeyguardViewMediator: setHidden false
10-27 12:17:09.041 2137-2340/? W/InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@42c7a008 attribute=null
10-27 12:17:09.056 2137-2195/? D/KeyguardViewMediator: setHidden false
10-27 12:17:09.056 2137-2137/? D/KeyguardViewMediator: setHidden false
10-27 12:17:09.961 2137-2178/? I/power: *** release_dvfs_lock : lockType : 1 
10-27 12:17:09.961 2137-2178/? D/PowerManagerService: releaseDVFSLockLocked : all DVFS_MIN_LIMIT are released 
10-27 12:17:09.961 2137-2178/? W/ActivityManager: mDVFSLock.release()

Please assist.

Edit

Whatsapp beta is required for this to work, however I feel the app should be responsive in telling the user that Beta is required if the install button is being unresponsive.

seth-rah commented 5 years ago

When the add to Whatsapp button is selected, the following error is shown in the logs

10-27 16:08:48.272 7599-7599/com.sethdistro.whatsappstickers1 E/dalvikvm: Could not find class 'android.support.v4.app.ActivityCompat$SharedElementCallback21Impl', referenced from method android.support.v4.app.ActivityCompat.setEnterSharedElementCallback
10-27 16:08:48.277 7599-7599/com.sethdistro.whatsappstickers1 E/dalvikvm: Could not find class 'android.support.v4.app.ActivityCompat$SharedElementCallback21Impl', referenced from method android.support.v4.app.ActivityCompat.setExitSharedElementCallback
10-27 16:08:48.342 7599-7599/com.sethdistro.whatsappstickers1 E/SpannableStringBuilder: SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
10-27 16:08:48.342 7599-7599/com.sethdistro.whatsappstickers1 E/SpannableStringBuilder: SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length

More verbose

D/dalvikvm: GC_FOR_ALLOC freed 106K, 13% free 11275K/12935K, paused 26ms, total 26ms
I/dalvikvm-heap: Grow heap (frag case) to 12.770MB for 524304-byte allocation
D/dalvikvm: GC_FOR_ALLOC freed 1K, 13% free 11785K/13511K, paused 16ms, total 16ms
I/dalvikvm: Could not find method android.app.Activity.finishAfterTransition, referenced from method android.support.v4.app.ActivityCompat.finishAfterTransition
W/dalvikvm: VFY: unable to resolve virtual method 131: Landroid/app/Activity;.finishAfterTransition ()V
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm: Could not find method android.app.Activity.getReferrer, referenced from method android.support.v4.app.ActivityCompat.getReferrer
W/dalvikvm: VFY: unable to resolve virtual method 142: Landroid/app/Activity;.getReferrer ()Landroid/net/Uri;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm: Could not find method android.app.Activity.postponeEnterTransition, referenced from method android.support.v4.app.ActivityCompat.postponeEnterTransition
W/dalvikvm: VFY: unable to resolve virtual method 153: Landroid/app/Activity;.postponeEnterTransition ()V
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm: Could not find method android.app.Activity.requestPermissions, referenced from method android.support.v4.app.ActivityCompat.requestPermissions
W/dalvikvm: VFY: unable to resolve virtual method 156: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V
D/dalvikvm: VFY: replacing opcode 0x6e at 0x001d
I/dalvikvm: Could not find method android.app.Activity.requireViewById, referenced from method android.support.v4.app.ActivityCompat.requireViewById
W/dalvikvm: VFY: unable to resolve virtual method 157: Landroid/app/Activity;.requireViewById (I)Landroid/view/View;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
W/dalvikvm: Unable to resolve superclass of Landroid/support/v4/app/ActivityCompat$SharedElementCallback21Impl; (67)
    Link of class 'Landroid/support/v4/app/ActivityCompat$SharedElementCallback21Impl;' failed
E/dalvikvm: Could not find class 'android.support.v4.app.ActivityCompat$SharedElementCallback21Impl', referenced from method android.support.v4.app.ActivityCompat.setEnterSharedElementCallback
W/dalvikvm: VFY: unable to resolve new-instance 1205 (Landroid/support/v4/app/ActivityCompat$SharedElementCallback21Impl;) in Landroid/support/v4/app/ActivityCompat;
D/dalvikvm: VFY: replacing opcode 0x22 at 0x0008
I/dalvikvm: Could not find method android.app.Activity.setEnterSharedElementCallback, referenced from method android.support.v4.app.ActivityCompat.setEnterSharedElementCallback
W/dalvikvm: VFY: unable to resolve virtual method 158: Landroid/app/Activity;.setEnterSharedElementCallback (Landroid/app/SharedElementCallback;)V
D/dalvikvm: VFY: replacing opcode 0x6e at 0x000f
W/dalvikvm: Unable to resolve superclass of Landroid/support/v4/app/ActivityCompat$SharedElementCallback21Impl; (67)
    Link of class 'Landroid/support/v4/app/ActivityCompat$SharedElementCallback21Impl;' failed
E/dalvikvm: Could not find class 'android.support.v4.app.ActivityCompat$SharedElementCallback21Impl', referenced from method android.support.v4.app.ActivityCompat.setExitSharedElementCallback
W/dalvikvm: VFY: unable to resolve new-instance 1205 (Landroid/support/v4/app/ActivityCompat$SharedElementCallback21Impl;) in Landroid/support/v4/app/ActivityCompat;
D/dalvikvm: VFY: replacing opcode 0x22 at 0x0008
I/dalvikvm: Could not find method android.app.Activity.setExitSharedElementCallback, referenced from method android.support.v4.app.ActivityCompat.setExitSharedElementCallback
W/dalvikvm: VFY: unable to resolve virtual method 159: Landroid/app/Activity;.setExitSharedElementCallback (Landroid/app/SharedElementCallback;)V
D/dalvikvm: VFY: replacing opcode 0x6e at 0x000f
I/dalvikvm: Could not find method android.app.Activity.shouldShowRequestPermissionRationale, referenced from method android.support.v4.app.ActivityCompat.shouldShowRequestPermissionRationale
W/dalvikvm: VFY: unable to resolve virtual method 161: Landroid/app/Activity;.shouldShowRequestPermissionRationale (Ljava/lang/String;)Z
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm: Could not find method android.app.Activity.startPostponedEnterTransition, referenced from method android.support.v4.app.ActivityCompat.startPostponedEnterTransition
W/dalvikvm: VFY: unable to resolve virtual method 168: Landroid/app/Activity;.startPostponedEnterTransition ()V
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
W/dalvikvm: Unable to resolve superclass of Landroid/support/v4/app/ActivityCompat$SharedElementCallback21Impl; (67)
    Link of class 'Landroid/support/v4/app/ActivityCompat$SharedElementCallback21Impl;' failed
D/dalvikvm: DexOpt: unable to opt direct call 0x1e30 at 0x0a in Landroid/support/v4/app/ActivityCompat;.setEnterSharedElementCallback
W/dalvikvm: Unable to resolve superclass of Landroid/support/v4/app/ActivityCompat$SharedElementCallback21Impl; (67)
    Link of class 'Landroid/support/v4/app/ActivityCompat$SharedElementCallback21Impl;' failed
D/dalvikvm: DexOpt: unable to opt direct call 0x1e30 at 0x0a in Landroid/support/v4/app/ActivityCompat;.setExitSharedElementCallback
denilchungath commented 5 years ago

For me it shows sending to Whatsapp when I click on add to Whatsapp button but gets stuck there. Nothing further happens and sticker pack does not appear in Whatsapp Tested on Xiaomi Mi A1 running Android Pie (SDK 28)

seth-rah commented 5 years ago

Upon investigation, this repo does not compile unless I am using Android 9 SDK (Latest)

Are some calls being made that require the newest version of Android?

falcon283 commented 5 years ago

After some pain, I'm new to Android, I was able to build and run on the emulator. I then tried on a real Device but I confirm that nothing happen when I tap add.

In order to build, latest Android Studio, I renamed the package, updated the Manifest (package), and the build.gradle applicationId. That values have to match.

Any suggest on how to make it work the add button? I'm totally new to Android

SamirMokiem commented 5 years ago

I had this problem to. It worked after i updated my whatsapp. If you cant update, sign up for the whatsapp beta (https://play.google.com/apps/testing/com.whatsapp/)

seth-rah commented 5 years ago

Whatsapp Beta has allowed the pack to install

Sending stickers seems to be a bit buggy at the moment, but I will leave that as Whatsapps fault.

I will be keeping this issue open though, the documentation for this repository should be updated stating that whatsapp beta is a requirement right now. As nowhere this is mentioned.

SamirMokiem commented 5 years ago

i think whatsapp doesn't update the app on all the android devices. but instead do it in waves. (Maybe android 9 first, android 8 second). Someone i am testing this with, didnt need the beta to do it. he could install the update as normal. I (samsung s7) needed to enter to the beta

falcon283 commented 5 years ago

Oh boy!!! you are right ... I have no Real Device with me so I had to use HockeyApp and a remote tester to verify it actually works!! There are people on the Play Store that actually complains the lack of stickers. Maybe they are just doing a phased release. Finger crossed

andyleekp commented 5 years ago

If you want to make the "Add to whatsapp" button responsive, you have to register to be a whatsapp beta tester in https://play.google.com/apps/testing/com.whatsapp . Then you will receive a update from play store and update to the beta version. The button will be responsive in this whatsapp version.

fduraibi commented 5 years ago

For me it shows sending to Whatsapp when I click on add to Whatsapp button but gets stuck there. Nothing further happens and sticker pack does not appear in Whatsapp Tested on Xiaomi Mi A1 running Android Pie (SDK 28)

I had a similar issue, and after further testing I found the problem was caused by some of the webp images I created with GIMP with lossless compression. After re-saving the same images with 90% compression it worked like a charm

simonzhexu commented 5 years ago

Yes, In order to add sticker pack to WhatsApp, you need to first be able to send stickers, which is only enabled for beta, at the moment.