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
Developer
Posts: 571
Registered: ‎04-11-2009
My Device: BB 10 Dev Alpha
Accepted Solution

Is Key Injection restricted in BB OS5.0?

[ Edited ]

Hello all,

 

I have an application in market, in this I have disconnected a call using Key Injection which then displays the User Interface. And, this works perfectly on most of the devices.. But few customers came up with issues that the User Interface doesn't come..!! 

 

Devices in which problems took place:

 

(1.) BlackBerry 9630 (Tour)

(2.) BlackBerry 9700 (Bold)

 

Is Key Injection restricted from OS 5.0? If yes, any solution regarding this are heartly appreciable..

 

Thanks & Regards,
Kanak Sony

 

 

 

 

 

Regards,
Kanak Sony
------------------------------------------------------------------------------------------
http://dodevelopnshare.wordpress.com/ | http://www.linkedin.com/profile/view?id=188131481&trk=tab_pro
Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Is Key Injection restricted in BB OS5.0?

Key injection might be restricted on any device by the Application Permissions settings.

 

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

Re: Is Key Injection restricted in BB OS5.0?

I use input simulation on 9700 devices without problem, also to end calls.
----------------------------------------------------------
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
Developer
Posts: 74
Registered: ‎01-03-2010
My Device: Not Specified

Re: Is Key Injection restricted in BB OS5.0?

nop, may be permission settings
Developer
Posts: 571
Registered: ‎04-11-2009
My Device: BB 10 Dev Alpha

Re: Is Key Injection restricted in BB OS5.0?

Thanks all for your interest...

 

As per the above replies to my query, I was confident that it will not be a problem(which I stated in my query).So, I decided to upgrade the OS of my device to OS 5.0

 

I have upgraded my BB 8520 to OS 5.0 and then installed my application in it. After installation, I checked properly for all permissions set to ALLOWED.

 

Then, I dial the access key which as per my expectations should disconnect the call and show me the Interface.But, it doesn't. It only ends the call and then does nothing.

 

Looking for further comments.. 

 

Thanks & Regards,

Kanak Sony

Regards,
Kanak Sony
------------------------------------------------------------------------------------------
http://dodevelopnshare.wordpress.com/ | http://www.linkedin.com/profile/view?id=188131481&trk=tab_pro
Developer
Posts: 571
Registered: ‎04-11-2009
My Device: BB 10 Dev Alpha

Re: Is Key Injection restricted in BB OS5.0?

It is disconnecting the calls..It means that Key Injection is not restricted here.. So, finally my confusion is over now..

 

When call is disconnected, Call log screen comes in the place of interface of my UiApplication. When, I clicked upon switch application ribbon from menu, i found my UiApplication here.

 

Can anybody clear me why my application is added to the switch application ribbon. It should come in foreground ( It happens in all other OS).

 

Thanks & Regards,

Kanak Sony

Regards,
Kanak Sony
------------------------------------------------------------------------------------------
http://dodevelopnshare.wordpress.com/ | http://www.linkedin.com/profile/view?id=188131481&trk=tab_pro
Developer
Posts: 16,999
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Is Key Injection restricted in BB OS5.0?

when i don't want my application to go to the background i trigger a requestForeground in the disabled method of UiApplication. Control it with a boolean value you can set to true or false.

----------------------------------------------------------
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
Developer
Posts: 571
Registered: ‎04-11-2009
My Device: BB 10 Dev Alpha

Re: Is Key Injection restricted in BB OS5.0?

Hi Simon,

 

Sorry for replying late.

 

About which disabled menu are you talking about? I have tried to override activate() method of UiApplication :

 

public void activate()
{
    if( !UiApplication.getUiApplication().isForeground() )
        Dialog.alert("Its not in foreground");
        
      UiApplication.getUiApplication().requestForeground();
        Dialog.alert("Done foreground");
}

 

But, the control doesn't go in if-condition... And, no change in display. The UiApplication still remains switch application ribbon.Smiley Sad

 

Thanks & Regards,

Kanak Sony

Regards,
Kanak Sony
------------------------------------------------------------------------------------------
http://dodevelopnshare.wordpress.com/ | http://www.linkedin.com/profile/view?id=188131481&trk=tab_pro
Developer
Posts: 16,999
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Is Key Injection restricted in BB OS5.0?

i meant the deactivate method.

something like this:

if (isStayForeground){

requestForeground();

}

 

if "isStayForeground" is set to true your application will stay in the foreground.

----------------------------------------------------------
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
Developer
Posts: 571
Registered: ‎04-11-2009
My Device: BB 10 Dev Alpha

Re: Is Key Injection restricted in BB OS5.0?

Thanks Simon,

 

It worked. I just used requestForeground() in deactivate().

 

Regards,

Kanak Sony

Regards,
Kanak Sony
------------------------------------------------------------------------------------------
http://dodevelopnshare.wordpress.com/ | http://www.linkedin.com/profile/view?id=188131481&trk=tab_pro