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

Web and WebWorks Development

Reply
Trusted Contributor
gazier20
Posts: 120
Registered: ‎10-25-2010
My Device: Not Specified

Re: Avoid to ask for Blackberry PIN - How ?

Thank you so much !!

 

I built a big application and I missed that tiny thing :smileysurprised:

 

Thank you. I'll send it to my webservice

Please use plain text.
Developer
jmace
Posts: 482
Registered: ‎10-24-2008
My Device: 9300
My Carrier: AT&T

Re: Avoid to ask for Blackberry PIN - How ?

it's always the small stuff :smileyhappy:

 

Good luck.

_________________________________________
www.jasonmace.com/blackberry
Please use plain text.
Developer
agungeddy
Posts: 164
Registered: ‎08-26-2010
My Device: Not Specified

Re: Avoid to ask for Blackberry PIN - How ?

[ Edited ]

The problem when using those blackberry.identity feature is,

there will be showed some kind of javascript alert warning inside the application. This warning is about confirmation to access some device informations.

 

This popup warning is really annoying for us,

so we here avoid to using the blackberry.identity feature.

Please use plain text.
Trusted Contributor
gazier20
Posts: 120
Registered: ‎10-25-2010
My Device: Not Specified

Re: Avoid to ask for Blackberry PIN - How ?

You're right. We have now a pop-up.

What is your solution to have the pin ?

Please use plain text.
Developer
agungeddy
Posts: 164
Registered: ‎08-26-2010
My Device: Not Specified

Re: Avoid to ask for Blackberry PIN - How ?

 


gazier20 wrote:

You're right. We have now a pop-up.

What is your solution to have the pin ?


Javascript Extension

 

Please use plain text.
Trusted Contributor
gazier20
Posts: 120
Registered: ‎10-25-2010
My Device: Not Specified

Re: Avoid to ask for Blackberry PIN - How ?

 

Did you use  BlackberryContact.PIN   ???

 

Because it's an int.

Please use plain text.
Developer
agungeddy
Posts: 164
Registered: ‎08-26-2010
My Device: Not Specified

Re: Avoid to ask for Blackberry PIN - How ?

[ Edited ]

Yes it is in integer,

but dont forget,

java has a built-in method to convert it to hexadecimal and even in string format,

this method is: toHexString()


Please use plain text.
Trusted Contributor
gazier20
Posts: 120
Registered: ‎10-25-2010
My Device: Not Specified

Re: Avoid to ask for Blackberry PIN - How ?

package widgetpackage;

import net.rim.blackberry.api.pdap.BlackBerryContact;
import net.rim.device.api.script.ScriptableFunction;

public class Identity extends ScriptableFunction {

	public Object invoke(Object obj, Object[] args) throws Exception
	{

	return (Object)Integer.toHexString(BlackBerryContact.PIN);
									
	}
}

 

Here is my code. It returns always the same result with any device. Do you really use BlackberryContact.PIN ????

Please use plain text.
Trusted Contributor
gazier20
Posts: 120
Registered: ‎10-25-2010
My Device: Not Specified

Re: Avoid to ask for Blackberry PIN - How ?

I found. It's Integer.toHexString(DeviceInfo.getDeviceId())

Please use plain text.