[Solution] Call Log or SMS permissions

sms

#1

Hi,

I have find the solution to remove Call Log or SMS permissions and use to replace “Activity Starter”.

Here solution:

SMS

snip_20190208182202


CALL

snip_20190208182220

I have try to my application and it’s work, now i can publish the update to playstore.

source: thanks to authors :wink:
https://groups.google.com/forum/#!msg/mitappinventortest/0WPQzWL4gYI/xjFWI6n1CgAJ
https://groups.google.com/forum/#!category-topic/mitappinventortest/acaTZTA0jcM


App removed due to use of SMS permissions
Permissions - PlayStore Remove my App
Thunkable Classic Apps + Play store permissions
#2

App Inventor has released a solution for this problem with their latest release. See below.

New functionality

We implemented conditional permissions for Texting and PhoneCall components so apps built with MIT App Inventor will be compliant with new Google Play Store policies. By default, apps using the Texting and PhoneCall components will now launch the device’s default texting and dialer apps. Most app inventors will be able to continue using the existing blocks for their apps.

If you want to build apps that respond to SMS or phone calls, or directly initiate a text or call, you may do so. To send a message or start a call, use the SendMessageDirect and MakePhoneCallDirect blocks, respectively. Receiving texts and calls continues to behave as it did. However, apps built with these behaviors will trigger additional review when being submitted to Google Play.

NOTE: The MIT AI2 Companion distributed through the Google Play Store cannot use the SendMessageDirect or MakePhoneCallDirect blocks. Attempting to use them will result in a permission error. This is due to restrictions imposed by Google (see paragraph above about changes in Google Policies). If you download the Companion directly from the MIT App Inventor system (via the “Help->Companion Information” Menu option) you will get a version that does work with the “Direct” blocks.

image

It should be very easy to implement this in Thunkable.


#3

This update should be merged into Classic in the coming weeks, thanks Peter!


#4

The tips what i have find in the forum Appinventor work on Thunkable.

On my side google deleted 2 applications (1 with appinventor and 1 with thunkable) a few days ago because it had the block sms, so I had to react quickly to find a solution, I could not wait until thunkable so an update in the coming weeks because in waiting for my application is no longer in the google store and thanks to the appinventor trick it worked, I was able to work around the problem.


#5

Hi @Julianiho

Is there any way to send the SMS message automatically? The SendMessage block allowed to do it, but using activity starter requires user to push the button on the SMS app to send the message. My app needs no user interaction to as designed.

Thanks.


#6

Hi,

Sorry but with activity starter i don’t success to send sms automaticaly.


#7

you might want to use a service like Twilio


I once prepared an example project for Twilio, in case you are interested in this, please contact me by PM
Taifun


#8

Thanks. I’ll take a look to at it.


#9

Apparently Thunkable Live and apk apps don´t work equally. Send DirectMessage can´t be used on Thunkable live due to permission requirements, but works fine when using the app on my cellphone. However, Make PhoneCallDirect doesn´t work either on Thunkable Live or my cellphone, it gives the “Can only use lower 16 bits for requestCode” error.

Also, I tried making automatic calls using this activity starter blocks scheme:

image

This works great when testing using Thunkable live, but unexpectably it dosen´t work at all and makes the app chash when I try using it on my mobile phone; I got this error:

image

To sum up, I can´t make a phone call with any blocks.

Any suggestions to solve this?

Thanks.


Question about new SMS and Call blocks
#10

you might want to try the AskForPermission block from the Screen drawer and first ask for the permission android.permission.CALL_PHONE before using the activity starter

Taifun


#11

Thanks for your suggestion, Taifun. Unfortunately, I keep getting errors; now I get this one:

image

Which I don´t understand why it happens, since the permissions for my app are enabled (see prueba2 is enabled):


#12

the error message looks strange…
The permission permission android.permission.CALL_PHONE …
what about providing a screenshot of your relevant blocks?
Taifun


#13

Taifun,

For calling:

image

For messaging:


#14

What is strange is that this solution does work on Thunkable live (for calling) but it doesn’t when I download the app and install it on my mobile phone.


#15

if you want to use the phone number picker component, then you first have to open the phone number picker and after the phone number has been picked continue with your blocks in the AfterPicking event
see also the documentation http://ai2.appinventor.mit.edu/reference/components/social.html#PhoneNumberPicker

Taifun


#16

Yes, the AfterPicking event was already included in the workspace:


I thinkt the action call phone_number_picker.open shouldn’t be the cause of the error, since it happens even if the variable global contacto is already set when the procedure llamar_contacto is executed (that implies the if block wouldn’t take place)


split this topic #17

A post was split to a new topic: Question about Taifun Texting Component