Android Question NB6 + Target SDK 33

aaronk

Well-Known Member
Licensed User
Longtime User
Hi,

I am using NB6 to display a notification with my B4A app.

I am using the following code to display the notification:

B4X:
Dim n As NB6
Public smiley As Bitmap
smiley = LoadBitmapResize(File.DirAssets, "icon_24.png", 24dip, 24dip, False)
n.Initialize("default", Application.LabelName, "LOW").AutoCancel(True).SmallIcon(smiley)
n.Build("title here", "Content here", "tag1", Main).Notify(1)

The above code works while the target SDK is set to 32 or below.

When I target SDK version 33 it doesn't show any notification.

Am I doing something wrong or is it not support yet in SDK 33 ?


I am using:
B4A version: 11.80
NB6 Version: 1.02
Development device: Pixel 4a running Android 13
In B4A from then paths configuration screen, I have set the android.jar to C:\Android\platforms\android-33\android.jar
 

DonManfred

Expert
Licensed User
Longtime User
B4A version: 11.80
I suggest to use B4A 12 Beta. This version is able to compile against SDK 33 Edit: TargetSDK should be set to 31 for now.
Note that you need a new SDK and commandlinetools!
 
Last edited:
Upvote 0

aaronk

Well-Known Member
Licensed User
Longtime User
I suggest to use B4A 12 Beta. This version is able to compile against SDK 33
I think you might be right. I haven't tried it yet since it's only a beta and didn't want to publish a live app to Google Play if the IDE is beta in case it causes issues.

I have change the target SDK to 32 for now, and will try the beta in a few days once I publish the live version. (yes, I know I could run both IDE's at the same time)
 
Upvote 0

aaronk

Well-Known Member
Licensed User
Longtime User
You are confusing different terms. Start here: https://www.b4x.com/android/forum/threads/android-jar-targetsdkversion-minsdkversion.87610/#content

You should set the targetSdkVersion to 31 for now.
Sorry, I should have made it a little clearer. I had it set as 33 for the targetSdkVersion in the manifest.

I had it like the following in the manifest editor:

B4X:
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="33"/>

I changed it targetSdkVersion 32 and it seem to fix the issue. Would I have any issues if I have it as 32 or should I use 31 ?
 
Upvote 0

aaronk

Well-Known Member
Licensed User
Longtime User
If you want to set it to anything higher for some mysterious reason (there is no reason) then make sure to go over Google's documentation and learn about the behavioral changes.
ok, thanks
 
Upvote 0
Top