Other B4A v4.00 has been released!

Erel

B4X founder
Staff member
Licensed User
Longtime User
SS-2014-12-11_10.53.32.png

I'm happy to release B4A v4.00.
Starting from this version Basic4android is named B4A.

New features and improvements:
  • Rapid debugger memory handling was rewritten to provide better performance and to avoid memory leaks.
  • 5 new View methods: SetLayoutAnimated, SetVisibleAnimated, SetColorAnimated, SetTextColorAnimated and SetTextSizeAnimated. With these methods it is very simple to add nice animations effects to your app.
    See this thread for more information: Simple animations in B4A v4.00
  • Designer animations - Layouts added with the designer are (optionally) animated.
  • Support for constants: Dim Const x As Int = 2.
    Constant variables are assigned when declared. Their value cannot be later changed (enforced by the compiler).
  • Screen video capture - Requires Android 4.4+. Very useful for demonstrations.
  • Activity_ActionBarHomeClick event - Handles the action bar icon click event. This event replaces the event from StdActionBar library which doesn't work on Android 5 devices.
  • Better handling of the internal message queue on Android 5 devices.
  • Visual designer supports custom fonts.
  • Visual designer supports adding borders to views that use ColorDrawable. Borders can also be added with ColorDrawable.Initialize2.

    upload_2014-12-4_11-56-16-png.29855


  • New Application object with the following properties:
    • LabelName
    • VersionName
    • VersionCode
    • PackageName
  • Activity.DisableAccessibility - Workaround for this Android bug: https://code.google.com/p/android/issues/detail?id=55933
  • IsDevTool keyword - Useful when reusing code with B4J / B4i.
  • Designer - Select all files option.
  • Designer - Double click on view's name to add to the script.
  • Libraries list - Checked libraries are listed at the top of the list.
  • Duplicate line shortcut - Ctrl + D.
  • AutoComplete shortcut - Ctrl + \ (same as Ctrl + Space).
  • Hide other modules option when right clicking on the module header.
  • Clear logs when program starts option.
  • 3 new warnings related to the manifest editor:
    • No android:targetSdkVersion.
    • targetSdkVersion is lower than 20 and no theme is explicitly set.
    • AndroidManifest.xml is read only
  • New logo.
  • CurrentStatement and breakpoints colors are configurable in the xml file.
  • B4A-Bridge was updated with several fixes and the PHONE_READ_STATE permission was removed (it was used in the past to show the device id).
  • Bug fixes.

The minimum Android version is now version 2.0.
Note that the designer animations are enabled by default. To disable this feature you need to open the layout file with the designer and set the Animation Duration property to 0.

All customers who are eligible for a free upgrade will receive an email with the download link. Other customers will receive an email with a discount offer.
Please allow up to 24 hours for the mails to arrive.
If you didn't receive an email after 24 hours then you should contact [email protected].

:)
 

wonder

Expert
Licensed User
Longtime User
@wonder

Sure you can install B4A V4.0 in another folder and use several versions without any problem.
I always save a new version in a new folder and keep some 'older' versions. Don't forget to copy the license file to the new folder.

Thanks for the answer Klaus!! I will follow your advice! :)
 
Upvote 0

tchart

Well-Known Member
Licensed User
Longtime User
Erel, since I updated to version 4 my libraries no longer compile with SLC. I get the attached error.
 

Attachments

  • 2014-12-12 19_22_04-C__WINDOWS_system32_cmd.exe.png
    2014-12-12 19_22_04-C__WINDOWS_system32_cmd.exe.png
    4.9 KB · Views: 316
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Does a CONST take less memory then a Global? Should we worry about changing them? Will this gain us anything?
Currently there is no memory advantage for consts. However it may change in the future.

The two main advantages of const are:
- It is immediately clear for anyone including your self who goes over the code that the value of this variable will never change (thus reducing the complexity).
- The compiler protects you from modifying the variable value by mistake.
 
Upvote 0

nw11

Member
Licensed User
Longtime User
After Upgrading to B4A 4.00, SDK 5.0.1 and all new SDK Manager Packagers available, when i launch my App i receive this error :

java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4323000 but found 6587000. 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" />

this is the B4A error log :

** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **

BroadcastReceiver has been initialized.
** Activity (main) Create, isFirst = true **

java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4323000 but found 6587000. 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" />

at com.google.android.gms.common.GooglePlayServicesUtil.t(Unknown Source)
at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
at com.google.android.gms.internal.y.a(Unknown Source)
at com.google.android.gms.internal.ak.an(Unknown Source)
at com.google.android.gms.internal.ak.a(Unknown Source)
at com.google.android.gms.ads.AdView.loadAd(Unknown Source)
at anywheresoftware.b4a.admobwrapper.AdViewWrapper.LoadAd(AdViewWrapper.java:118)
at TraduzApp.it.main._activity_create(main.java:377)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
at TraduzApp.it.main.afterFirstLayout(main.java:98)
at TraduzApp.it.main.access$100(main.java:16)
at TraduzApp.it.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5356)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at dalvik.system.NativeStart.main(Native Method)
java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4323000 but found 6587000. 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" />

this is my manifest file :

AddManifestText(
<uses-sdk android:minSdkVersion="9"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"
android:windowSoftInputMode="adjustPan"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")

'AdMob
AddApplicationText(<meta-data android:name="com.google.android.gms.version" android:value="@Integer/google_play_services_version"/><activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>)
'End of AdMob

this is my additionalRes declaration line

#AdditionalRes: C:\Program Files\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms


the Admob Lib version is 2.00


nb: i have noted that the file : google-play-services.jar in

C:\Program Files\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\libs

was updated to new version of 11.12.2014

Please let me know if i have to change something in my code that was perfectly working before the updates.

thank you in advance

F
 
Upvote 0

Stefan Bosch

New Member
Licensed User
Longtime User
B4A is a great tool to develop apps (I'm an old fashioned guy and still call them "programs" ;)) for Android devices.
I used many versions of Basic in the last 30+ years, VB.net beeing the most recent and B4A got me started with my first Android-apps right away.

I like using B4A Bridge Plus. Does it still work with B4A 4.0? Or do you recomend using the "normal" bridge?
 
Upvote 0
Top