Android Code Snippet [B4X] CameraExClass- QrCode/Barcode Reader fix new SDK

Hi everyone,
today I updated all the packages with the SDK Manager.
After that, the app was crashing on a line about the QrCode reader made using the CameraEx class (there is a tutorial in the forum).
Reading the logs I found out that now you must have the following line in the manifest to get it working again.

B4X:
AddApplicationText(<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>)

Maybe this can be useful to someone in the future.
 
Hi Mike,
Would you pls provide the link for the original post? is there an example project?
 
today I updated all the packages with the SDK Manager.
Maybe this can be useful to someone in the future.
1 - Thanks. I have the same problem (when update the SDK) and was solved with your tip.
The error is:
B4X:
java.lang.reflect.InvocationTargetException
Caused by: com.google.android.gms.common.GooglePlayServicesMissingManifestValueException: A required meta-data tag in your app's AndroidManifest.xml does not exist.  You must have the following declaration within the <application> element:     <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />

2 - The error don't happen if uses the SDK from Erel.
 
Hi everyone,
today I updated all the packages with the SDK Manager.
After that, the app was crashing on a line about the QrCode reader made using the CameraEx class (there is a tutorial in the forum).
Reading the logs I found out that now you must have the following line in the manifest to get it working again.

B4X:
AddApplicationText(<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>)

Maybe this can be useful to someone in the future.
correct use in manifest:
B4X:
'************ Google Play Services Base ************

CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)

'************ Service Camera Barcode ************

AddApplicationText(
    <meta-data
        android:name="com.google.android.gms.vision.DEPENDENCIES"
        android:value="barcode,,face" />
)

See:
 
Hi everyone,
today I updated all the packages with the SDK Manager.
After that, the app was crashing on a line about the QrCode reader made using the CameraEx class (there is a tutorial in the forum).
Reading the logs I found out that now you must have the following line in the manifest to get it working again.

B4X:
AddApplicationText(<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>)

Maybe this can be useful to someone in the future.
Thank you!
 
Back
Top