| Reply | « Previous Thread | Next Thread » |
|
Is it possible to check capabilities of the application dinamically? For instance to know if the application is allowed to send and receive data or to read user data. I am referring from code, to be able to display customized error messages depending on not allowed capabilities.
Thank you. |
|
From MIDP 2 Javadocs
MIDlet.checkPermission public final int checkPermission(String permission)Get the status of the specified permission. If no API on the device defines the specific permission requested then it must be reported as denied. If the status of the permission is not known because it might require a user interaction then it should be reported as unknown. Parameters: permission - to check if denied, allowed, or unknown. Returns: 0 if the permission is denied; 1 if the permission is allowed; -1 if the status is unknown Since: MIDP 2.0 Hartti |
|
hi dear,
i want to know that in method of checkpermission(String parameter) what parameter should i pass as string to check permission. i passed as "javax.microedition.io.Connector.file.read" and it returns as 0 with no diff that application is signed or not.. so please tell me how can i resolve this issue. Thanks, Nekin
Last edited by nekinpatel : 2008-07-24 at 09:27.
|
| nekinpatel |
| View Public Profile |
| Find all posts by nekinpatel |
|
You pass it the same permission strings what you need to define in the JAD file (so your string is correct)
Are you running the app on an operator branded phone? Which phone model? Hartti |
|
hi dear,
i have tested it with signed and unsigned application in nokia 6630,6680,n80 phones. see what i have done is as below, please correct me if i have taken any wrong step. 1- int j= this.checkPermission("javax.microedition.io.Connector.file.read); and then i am checking value of j which this api call returns. so can you tell me what should it return in both case 1- when i have not given permission in suite setting and 2- when i have set permission always allow in suite setting. Thanks, Nekin |
| nekinpatel |
| View Public Profile |
| Find all posts by nekinpatel |
|
First 0 (not allowed), then 1 (allowed). Remember to request the proper permissions in your JAD file!
Hartti |
|
ya that's fine dear
but have you checked with above permissin in you midlet since i am checking for this permission "javax.microedition.io.Connector.file.read" and i am getting -1 instead according to your reply it should give me 0 or 1. so can you please check this practically if you have not checked ? so that i can get exact solution to it. :) Thanks, Nekin |
| nekinpatel |
| View Public Profile |
| Find all posts by nekinpatel |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| S60 2nd to 3rd/ PlatformSecurity / Capabilities | jarkoos | Installation, Certification and Security | 4 | 2007-04-14 15:08 |
| signing a freeware with extended capabilities | Jeepy | General Symbian C++ | 5 | 2006-09-01 16:56 |
| Capabilities needed for constructing/deleting CTelephony object? | mgroeber9110 | Symbian Networking & Messaging | 0 | 2006-08-14 14:45 |
| GSM/GPRS Drivers check FAILED | hblume | Multimodecards | 3 | 2004-01-28 22:37 |
| SMS Msg using VB Application | gurup83 | General Messaging | 2 | 2002-07-11 05:48 |