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

Java Development

Reply
Highlighted
New Contributor
Posts: 6
Registered: ‎06-19-2012
My Device: Developer
My Carrier: Developer
Accepted Solution

Using a GUI API I got from the blackberry site - getting error: "BlackBerry attemps to access secure api"

Hi,
So here's the API I downloaded and imported in my project ->
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800608/...

 

When I run it, I get "Error Module Attempts to access secure api"
 

It says its supported for OS 4.2 and above I belive, so me running it on my blackberry 9900 OS 5 should work,
I've been on these forums before and following the solutions, I ordered code signing keys, and signed the project as well.

 

This is what shows up in the code signing box, just before I run it:

Code Signing Infiormation


It compiles without errors, but It still doesn't work.
What am I doing wrong exactly?
Any help would be appreciated!
-Amina Khalique 

Developer
Posts: 16,986
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Using a GUI API I got from the blackberry site - getting error: "BlackBerry attemps to access secure api"

welcome to the support forums.

can you check which field prompts the error?
it seems something wants to be signed with a rim internal key.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Contributor
Posts: 6
Registered: ‎06-19-2012
My Device: Developer
My Carrier: Developer

Re: Using a GUI API I got from the blackberry site - getting error: "BlackBerry attemps to access secure api"

Hi,
I'm not really sure what you mean by which field prompts the error.
If you look at the link : http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800608/...

 

and download the src files, you'll see there's a lot of packages...
in the com.rim.device.uiexample package, if you open up UIExampleApplication.java - thats where UIExampleIndexScreen is called by the main method.

When I open UIExampleIndexScreen.java -  
It's basically a list of buttons that loads all the UI examples found in the packages...
And since there are so many UI examples loaded by UIExampleIndexScreen, I'm not really sure which one would be causing the problem.
 

Developer
Posts: 16,986
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Using a GUI API I got from the blackberry site - getting error: "BlackBerry attemps to access secure api"

try the sources from this link:
http://supportforums.blackberry.com/t5/Java-Development/Implement-advanced-buttons-fields-and-manage...
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Contributor
Posts: 6
Registered: ‎06-19-2012
My Device: Developer
My Carrier: Developer

Re: Using a GUI API I got from the blackberry site - getting error: "BlackBerry attemps to access secure api"

Hi, 
Tried those sources this time.
I don't get any "not registered" comments in red, [like the image from before] when I sign it now.
Is there any way to specifally find which field might be causing it?
I looked at the classes, and all of them just extend the basic fields that blackberry uses...and just customizes it. So I really don't understand why it isn't working..
....
Any other clues? 

Developer
Posts: 16,986
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Using a GUI API I got from the blackberry site - getting error: "BlackBerry attemps to access secure api"

you would have to use elimination to find the field. unless it really interests you i would not do it...
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Contributor
Posts: 6
Registered: ‎06-19-2012
My Device: Developer
My Carrier: Developer

Re: Using a GUI API I got from the blackberry site - getting error: "BlackBerry attemps to access secure api"

Hey everyone, 
Anyone else who's having this problem, with these particular src files from the advanced ui package download.
Make sure the following is in place.

Your JRE version is important.
If you are testing on a device that is older than 7.1

Change your JRE by right clicking on the JRE and selecting the right JRE for your device. [some of you may need to downnload the right JRE].
I installed the blackberry plugin for eclipse, so it automatically gave me all the JRE's available. I just had to change it.
After I changed it, I did not get anymore red comments in when I signed the code.
AND
it ran fine, with no error message popping up for "attempts to access secure api".
If anyone has any questions, and is experience the same problem. Please ask. I spent hours on this, and I'd be glad to help if I've been unclear!
Take care!