Other B4A v8.00 BETA has been released!

Erel

B4X founder
Staff member
Licensed User
Longtime User
I'm very happy to release B4A v8.00 BETA. This update includes many important improvements and makes it simpler to target the latest versions of Android.

android.png

(image source: android.com)

As explained in this tutorial, all apps will soon need to target sdk version 26 (Android 8). This is a new policy of Google and it has many consequences for app developers. Many of the improvements in B4A v8.0 help developers with this task.

Improvements:
  • The process of starting the app from the background was rewritten to comply with targetSdkVersion 26 requirements.
  • Push notifications and other features that cause apps to start from the background should be more reliable due to changes in the way services are started. A wake lock is automatically held when a receiver receives an intent. The wake lock is released when the service starts.
  • Automatic foreground mode: https://www.b4x.com/android/forum/threads/automatic-foreground-mode.90546/
  • Notification object rewritten to work with targetSdkVersion 26. In most cases you don't need to change anything. Notification.SetInfo or Notification.SetInfo2 should be the last calls before you show the notification.
  • Notification.SetInfo / SetInfo2 accept CharSequences so it can work with CSBuilder.
  • StartServiceAt / StartServiceAtExact rewritten to work with targetSdkVersion 26 and they are now more reliable.
  • Notification.Initialize2 - Allows to set the notification channel importance level.
  • Better support for AAR libraries: jni folders (native libraries) are handled properly, assets and resources from internal jars are added to the project.
  • Signing key size is explicitly set to avoid issues with newer versions of Java.
  • B4A Sdk Manager v3.22 - Bug fixes and support for Google based AVDs.
  • Screenshot tool modified to work with latest versions of Android SDK.
  • MediaPlayer.IsInitialzied method.
  • Manifest editor macros - Macros can be added to libraries or zip files. For example to set a light theme based on Android version:
    B4X:
    CreateResourceFromFile(Macro, Themes.LightTheme)
    Unless you are setting a custom theme then it is recommended to use either Themes.LightTheme or Themes.DarkTheme.

    Firebase push notifications:
    B4X:
    CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
    CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
    CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
    https://www.b4x.com/android/forum/threads/new-feature-manifest-macros.90398/#content

  • Custom class templates - Class templates can be added to libraries.
    For example if you add the XUI library to your project then you will have an option to add a custom view based on XUI:

    SS-2018-03-12_10.57.15.png


    Libraries can include multiple templates and any library can include templates.
  • #SignKeyAlias attribute - Allows overriding the default signing key alias.
  • Firebase and xCustomListView are internal libraries.
  • Libraries deprecation messages in the IDE:

    SS-2018-03-12_11.01.17.png


  • Fix for a very long standing issue where the activity code could have been executed while the activity is paused which leads to a hard to reproduce NullPointerException.
  • BADoclet (tool to generate libraries XML) v1.07 - adds support for custom class templates.
  • Other bug fixes and minor improvements.

Backward compatibility notes
  • Notification.SetInfo or SetInfo2 should be the last calls before you use the notification. Note that standard notifications created with previous versions of B4A will not work at all on Android 8+ when targetSdkVersion is 26+.
  • Adding a service, other than the Starter service, will add the WAKE_LOCK permission. This is a non-dangerous permission.
    As mentioned above a wake lock is held automatically when a service is started from the background and until Service_Start is called. You can remove this permission with:
    B4X:
    RemovePermission(android.permission.WAKE_LOCK)
    Everything will still work, however the service might fail to start from the background in some cases.

Developers eligible for a free upgrade should receive an email with upgrade instructions.
I remind you that this is a beta version.
 
Last edited:

martin24

Member
Licensed User
Thanks for the update.

The new StartServiceAtExact and Notification features work perfectly with targetSdkVersion 26 in my first tests.

Firebase and xCustomListView are internal libraries.

I just removed these libraries from my libs folder and realized that InAppBilling3.jar is available in the B4a\libraries folder and my own lib folder. Is InAppBilling3 also an internal library?
 
Upvote 0

martin24

Member
Licensed User
Hmm, I asked because I don't have the InAppBilling3.xml file in the b4a\Libraries folder. So removing that library from my own libs folder causes a missing library error...

Could you please check if you have that xml in your b4a\Libraries folder?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
i do not have a XML in the internal library folder. But the file InAppBilling3.jar has an date from today (i today installed b4a 8 beta) so i guess it is an internal library.
Maybe the XML is missing in the Setup? Try to install B4A in a NEW Folder. Just to check the content of internal-libs folder...
 
Upvote 0

shb777

Active Member
Licensed User
Longtime User
Will this allow us to use the new dji library. previously you said

"The new SDK is encrypted and needs to be loaded in a very specific way. I will upload the new library however you will need to wait for B4A v8.0 to be released as it required a few improvements to the APK building process."

Also where can I download the new library?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
is #SignKeyAlias Private Sign Keys?

can we set/change private sign key automatically?
There are three relevant attributes that allow you to change the signing key based on the build configuration:
#SignKeyFile, #SignKeyPassword and #SignKeyAlias

Will this allow us to use the new dji library
Yes. It wasn't uploaded yet.
 
Upvote 0
D

Deleted member 103

Guest
Bug fixed! ;)

in B4a 7.80: Public storage As FilrebaseStorage
in B4a 8.00: Public storage As FirebaseStorage
 
Upvote 0

rscheel

Well-Known Member
Licensed User
Longtime User
It would be good in the case of services if the line "Service.StopAutomaticForeground" is missing, send a notification, this for the oldest projects, so do not forget to add this line.
 
Upvote 0

Num3

Active Member
Licensed User
Longtime User
This new update sounds wonderful, good job!

Developers eligible for a free upgrade should receive an email with upgrade instructions.

I have checked my email (including spam) and I have not received any info yet, AFAIK i am eligible still, correct?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I have checked my email (including spam) and I have not received any info yet, AFAIK i am eligible still, correct?
Please contact [email protected]. If you don't receive an answer in less than 24 hours then contact me with a private message as it is likely that your mail server blocks our mails.
 
Upvote 0
Top