Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Trusted Contributor
Posts: 117
Registered: ‎09-06-2011
My Device: 9900
My Carrier: myself

Cant get permission request to show on release build

Hi,

 

I request permissions in the blackberry-tablet.xml, this is contained in my src folder along with appname-app.xml.

 

No matter what i try i cant get the request permissions to show on release build when i sideload it to test. This means i cannot use the camera or view files even though all permissions show as allow in security tab.

 

I have the blackberry-tablet.xml ticked as a file to be contained when releasing.

 

Any idea why this would be the case?

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Cant get permission request to show on release build

You can always debug this by inspecting your .bar file directly. Unzip it and open the MANIFEST.MF file in a text editor. Look for a line that starts with "Entry-Point-User-Actions:" and it will list any permissions that have been defined.

If it's missing then you have some sort of build problem.

If it's present, then you're misinterpreting what's going on and actually do have the permissions defined properly. Maybe you simply have them all marked as "Deny" in the security settings on the PlayBook, or are looking at the wrong version of your app there. A release build will appear as a second copy, since it has a different Package Id than your development builds.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Trusted Contributor
Posts: 117
Registered: ‎09-06-2011
My Device: 9900
My Carrier: myself

Re: Cant get permission request to show on release build

Thank you for your reply Peter,

 

I have had a look at the manifest file and it shows

 

Entry-Point-User-Actions: access_shared,record_audio,use_camera,access_internet,play_audio,set_audio_volume,read_device_identifying_information

 

My problem is that when i try to use browseForOpen i get this application cannot browse any files or if i call

CameraUI.isSupported it returns false.

 

This code has worked in the past but I have changed something by mistake (I think)  and now get this issue. The app in question is actually on app world so I don't want to just start a new project in case that creates issues of users updating in the future.

 

Where does the app get told about the blackberry-tablet.xml (where is it defined) or is just a case of making sure a file named blackberry-tablet.xml in src folder?

 

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Cant get permission request to show on release build

Do you have permission for the shared area?
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Cant get permission request to show on release build

The "access_shared" should be letting you browse files, provided you actually granted permissions for that as a user.

 

Go into the System Settings on your PlayBook, find the Security settings, Application Permissions, and scroll down to your app.  Be absolutely sure you've got the correct instance of it, as you may have several entries if you've been installing debug builds, or if you changed the package id at any point.

 

Once you've found the correct one, check the individual permissions and make sure you Allowed each one and didn't mark them as "Denied".  Better yet, set them to "Prompt" and tap Back, then launch your app again.  (Changes to these do not take effect until the next time you launch the app.)

 

If you've got them set to Prompt, then when you launch that app it absolutely will display the permissions dialog again.  Your issue is not related to the blackberry-tablet.xml file, as the MANIFEST.MF file is the only thing that matters here.  The XML file is used only during packaging, and it is used directly to generate the MANIFEST.MF file.  Only the MANIFEST.MF file is actually used on the device, so it's really not important what else you've got going on with packaging, now that you've established it is generated correctly.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Trusted Contributor
Posts: 117
Registered: ‎09-06-2011
My Device: 9900
My Carrier: myself

Re: Cant get permission request to show on release build

[ Edited ]

All permissions were set to allow in app permissions and I have tried setting use camera and access files to prompt - no prompts.

 

Also, I know i am looking at the correct app in permissions due to icon.

 

 

 

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Cant get permission request to show on release build

I really think you're doing something wrong on the PlayBook side, but if not you seem to have encountered a bug.

Can you try the following?

1. Uninstall the app. Make sure it's gone by checking the Permission settings again to see that it's been removed. Also verify that the icon you were using to launch it has been removed.

2. Reinstall it using the .bar file you inspected earlier. Make sure there's no chance you're accidentally installing something else which may not have those settings in place.

3. Go back to the security settings and check that the entry for the app shows up again and that the permissions are all reset to Prompt.

4. Run the app again, using the new icon that would be there and which you checked above was NOT there before you installed.

If you do that and it's still acting this way, I suggest you try getting someone else to test this out and compare results, if you're comfortable with sharing the .bar like that. I'd be happy to check it for you, you can contact me in a PM to get it to me.

In essence, it's my claim that if the MANIFEST.MF in a .bar file contains the settings, then when you install it fresh and launch it you will get prompted. If that doesn't happen, I'd say it's a serious bug in the OS and we should report it in the issue tracker.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Trusted Contributor
Posts: 117
Registered: ‎09-06-2011
My Device: 9900
My Carrier: myself

Re: Cant get permission request to show on release build

Thanks for replies, I would be weary of even claiming I found a bug with my knowledge in this area, I'm away from pc now for a bit but I did a name change somewhere and wondering if this could be the cause. The name changed seemed to work in that it displayed as desired on pb under app icon.

Is it possible that someone could show me one of their app.xml files so I can cross reference whilst viewing this thread on phone? Otherwise ill post mine later.

Thanks again.
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Cant get permission request to show on release build

You can also (in code) check that the File.documentsDirectory exists. If it does not, it is a permission issue.
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Cant get permission request to show on release build

bbdev12345, I'll just emphasize again that the contents of the XML file will not actually tell you anything more if the MANIFEST.MF is correct, as yours is.

If you did a name change alone, as in just the displayed name, it should not affect anything. What matters is the package name, which we usually put in as something like com.yourdomain.SomeApp. If you changed that, you are probably dealing with two separate installs of the app and are getting them mixed up somehow when you're testing. That's why I suggested the uninstall/reinstall approach, with checking in between that the one you are running really did get removed properly.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!