BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 05-30-2008, 01:02 PM   #1
guildencrantz
New Member
 
Join Date: May 2008
Model: 8830
PIN: N/A
Carrier: Sprint
Posts: 7
Default How to get currently displayed screen?

Please Login to Remove!

How can I get the currently displayed screen?

I'm working on an application which will automate messages, but I can't get the messages screen.

Currently I simply invoke messages
Code:
Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, null)
and I thought I'd be able to get the application from the application manager, but I can't seem to do that.

ApplicationManager.getVisibleApplications() is returning a number of descriptors, but they all refer to my application's name with the same processId, yet the screen stack only has one screen (the one I originally created).

I've verified that I can InvokeEvents and the messages application responds, but I'd really like to be able to read fields from the screen. Do I need to invoke messages in a different manner or am I missing how to get this screen completely?
Offline  
Old 05-30-2008, 01:54 PM   #2
richard.puckett
Talking BlackBerry Encyclopedia
 
richard.puckett's Avatar
 
Join Date: Oct 2007
Location: Seattle, WA
Model: 9020
PIN: N/A
Carrier: T-Mobile
Posts: 212
Default

Have you tried UiApplication.getUiApplication().getActiveScreen() ?
__________________
Do your homework and know how to ask a good question.
Offline  
Old 05-30-2008, 02:14 PM   #3
guildencrantz
New Member
 
Join Date: May 2008
Model: 8830
PIN: N/A
Carrier: Sprint
Posts: 7
Default

Quote:
Originally Posted by richard.puckett View Post
Have you tried UiApplication.getUiApplication().getActiveScreen() ?
Yes, that returns the screen for my application, not the messages screen.
Offline  
Old 06-02-2008, 12:18 PM   #4
guildencrantz
New Member
 
Join Date: May 2008
Model: 8830
PIN: N/A
Carrier: Sprint
Posts: 7
Default

Why does it always come down to a single character?

My original problem, that messages wasn't showing after getVisibleApplications, was due to a faulty index on the array. It's there.

Now to get the Screen from the descriptor...
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


MOSFET - IRFZ44N 55V - Transistor  for Arduino Pi  TTL picture

MOSFET - IRFZ44N 55V - Transistor for Arduino Pi TTL

$54.79



MOSFET - IRF540N 100V 33A - Transistor for Arduino Pi TT picture

MOSFET - IRF540N 100V 33A - Transistor for Arduino Pi TT

$49.72



US Stock 4pcs 2N3055 NPN AF Amp Audio Power Transistor 15A/60V picture

US Stock 4pcs 2N3055 NPN AF Amp Audio Power Transistor 15A/60V

$11.66



TO-92 Assortment NPN PNP DIY kit 15 value 600pcs Transistor  picture

TO-92 Assortment NPN PNP DIY kit 15 value 600pcs Transistor

$14.40



MJ15004 PNP Audio Power Amplifier transistor MJ15004G OnSemi picture

MJ15004 PNP Audio Power Amplifier transistor MJ15004G OnSemi

$8.29



2SD732 Original New Sumitomo Silicon NPN Power Transistor D732 picture

2SD732 Original New Sumitomo Silicon NPN Power Transistor D732

$25.95







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.