Why is PhoneCall working on only one app?

Nope. In the first message I said the following : "Can somebody tell me why this application is working perfectly on my phone to give a direct phone call without having to ask for any permission, but when I use this PhoneCall component in my other application, I always have a 908 error about the call permission ? Thank you." "This application" referred to the Mac application which I linked to the message. I am sorry if this was not clear enough.

It was pointless - how would testing a Project that works help us to find the issue in a Project that didn't work? Very obviously you should have uploaded the Project that didn't work.

I though I was not the only one having such problems, and maybe somebody would answer about it. Also the second application is much complicated than the first one I did not wanted to confuse everybody with it. Sorry.

You do not ask for call permission in your DernierAppel app? The other app does.....

OK, you should not need the Permission 'Read Contacts', that is implied when you include the Contacts Picker. The 'READ_CALL_LOG' permission? I didn't know that existed. In fact I think Sunny has recently created an Extension to enable access to the call log.

Yes, I thanked him and tried this extension. It works well, but it only returns the call number of last missed call. It does not include a method to get the date of the last missed call. So for the moment I cannot use it as I want to let the user know what was the date of the call. That's what I answered to his message in my other discussion.

So you should know that your App is requesting access that it cannot achieve without the aid of an Extension. On the bright side, Sunny is a phenomenal producer of really useful extensions - definitely the right developer to find a solution.

2 Likes

Remove the CallLoger extension and it will work

bild

1 Like

Your Screen1 Initialize is making too many Calls to procedures and functions in succession. That's a recipe for App failure.

When you Call a Procedure/Function, App Inventor will invoke it immediately, without waiting for a previously called Procedure/Function. Not only that, during Screen Initialize the App is being built in memory (GUI and Code), so you could call something that isn't even 100% ready yet. Better to only include basic initialisation in Screen Initialize and execute the first Procedure via a Clock Timer - use the result Procedure type so that the next Procedure is Called on receipt of the result.

1 Like

So Boban's discovery probably means that the extension triggers the error message? - need to wait for Sunny to update the extension.

It seems to be dendritas extension

bild

Thank you, but the problem is that the purpose of the application is to get the last missed call number and the last missed call date from the Call Log.

Remove the extension temporarily first.

Also, it's possible for extensions working on similar things to have a resource 'clash', so let Sunny know of the other extensions you use.

1 Like

Isn't that the one that you rejected because it does not deliver everything required?

No, in fact it was the Sunny extension that only returns call number and not call date. I would like very much to remove the CallLog extension and use the one from Sunny, but for that I need that he adds the GetLastCallMissedDate function.

How about this one

3 Likes

OK, it may be really useful, but to integrate it in my application, I need to do some changes in my code. Thank you for your suggestion, I will try it ASAP.

1 Like

I created a simple test application with PhoneCall block and it works perfectly. Then I added the CallLog extension (co.com.dendritas.CallLoger.aix) and used it to read the CallLog. Now I have the 908 error message that also appeared in my DernierAppel application. So as Boban said, it seems that an interaction between the PhoneCall block and the extension is provocking this error message.

I finally found a way to hide the 908 error message in my application by adding a block "WhenPermissionDenied" and inside this block I just set a variable to empty string. So the message does not show up anymore (I suppose it is something like a Try/Catch operation), and the application works perfectly. I just had to go to "Settings" on my phone to add the missing permissions, "Contacts, "Call Log", "Storage" and "Phone". So I think I will stop here the modifications of the application (except if Sunny makes a new version of his CallLog extension which would allow me to make my code simpler). Thank you to all those who helped me. Regards.
DernierAppel_copie (1).aia (519.2 KB)

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.