Erel B4X founder Staff member Licensed User Longtime User Mar 20, 2018 #1 I'm very happy to release B4A v8.0. 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. #AdditionalJar with ReferenceOnly - Allows referencing jars that are only used as a reference during compilation. This is required for more complex libraries such as DJI library. Signing key size is explicitly set to avoid issues with newer versions of Java. B4A Sdk Manager v3.25 - 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, xCustomListView and KeyValueStore (2) 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. Other developers will receive a renewal offer.
I'm very happy to release B4A v8.0. 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. #AdditionalJar with ReferenceOnly - Allows referencing jars that are only used as a reference during compilation. This is required for more complex libraries such as DJI library. Signing key size is explicitly set to avoid issues with newer versions of Java. B4A Sdk Manager v3.25 - 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, xCustomListView and KeyValueStore (2) 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. Other developers will receive a renewal offer.
warwound Expert Licensed User Longtime User Mar 20, 2018 #2 Erel said: BADoclet (tool to generate libraries XML) v1.07 - adds support for custom class templates. Click to expand... Where can the latest version of BADoclet be downloaded from? A forum search leads me to Creating libraries for Basic4android where BADoclet is attached and has been downloaded 3263 times. Presumably that is an old version? Upvote 0
Erel said: BADoclet (tool to generate libraries XML) v1.07 - adds support for custom class templates. Click to expand... Where can the latest version of BADoclet be downloaded from? A forum search leads me to Creating libraries for Basic4android where BADoclet is attached and has been downloaded 3263 times. Presumably that is an old version?
Erel B4X founder Staff member Licensed User Longtime User Mar 20, 2018 #3 It is available inside SLC zip: https://www.b4x.com/android/forum/t...uild-libraries-without-eclipse.29918/#content Upvote 0
It is available inside SLC zip: https://www.b4x.com/android/forum/t...uild-libraries-without-eclipse.29918/#content
J Juzer Hussain Active Member Licensed User Longtime User Mar 20, 2018 #4 Hi Erel, I use B4A Ver. 5.0 I want to upgrade to 8.0 Standard version. This version if i install afresh will it work or it requires previous versions to be already installed. Shall i directly buy from the store or i need to do something more. Juzer Upvote 0
Hi Erel, I use B4A Ver. 5.0 I want to upgrade to 8.0 Standard version. This version if i install afresh will it work or it requires previous versions to be already installed. Shall i directly buy from the store or i need to do something more. Juzer
Erel B4X founder Staff member Licensed User Longtime User Mar 20, 2018 #5 It doesn't require any previous version. Your existing projects will work. You should use new B4A Sdk Manager to download the latest version of Android SDK. Juzer Hussain said: Shall i directly buy from the store or i need to do something more. Click to expand... Wait for the mail with the renewal option. If you haven't received it in two hours then contact [email protected]. Upvote 0
It doesn't require any previous version. Your existing projects will work. You should use new B4A Sdk Manager to download the latest version of Android SDK. Juzer Hussain said: Shall i directly buy from the store or i need to do something more. Click to expand... Wait for the mail with the renewal option. If you haven't received it in two hours then contact [email protected].
J Juzer Hussain Active Member Licensed User Longtime User Mar 20, 2018 #6 I received mail with option to "renew liscence". Shall I use this link for B4A Standard Version 8.0 Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Mar 20, 2018 #7 Juzer Hussain said: I received mail with option to "renew liscence". Shall I use this link for B4A Standard Version 8.0 Click to expand... You can choose to upgrade to whichever version you like. Upvote 0
Juzer Hussain said: I received mail with option to "renew liscence". Shall I use this link for B4A Standard Version 8.0 Click to expand... You can choose to upgrade to whichever version you like.
S sorex Expert Licensed User Longtime User Mar 20, 2018 #8 Erel said: The process of starting the app from the background was rewritten to comply with targetSdkVersion 26 requirements. Click to expand... does this mean that we need to compile everything with this version to suit their new rules? Upvote 0
Erel said: The process of starting the app from the background was rewritten to comply with targetSdkVersion 26 requirements. Click to expand... does this mean that we need to compile everything with this version to suit their new rules?
Erel B4X founder Staff member Licensed User Longtime User Mar 20, 2018 #9 sorex said: does this mean that we need to compile everything with this version to suit their new rules? Click to expand... It is a bit more complicated. See this tutorial: https://www.b4x.com/android/forum/threads/android-jar-targetsdkversion-minsdkversion.87610/#content Upvote 0
sorex said: does this mean that we need to compile everything with this version to suit their new rules? Click to expand... It is a bit more complicated. See this tutorial: https://www.b4x.com/android/forum/threads/android-jar-targetsdkversion-minsdkversion.87610/#content
S sorex Expert Licensed User Longtime User Mar 20, 2018 #10 Thanks, I'll go through it later today. Upvote 0
pesquera Active Member Licensed User Longtime User Mar 20, 2018 #11 Erel said: Note that standard notifications created with previous versions of B4A will not work at all on Android 8+ when targetSdkVersion is 26+ Click to expand... What does "standard notifications" mean? Should we take care about something else of SetInfo/SetInfo2? Upvote 0
Erel said: Note that standard notifications created with previous versions of B4A will not work at all on Android 8+ when targetSdkVersion is 26+ Click to expand... What does "standard notifications" mean? Should we take care about something else of SetInfo/SetInfo2?
Erel B4X founder Staff member Licensed User Longtime User Mar 21, 2018 #12 pesquera said: What does "standard notifications" mean? Click to expand... Any notification created with Notification.Notify. pesquera said: Should we take care about something else of SetInfo/SetInfo2? Click to expand... In most cases no. See this tutorial: https://www.b4x.com/android/forum/threads/automatic-foreground-mode.90546/ Upvote 0
pesquera said: What does "standard notifications" mean? Click to expand... Any notification created with Notification.Notify. pesquera said: Should we take care about something else of SetInfo/SetInfo2? Click to expand... In most cases no. See this tutorial: https://www.b4x.com/android/forum/threads/automatic-foreground-mode.90546/
corwin42 Expert Licensed User Longtime User Mar 21, 2018 #13 I guess the "custom class templates" feature works only with classes and not for Activity modules? For the AppCompat library it would be great to have this feature for Activites, too so the template could automatically add the "#Extends: android.support.v7.app.AppCompatActivity" line. I also would like to add some comments with the Manifest additions for the theme. Or the Preference library could provide a template for preference Activites. Even for services this would be nice. I think of something like homescreen widget templates. Upvote 0
I guess the "custom class templates" feature works only with classes and not for Activity modules? For the AppCompat library it would be great to have this feature for Activites, too so the template could automatically add the "#Extends: android.support.v7.app.AppCompatActivity" line. I also would like to add some comments with the Manifest additions for the theme. Or the Preference library could provide a template for preference Activites. Even for services this would be nice. I think of something like homescreen widget templates.
Erel B4X founder Staff member Licensed User Longtime User Mar 21, 2018 #14 corwin42 said: I guess the "custom class templates" feature works only with classes and not for Activity modules? Click to expand... That's true. Upvote 0
corwin42 said: I guess the "custom class templates" feature works only with classes and not for Activity modules? Click to expand... That's true.
JCO Active Member Licensed User Longtime User Mar 22, 2018 #15 This seems to be a big change. Would you advice to install this version on a different folder keeping the previous version in case there are problems with existing projects or is that not necessary? Upvote 0
This seems to be a big change. Would you advice to install this version on a different folder keeping the previous version in case there are problems with existing projects or is that not necessary?
Erel B4X founder Staff member Licensed User Longtime User Mar 22, 2018 #16 JCO said: Would you advice to install this version on a different folder keeping the previous version in case there are problems with existing projects or is that not necessary? Click to expand... I don't think that it is needed. You can always reinstall v7.80 if you encounter any issue. Older versions of B4A are less relevant now as they will not work properly with Android 8+ once the targetSdkVersion is set to 26+. Upvote 0
JCO said: Would you advice to install this version on a different folder keeping the previous version in case there are problems with existing projects or is that not necessary? Click to expand... I don't think that it is needed. You can always reinstall v7.80 if you encounter any issue. Older versions of B4A are less relevant now as they will not work properly with Android 8+ once the targetSdkVersion is set to 26+.
pesquera Active Member Licensed User Longtime User Mar 22, 2018 #17 Does NotifiticationListener Libary run fine with Android 8.1.0? https://www.b4x.com/android/forum/t...er-library-notificationlistenerservice.35630/ I compiled the app with B4A 8.0 and change manifest with android:targetSdkVersion="27" Now, the notification messages are not catched any more The same app installed on a device with Android 6.0.1 is catching Ok Where can I take a look into my code? Thanks EDIT: Also tried with the example from the Library, there aren't logs on Sub Listener_NotificationPosted FYI: In the example, should fix Notification (n.SetInfo) Is the only device that I have with Android 8+ Last edited: Mar 22, 2018 Upvote 0
Does NotifiticationListener Libary run fine with Android 8.1.0? https://www.b4x.com/android/forum/t...er-library-notificationlistenerservice.35630/ I compiled the app with B4A 8.0 and change manifest with android:targetSdkVersion="27" Now, the notification messages are not catched any more The same app installed on a device with Android 6.0.1 is catching Ok Where can I take a look into my code? Thanks EDIT: Also tried with the example from the Library, there aren't logs on Sub Listener_NotificationPosted FYI: In the example, should fix Notification (n.SetInfo) Is the only device that I have with Android 8+
Erel B4X founder Staff member Licensed User Longtime User Mar 23, 2018 #18 Please start a new thread for this. It should work. Upvote 0
M Markos Well-Known Member Licensed User Longtime User Mar 24, 2018 #19 I have upgraded to latest Java and Android etc. I will update the manifest to reflect the latest targetSdkVersion / minSdkVersion. If my project compiles without errors can I assume all is well or do I have to check how my Aoo behaves to know all is well etc? Upvote 0
I have upgraded to latest Java and Android etc. I will update the manifest to reflect the latest targetSdkVersion / minSdkVersion. If my project compiles without errors can I assume all is well or do I have to check how my Aoo behaves to know all is well etc?
Nimbus4 Member Licensed User Longtime User Mar 24, 2018 #20 Erel said: I don't think that it is needed. You can always reinstall v7.80 if you encounter any issue. Older versions of B4A are less relevant now as they will not work properly with Android 8+ once the targetSdkVersion is set to 26+. Click to expand... Question : If I use B4A v7.8 and DO NOT set the target version to 26+, will apps work on Android 8+? Question : How do I go back to B4A v7.8? Question : Can apps made with B4A v7.8 be published in the PlayStore? Question : Can I have a hug? lol Upvote 0
Erel said: I don't think that it is needed. You can always reinstall v7.80 if you encounter any issue. Older versions of B4A are less relevant now as they will not work properly with Android 8+ once the targetSdkVersion is set to 26+. Click to expand... Question : If I use B4A v7.8 and DO NOT set the target version to 26+, will apps work on Android 8+? Question : How do I go back to B4A v7.8? Question : Can apps made with B4A v7.8 be published in the PlayStore? Question : Can I have a hug? lol