Vibrate

splatt

Active Member
Licensed User
Longtime User
Is it possible to get the vibrate functionality without having to include the Phone library?

Otherwise, when your app is installed, Android flags it as having access to your phone, which some people may find offputting,especially in a game.t
 

Cor

Active Member
Licensed User
Longtime User
Can the compiler be adjusted so that if only phone functions are added

e.g. sms, phone the READ_PHONE_STATE permisson is added.

a lot of functions are now added to the phone lib , and users can be scared to install apps with phone added.
 
Upvote 0

splatt

Active Member
Licensed User
Longtime User
You can modify AndroidManifest.xml and remove the READ_PHONE_STATE permission. It is near the bottom of the text. Afterward change the file to be read-only so it will not be overwritten. AndroidManifest is located under the Objects folder.
You will need to keep the VIBRATE permission.

Cheers Erel. Once again, thanks for the quick response. After having worked with Delphi for years, it is great to get a response from an official source within hours of posting a question, without having to pay a fortune for a support contract! Another great reason to buy B4A!
 
Upvote 0

hackhack

Active Member
Licensed User
Longtime User
No permission is added when you add a reference to the phone library.
For each object type there is a list of related permissions that this object requires. It appears in the documentation of each object.
Only when you declare an object of this type, the permissions get added.

Yet you still explained how he could add a file to remove a permission - so that permission wasn't need to begin with?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Each object type has a list of permissions that are added when it is used. The permissions are specific to an object not a library.

In the case of the Phone object there are some methods that do not require the two permissions: Basic4android - Phone

There are plans to redesign the Phone library to solve this issue.
 
Upvote 0
Top