Android Question DesignSupport problem after update

Pxs

Member
Licensed User
Hello
After updating from b4a 11 to 12, and downloading the new sdk ( 33)
Design support no longer works. i get:

Maven artifact not found: androidx.viewpager2/viewpager2
Source: DesignSupport

Redownloading com.android.support:design from the sdk manager does nothing

I tried to search around and seems like DesignSupport is no longer supported? i need it for DSTabLayout and DSNavigationDrawer...Rewriting all the navigation and layouts across multiple apps would take me alot of time i cannot afford right now.... is there any workaround?


Thanks
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 1

Pxs

Member
Licensed User
Darn it, this is going to be a headache?
Whats the current library recommendation for tabbed navigation to replace DSTabLayout? ( not yet using b4xpages)
 
Upvote 0

Pxs

Member
Licensed User
TabStripViewPager
Tried experimenting with it, have a few issues i need to solve before implementing it ( left tab goes out of screen border, and the tabstrip has issues taking the full screen, a few pixels of border remain all around it).
Also tested ASTabMenuAdvanced , seems promising but more complex and quite different to implement


On a side note, i tried experimenting with different manifest/sdk versions/ b4a versions.

Tinkering around with different versions (same source still using designsupport) i managed somehow to compile with no error and get google play store to accept the apk ( still not sure why it works, as my android.jar is lower then the target, but w/e):
  • Manifest target sdk=31
  • path: android-30 jar
  • b4A v12.00

Only ...small... problem is, it crashes at boot :
*** Service (firebasemessaging) Create ***
firebasemessaging_service_create (java line: 304)
java.lang.NoSuchMethodError: No virtual method getToken()Lcom/google/android/gms/tasks/Task; in class Lcom/google/firebase/messaging/FirebaseMessaging; or its super classes (declaration of 'com.google.firebase.messaging.FirebaseMessaging' appears in base.apk!classes2.dex)
at anywheresoftware.b4a.objects.FirebaseNotificationsService$FirebaseMessageWrapper.updateToken(FirebaseNotificationsService.java:112)
at anywheresoftware.b4a.objects.FirebaseNotificationsService$FirebaseMessageWrapper.Initialize(FirebaseNotificationsService.java:109)
at com.pixsys.pixsysguard.firebasemessaging._service_create(firebasemessaging.java:304)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
at com.pixsys.pixsysguard.firebasemessaging.onCreate(firebasemessaging.java:56)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4390)
at android.app.ActivityThread.access$2000(ActivityThread.java:274)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2123)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:233)
at android.app.ActivityThread.main(ActivityThread.java:8030)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)
Application error: java.lang.Exception: java.lang.NoSuchMethodError: No virtual method getToken()Lcom/google/android/gms/tasks/Task; in class Lcom/google/firebase/messaging/FirebaseMessaging; or its super classes (declaration of 'com.google.firebase.messaging.FirebaseMessaging' appears in base.apk!classes2.dex)
ERROR DISCONNECTING: java.lang.RuntimeException: Object should first be initialized (JavaObject).
** Service (firebasemessaging) Destroy **
 
Upvote 0

Pxs

Member
Licensed User
Replacing the internal firebase notifications lib from b4a 12 with the one found in v 11 (i know i probably shouldnt, just experimenting to see if i can find a workaround) solves this ^

The app no longer crashes, works fine but now it's no longer accepted by the store, as i get:

You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without 'android:exported' property set. This file can't be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#exported
 
Upvote 0
Top