K Kim Rowden Member Licensed User Longtime User Aug 14, 2011 #1 I'm using the sample code as provided in the doc to see how notifications work. It seems that Vibrate is set to TRUE by default - and when I run the sample code I get an error on the n.notify(1) statement: java.lang.SecurityException: Requires VIBRATE permission Click to expand... Where do I set / obtain this permission? (as might be expected, if I set Vibrate to FALSE the app runs fine) Code: Copy Dim n As Notification n.Initialize n.Icon = "icon" n.SetInfo("This is the title", "and this is the body.", "") n.Notify(1)
I'm using the sample code as provided in the doc to see how notifications work. It seems that Vibrate is set to TRUE by default - and when I run the sample code I get an error on the n.notify(1) statement: java.lang.SecurityException: Requires VIBRATE permission Click to expand... Where do I set / obtain this permission? (as might be expected, if I set Vibrate to FALSE the app runs fine) Code: Copy Dim n As Notification n.Initialize n.Icon = "icon" n.SetInfo("This is the title", "and this is the body.", "") n.Notify(1)
Erel B4X founder Staff member Licensed User Longtime User Aug 14, 2011 #2 Have you set the "Do not overwrite manifest" option? The VIBRATE permission should be added automatically. Upvote 0
Have you set the "Do not overwrite manifest" option? The VIBRATE permission should be added automatically.
K Kim Rowden Member Licensed User Longtime User Aug 16, 2011 #3 I had not - thank you Erel, all ok now. I HAD marked the manifest as Read Only because I am also using AdMob (and those instructions mention the manual way of retaining the manifest - I am now using the preferred "Do not overwrite manifest file" option). I'm still feeling/finding my way in this environment - is there a suggested frequency for which I should check the example manifest? Thanks, -Kim Upvote 0
I had not - thank you Erel, all ok now. I HAD marked the manifest as Read Only because I am also using AdMob (and those instructions mention the manual way of retaining the manifest - I am now using the preferred "Do not overwrite manifest file" option). I'm still feeling/finding my way in this environment - is there a suggested frequency for which I should check the example manifest? Thanks, -Kim
Erel B4X founder Staff member Licensed User Longtime User Aug 16, 2011 #4 If the only change required is for AdMob then I recommend you to use the automatic manifest file during development and only when you are before release, add the AdMob related modifications. Note that you can also compare your manual manifest file with AndroidManifest-Example.xml which is created in the same folder. Upvote 0
If the only change required is for AdMob then I recommend you to use the automatic manifest file during development and only when you are before release, add the AdMob related modifications. Note that you can also compare your manual manifest file with AndroidManifest-Example.xml which is created in the same folder.