Android Question SDK Target 26 and B4A V8 Problems

Status
Not open for further replies.

Marcos Alves

Well-Known Member
Licensed User
Longtime User
I recently migrated from v 7.3 to V8. After the migration, I had many problems in apps that was already running in an android 7.0 those where before targeted to SDK 21. These are the main problems:

- SMS Detect intent is not working anymore - I use SMS to validate the phone number, like WhatsApp - but the app is not raising the SMS received event anymore.
- Text Default color is black: my background is dark also and so the letters are not visible anymore
- I'm getting the follow error when trying to set a sound to notification (Using Notifications Builder from @barx ):

android.os.FileUriExposedException: file:///storage/emulated/0/notification/msgting.mpeg exposed beyond app through Notification.sound

Notice that the same app, without change, running at the same device, compiled with SDK 21 and B4A 7.3 run normally. This also runs normally on Android 6.X devices...
I think that as these problems are related with SDK 26 and B4A 8 at Android 7.x, @Erel could help and also check is there is anything that could be done while compiling in order to avoid these differences between versions...

Does anybody can help? I think that similar issues will affect all sometime.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

Marcos Alves

Well-Known Member
Licensed User
Longtime User
None of these issues is related to the B4A version.

You should understand the consequences of setting the targetSdkVersion to 26.

android.jar / targetSdkVersion / minSdkVersion


Not if they read the tutorials...
Hello @Erel ... yes, I read the tutorials and that's why I decided to migrate: is better to have a problem now than getting the problem "forced" with no time to fix. Looking the tutorials, I could see:

- Text Default color is black: my background is dark also and so the letters are not visible anymore - because THIS (24 - Default background color is white (https://www.b4x.com/android/forum/threads/version-safe-themes.87694/) ) - ok, I need to fix.... let's see what to do, but could be good if there was some workaround instead to have to navigate activity by activity and change objects colors... is there?

and after read, really couldn't see how to fix :

- SMS Detect intent is not working anymore : Will an app that isn't set as the SMS default app be able to receive intent SMS notifications??? I'm not sure and didn't found a reference to clarify this. If no, the validation technique with SMS needs to be switched to "user typing after receiving" - what's the fix?

- I'm getting the follow error when trying to set a sound to notification (Using Notifications Builder from @barx ): android.os.FileUriExposedException - I couldn't find the reason of this error in changes also...

If you can help me... please. If no, I'll research and post the results here - the solution will help many community members - at least will be consolidated and specific to this issues in migrating.
 
Last edited:
Upvote 0

Marcos Alves

Well-Known Member
Licensed User
Longtime User
Upvote 0

kisoft

Well-Known Member
Licensed User
Longtime User
- SMS Detect intent is not working anymore : Will an app that aren't set as the SMS default app be able to receive intent SMS notifications??? I'm not sure and didn't found a reference to clarify this. If no, the validation technique with SMS needs to be switched to "user typing after receiving" - what's the fix?

For me it works on sdk = 26. Do you get from the user runtime permissions?
You can paste the code of the intent filters?

.
 
Upvote 0

Marcos Alves

Well-Known Member
Licensed User
Longtime User
- SMS Detect intent is not working anymore : Will an app that aren't set as the SMS default app be able to receive intent SMS notifications??? I'm not sure and didn't found a reference to clarify this. If no, the validation technique with SMS needs to be switched to "user typing after receiving" - what's the fix?

For me it works on sdk = 26. Do you get from the user runtime permissions?
You can paste the code of the intent filters?

.
Hello,

It's needed to pay attention to the interaction between Target version AND Android Version: See:
- If SDK >= 25 AND Android Version (device or AVD) >= 7 , then doesn't work.
- If Android Version < 7, target doesn't matter. Test with Android 7 or greater and SDK 26. I used a Galaxy S7 with Target 26 and Android 7 and SMS isn't detected anymore.

This is an important alert - in our situation, SMS intent is an important feature in the app flow - the SMS detect allows the customer to register in app. If this doesn't occurs, the customer isn't able to use the app!!! So, I'm analyzing the possibility to change to manual code typing - a signal that this will be mandatory is that famous apps like WhatsApp already have manual code typing option...
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
@Marcos Alves You should start a new thread for each question.

You have made several threads now with issues that you think are related to B4A v8. All the issues you encountered are related to targetSdkVersion = 26 and Android 8.
None of them are related to B4A v8. Your posts will cause other developers to mistakenly keep using older versions of B4A (which will not work properly once you set targetSdkVersion to 26).
I will not help you if you keep making such claims.
Also please avoid adding @Erel in all your posts. All questions should be open to all members.
 
Upvote 0
Status
Not open for further replies.
Top