Android Question SMS Intercept and decode fail (manifest SdkVersion Number)

Diego Marcelo Croatto

Member
Licensed User
Hi... I'm was write a time ago an application to intercomunicate a phone with a device and the program work ok with this line in the manifest:

<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="19"/>

in a new version of B4a (8.50) the I cant compile anymore and the compiler tell me change the number 19 to other upper

with this line... the SMS intercept don't work anymore:

<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="24"/>

I'm using the Phone library and dis functions --> StartService(smsmodule)

Any sugerence?.... thank's a lot
 

hatzisn

Well-Known Member
Licensed User
Longtime User
Google has restricted access to SMS unless you set your application as the default sms app.
 
Upvote 0

janderkan

Well-Known Member
Licensed User
Longtime User
You have to make your customers change their default SMS app to your app.
I think that to do that your sms app should be better than the default.

Bottom line, SMS is dead.
 
Upvote 0

hatzisn

Well-Known Member
Licensed User
Longtime User
There is also a workaround for SMS if you just want to receive the SMSs and not send. Use the NotificationListener and (at least for SAMSUNG) you can get the SMSs into your app as notifications. For SAMSUNG it is tested and it works. I wonder if it works for other phones also. Please do inform us about that. An other possible solution would be MQTT.
 
Last edited:
Upvote 0

Diego Marcelo Croatto

Member
Licensed User
I need send and receive data (control) from a remote board with an AiThinker A7 GPS/GSM/GPRS module all this controlled over a Android phone. The fastest solution was Sms but... when I finish the project in a 85% .... Google change the way :eek:... I must learn more options!.... Thank's to every coding people!
 
Upvote 0

pamoxi

Member
Licensed User
Longtime User
Google has restricted access to SMS unless you set your application as the default sms app.

You have to make your customers change their default SMS app to your app.
I think that to do that your sms app should be better than the default.

Bottom line, SMS is dead.


For example WhatsApp is not the default sms application, however it intercepts and reads sms messages. If the application uses an SMS library, the user must give permission to the application at the time of installation, when asked.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
in a new version of B4a (8.50) the I cant compile anymore and the compiler tell me change the number 19 to other upper
This is just a warning. It has nothing to do with being able to compile.

For example WhatsApp is not the default sms application, however it intercepts and reads sms messages. If the application uses an SMS library, the user must give permission to the application at the time of installation, when asked.
Are you sure that Whatsapp is doing anything with regular SMS messages?

You cannot ask for permissions during installation. Only at runtime: https://www.b4x.com/android/forum/threads/runtime-permissions-android-6-0-permissions.67689/
 
Upvote 0

kisoft

Well-Known Member
Licensed User
Longtime User
Maybe Whatsapp has received permission from Google to send and receive SMS messages. This is possible, but you must submit a request to google.
 
Upvote 0
Top