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
 

janderkan

Active Member
Licensed 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.
 

hatzisn

Well-Known Member
Licensed 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:

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!
 

pamoxi

Member
Licensed 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.
 

Erel

Administrator
Staff member
Licensed 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/
 

kisoft

Well-Known Member
Licensed 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.
 
Top