: https://developer.android.com/reference/android/service/quicksettings/TileService.htmlA TileService provides the user a tile that can be added to Quick Settings. Quick Settings is a space provided that allows the user to change settings and take quick actions without leaving the context of their current app
So, this is what i put in my manifest:
B4X:
AddApplicationText(
<service android:name="anywheresoftware.b4a.objects.MyQSTileService"
android:label="MyQSTileService"
android:icon="@drawable/mic"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
<intent-filter>
<action android:name="android.service.quicksettings.action.QS_TILE" />
</intent-filter>
</service>)
(I have a service named MyQSTileService)
The tile is successfully created in the notification bar, but it gives up this error when pressed:
java.lang.RuntimeException: Unable to instantiate service anywheresoftware.b4a.objects.MyQSTileService: java.lang.ClassNotFoundException: Didn't find class "anywheresoftware.b4a.objects.MyQSTileService" on path: DexPathList[[zip file "/data/app/b4a.example-1/base.apk"],nativeLibraryDirectories=[/data/app/b4a.example-1/lib/arm64, /system/lib64, /vendor/lib64]]
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3502)
at android.app.ActivityThread.-wrap6(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1732)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
Caused by: java.lang.ClassNotFoundException: Didn't find class "anywheresoftware.b4a.objects.MyQSTileService" on path: DexPathList[[zip file "/data/app/b4a.example-1/base.apk"],nativeLibraryDirectories=[/data/app/b4a.example-1/lib/arm64, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3499)
... 8 more
Any solutions?