Closed MikoNA77 closed 7 months ago
Update : I kinda get it working but it cant install userscript
Could you please upload a sample APK so that I can test your app?
Sure! app-release-MT2_sign.zip
For ChromeXt to work, please create a subclass of WebChromeClient
, and set it properly using setWebChromeClient.
After finishing this, please upload a new build of your app.
Done app-debug.zip
Did your app run flawlessly on your devices? It cannot run on my device. Here is the log:
03-27 14:58:45.487 10207 10207 D AndroidRuntime: Shutting down VM
03-27 14:58:45.488 10207 10207 E AndroidRuntime: FATAL EXCEPTION: main
03-27 14:58:45.488 10207 10207 E AndroidRuntime: Process: com.application.griyabelajarexam, PID: 10207
03-27 14:58:45.488 10207 10207 E AndroidRuntime: java.lang.RuntimeException: Unable to create service com.itsaky.androidide.logsender.LogSenderService: java.lang.SecurityException: Starting FGS with type dataSync callerApp=ProcessRecord{b726377 10207:com.application.griyabelajarexam/u0a42} targetSDK=34 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_DATA_SYNC]
03-27 14:58:45.488 10207 10207 E AndroidRuntime: at android.app.ActivityThread.handleCreateService(ActivityThread.java:4878)
03-27 14:58:45.488 10207 10207 E AndroidRuntime: at android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0)
03-27 14:58:45.488 10207 10207 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2365)
03-27 14:58:45.488 10207 10207 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:107)
03-27 14:58:45.488 10207 10207 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:232)
03-27 14:58:45.488 10207 10207 E AndroidRuntime: at android.os.Looper.loop(Looper.java:317)
03-27 14:58:45.488 10207 10207 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:8501)
03-27 14:58:45.488 10207 10207 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
03-27 14:58:45.488 10207 10207 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
03-27 14:58:45.488 10207 10207 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
03-27 14:58:45.488 10207 10207 E AndroidRuntime: Caused by: java.lang.SecurityException: Starting FGS with type dataSync callerApp=ProcessRecord{b726377 10207:com.application.griyabelajarexam/u0a42} targetSDK=34 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_DATA_SYNC]
03-27 14:58:45.488 10207 10207 E AndroidRuntime: at android.os.Parcel.createExceptionOrNull(Parcel.java:3182)
03-27 14:58:45.488 10207 10207 E AndroidRuntime: at android.os.Parcel.createException(Parcel.java:3166)
03-27 14:58:45.488 10207 10207 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:3149)
03-27 14:58:45.488 10207 10207 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:3091)
03-27 14:58:45.488 10207 10207 E AndroidRuntime: at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:6861)
03-27 14:58:45.488 10207 10207 E AndroidRuntime: at android.app.Service.startForeground(Service.java:775)
03-27 14:58:45.488 10207 10207 E AndroidRuntime: at com.itsaky.androidide.logsender.LogSenderService.onCreate(LogSenderService.java:57)
03-27 14:58:45.488 10207 10207 E AndroidRuntime: at android.app.ActivityThread.handleCreateService(ActivityThread.java:4865)
03-27 14:58:45.488 10207 10207 E AndroidRuntime: ... 9 more
03-27 14:58:45.488 10207 10207 E AndroidRuntime: Caused by: android.os.RemoteException: Remote stack trace:
03-27 14:58:45.488 10207 10207 E AndroidRuntime: at com.android.server.am.ActiveServices.validateForegroundServiceType(ActiveServices.java:2685)
03-27 14:58:45.488 10207 10207 E AndroidRuntime: at com.android.server.am.ActiveServices.setServiceForegroundInnerLocked(ActiveServices.java:2375)
03-27 14:58:45.488 10207 10207 E AndroidRuntime: at com.android.server.am.ActiveServices.setServiceForegroundLocked(ActiveServices.java:1704)
03-27 14:58:45.488 10207 10207 E AndroidRuntime: at com.android.server.am.ActivityManagerService.setServiceForeground(ActivityManagerService.java:13684)
03-27 14:58:45.488 10207 10207 E AndroidRuntime: at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:3430)
03-27 14:58:45.488 10207 10207 E AndroidRuntime:
Rebuilt it with release tag It should work now app-release-MT2_sign.zip
You simply need to make your subclass effective.
To do so, please overwrite at lease one method of the default WebChromeClient
class.
If you finish this, you will see the scripts installation works perfectly:
I installed your module and checked the webview app i want to use this module for but unfortunately it didnt work. Is there something that can be done to make this module works on that application. I have the source of the webview app that i want to make this module works Thanks!