Android Question Version safe APK installation and Notification Manifest problem

ykucuk

Well-Known Member
Licensed User
Longtime User
Hello,

I'm working with Erel's Version safe APK installation tutorial.
https://www.b4x.com/android/forum/threads/version-safe-apk-installation.87667/
it works well but it crashes when i add firebase integration codes into manifest.

B4X:
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
CreateResourceFromFile(Macro, FirebaseAnalytics.FirebaseAnalytics)
CreateResourceFromFile(Macro, FirebaseAuth.FirebaseAuth)

When i add above codes it crash before app start. No Log.

Can you help me ? What's my fault.

My Manifest

B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="26"/>
<supports-screens android:largeScreens="true"
 android:normalScreens="true"
 android:smallScreens="true"
 android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
AddServiceText(NotificationService,
 <intent-filter>
<action android:name="android.service.notification.NotificationListenerService" />
</intent-filter>
)
 SetServiceAttribute(NotificationService, android:permission, "android.permission.BIND_NOTIFICATION_LISTENER_SERVICE")
AddActivityText(Main,
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
)
AddManifestText(<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
)
AddApplicationText(
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="$PACKAGE$.provider"
android:exported="false"
android:grantUriPermissions="true">
  <meta-data
  android:name="android.support.FILE_PROVIDER_PATHS"
  android:resource="@xml/provider_paths"/>
  </provider>
)
CreateResource(xml, provider_paths,
   <files-path name="name" path="shared" />
)
AddPermission(android.permission.REQUEST_INSTALL_PACKAGES)
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
CreateResourceFromFile(Macro, FirebaseAnalytics.FirebaseAnalytics)
CreateResourceFromFile(Macro, FirebaseAuth.FirebaseAuth)

B4A version : 9.3
Device : Samsung Galaxy Tab A
Android:9
 
Top