Erel B4X founder Staff member Licensed User Longtime User Mar 12, 2018 #1 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. (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: Code: Copy 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: Code: Copy 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: 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: 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: Code: Copy 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: Mar 12, 2018
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. (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: Code: Copy 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: Code: Copy 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: 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: 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: Code: Copy 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.
R RonSens Member Licensed User Longtime User Mar 12, 2018 #4 Great Erel, thank you! This is really a fantastic tool and we are using it a lot right now for all different kind of apps. Upvote 0
Great Erel, thank you! This is really a fantastic tool and we are using it a lot right now for all different kind of apps.
Cableguy Expert Licensed User Longtime User Mar 12, 2018 #5 Would it be too difficult to allow for a custom template? (Personal template). Upvote 0
tufanv Expert Licensed User Longtime User Mar 12, 2018 #7 Thanks ! It will be very easy to switch to new requirements Upvote 0
Multiverse app Active Member Licensed User Longtime User Mar 12, 2018 #8 Sooo much excited to try it! Upvote 0
DonManfred Expert Licensed User Longtime User Mar 12, 2018 #9 Multiverse app said: Sooo much excited to try it! Click to expand... Agree. Especially i want to try the new Drone Lib and adapt my DroneUI-Lib Upvote 0
Multiverse app said: Sooo much excited to try it! Click to expand... Agree. Especially i want to try the new Drone Lib and adapt my DroneUI-Lib
Erel B4X founder Staff member Licensed User Longtime User Mar 12, 2018 #10 Cableguy said: Would it be too difficult to allow for a custom template? (Personal template). Click to expand... You can create a "stub" library that holds your templates. Start a new thread and I'll explain it. It is quite simple. Upvote 0
Cableguy said: Would it be too difficult to allow for a custom template? (Personal template). Click to expand... You can create a "stub" library that holds your templates. Start a new thread and I'll explain it. It is quite simple.
Addo Well-Known Member Licensed User Longtime User Mar 12, 2018 #11 Thank you Erel waiting for upgrade email I am excited to experience all of this improvements Edit I just received the email thank you alot will test it soon Upvote 0
Thank you Erel waiting for upgrade email I am excited to experience all of this improvements Edit I just received the email thank you alot will test it soon
Star-Dust Expert Licensed User Longtime User Mar 12, 2018 #12 I have already tried and it seems like a Interesting upgrade. Will there be tutorial for the news? For example, Custom class templates Upvote 0
I have already tried and it seems like a Interesting upgrade. Will there be tutorial for the news? For example, Custom class templates
Erel B4X founder Staff member Licensed User Longtime User Mar 12, 2018 #13 Star-Dust said: Will there be tutorial for the news? Click to expand... Yes. Upvote 0
Germán Arduino Member Licensed User Mar 12, 2018 #14 Thanks for the new version! I should install it in a different directory, to maintain my current "stable" version? Thanks. Upvote 0
Thanks for the new version! I should install it in a different directory, to maintain my current "stable" version? Thanks.
lemonisdead Well-Known Member Licensed User Longtime User Mar 12, 2018 #15 Germán Arduino said: I should install it in a different directory, to maintain my current "stable" version? Click to expand... At least for the beta ; just change the destination directory. When the stable version will be published you'd choose or not to put it in your main directory. Upvote 0
Germán Arduino said: I should install it in a different directory, to maintain my current "stable" version? Click to expand... At least for the beta ; just change the destination directory. When the stable version will be published you'd choose or not to put it in your main directory.
DonManfred Expert Licensed User Longtime User Mar 12, 2018 #16 As it is a BETA Version i would install it in another path. Upvote 0
Germán Arduino Member Licensed User Mar 12, 2018 #17 Thanks @lemonisdead and @DonManfred. In the future, when 8.0 will get stable the upgrade process is simply install over my current directory? Or I should uninstall the current version first? Thanks. Upvote 0
Thanks @lemonisdead and @DonManfred. In the future, when 8.0 will get stable the upgrade process is simply install over my current directory? Or I should uninstall the current version first? Thanks.
DonManfred Expert Licensed User Longtime User Mar 12, 2018 #18 Germán Arduino said: is simply install over my current directory? Click to expand... yes. I always do it this way. Upvote 0
Germán Arduino said: is simply install over my current directory? Click to expand... yes. I always do it this way.
lemonisdead Well-Known Member Licensed User Longtime User Mar 12, 2018 #19 Germán Arduino said: Or I should uninstall the current version first? Click to expand... Just install the stable over the previous stable (but it is not necessary and you can keep both if you wish ; that's your choice). Only the shortcut in Windows start menu is updated. Upvote 0
Germán Arduino said: Or I should uninstall the current version first? Click to expand... Just install the stable over the previous stable (but it is not necessary and you can keep both if you wish ; that's your choice). Only the shortcut in Windows start menu is updated.