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: 242
Registered: ‎02-19-2013
My Device: 9500
My Carrier: _
Accepted Solution

Listener for when application opened

I want the listener called when application opened. How can i do in blackberry

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

Re: Listener for when application opened

there is no such listener, you have to pull the foreground appliciation using application manager in intervals.
----------------------------------------------------------
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: 242
Registered: ‎02-19-2013
My Device: 9500
My Carrier: _

Re: Listener for when application opened

[ Edited ]

Suppose initially I get Camera, Message app opened then i am sending this information on server.

 

When this method call again & app still opened like Message then How can i recognize that its old,, not opened after first time.

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

Re: Listener for when application opened

if you check every second you can assume that it is the same.
----------------------------------------------------------
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: 242
Registered: ‎02-19-2013
My Device: 9500
My Carrier: _

Re: Listener for when application opened

@Simon, Can i get the application opened time.

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

Re: Listener for when application opened

you can save a timestamp when you see it the first time in your monitor app.
----------------------------------------------------------
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: 242
Registered: ‎02-19-2013
My Device: 9500
My Carrier: _

Re: Listener for when application opened

can you tell me How can i get the timestamp

 

Please help me for this.

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

Re: Listener for when application opened

http://www.blackberry.com/developers/docs/7.1.0api/java/lang/System.html#currentTimeMillis()
----------------------------------------------------------
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