BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 12-09-2009, 12:10 AM   #1 (permalink)
New Member
 
Join Date: Nov 2009
Model: -8820
PIN: N/A
Carrier: starhub
Posts: 14
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default how to put a background midlet into foregournd ?

Please Login to Remove!

hi all , i have a midlet and do some lisenter to monitor the call when midlet go backgound . when it detect the call coming and i want to put my midlet in foreground . how to implement it ? and second amazy quistion is like this . there is a singleton class in my midlet . when the midlet start . i get that singleton object as A .and when the midlet go background .and the call coming .i want to get that singleton object again . but it's another object B returned .it seems very strange ..
Offline  
Old 12-09-2009, 03:51 AM   #2 (permalink)
New Member
 
Join Date: Nov 2009
Model: -8820
PIN: N/A
Carrier: starhub
Posts: 14
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok . i have found the answer for first question .thx all .
Offline  
Old 12-09-2009, 09:25 PM   #3 (permalink)
New Member
 
Join Date: Oct 2009
Model: 8700G
PIN: N/A
Carrier: CMCC
Posts: 12
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jx4245 View Post
hi all , i have a midlet and do some lisenter to monitor the call when midlet go backgound . when it detect the call coming and i want to put my midlet in foreground . how to implement it ? and second amazy quistion is like this . there is a singleton class in my midlet . when the midlet start . i get that singleton object as A .and when the midlet go background .and the call coming .i want to get that singleton object again . but it's another object B returned .it seems very strange ..
I'm not very clear about what you mean in q2. Any code example?
Offline  
Old 12-15-2009, 02:02 AM   #4 (permalink)
New Member
 
Join Date: Nov 2009
Model: -8820
PIN: N/A
Carrier: starhub
Posts: 14
Post Thanks: 0
Thanked 0 Times in 0 Posts
Smile

Quote:
Originally Posted by zhtlancer View Post
I'm not very clear about what you mean in q2. Any code example?
here a class named "singleTon" like below in my midlet:

class singleTon
{
static private singleTon instance = new singleTon();
public singleTon getInstance(){return instance}
private singleTon(){}

}

when my midlet is in foreground .i invoke < code > singleTon.getInstance() </code> .it return object A.
when it go background .invoked the < code > singleTon.getInstance() </code> again .it return object B.
the object A is diffrent with object B. that's the problem .
Offline  
Old 12-15-2009, 02:24 AM   #5 (permalink)
New Member
 
Join Date: Oct 2009
Model: 8700G
PIN: N/A
Carrier: CMCC
Posts: 12
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jx4245 View Post
here a class named "singleTon" like below in my midlet:

class singleTon
{
static private singleTon instance = new singleTon();
public singleTon getInstance(){return instance}
private singleTon(){}

}

when my midlet is in foreground .i invoke < code > singleTon.getInstance() </code> .it return object A.
when it go background .invoked the < code > singleTon.getInstance() </code> again .it return object B.
the object A is diffrent with object B. that's the problem .
then how do you implement foreground and background switch? Is this a midlet or CLDC program?
Offline  
Old 12-16-2009, 08:44 PM   #6 (permalink)
New Member
 
Join Date: Nov 2009
Model: -8820
PIN: N/A
Carrier: starhub
Posts: 14
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by zhtlancer View Post
then how do you implement foreground and background switch? Is this a midlet or CLDC program?
actuatlly . it 's midlet .after the midlet go background with pressed end key . it just handle the phone call and show some globe screen .
Offline  
Closed Thread


Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





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