BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-03-2008, 10:16 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 8100
PIN: N/A
Carrier: Vodafone
Posts: 134
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Need to extend both AbstractPhoneListnerer and UIApplication class

Please Login to Remove!

I need to create an App with an Icon that will also listen to Phonecalls ( by implementing the PhoneListener class )

To do that I need to extend both AbstractPhoneListnerer and UIApplication class , but by Java sysntax only one class can be extended

I had been trying the folowing code without any luck

Here is the main part of code ( that compiles with still those 2 errors ) that I am using

( I have left outthe call listening and part as they are generic )


Code:

package com.blackberrydeveloper.ImplCallDiverter;
import net.rim.blackberry.api.phone.*;
public final class ImplCallDiverter implements AbstractPhoneListener extends UiApplication {
static public void main(String[] args)
{
    
ImplCallDiverter.registerOnStartup();


ImplCallDiverter theApp = new ImplCallDiverter();
theApp.enterEventDispatcher();

}
static private void registerOnStartup()
{
    
ImplCallDiverter phn_hndl = new ImplCallDiverter();
Phone.addPhoneListener(phn_hndl);

}

also when compiling it shows the errors

Warning!: No entry points found

Warning!: No definition found for exported static routine: .main(String[])
Offline  
Old 07-03-2008, 10:18 AM   #2 (permalink)
Knows Where the Search Button Is
 
irlennard's Avatar
 
Join Date: Jan 2008
Location: Berlin
Model: 9000
Carrier: T-Mobile
Posts: 32
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi. I just posted to your other thread here

-- Ian
Offline  
Old 07-03-2008, 10:28 AM   #3 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

how about using two classes and a callback?
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 07-03-2008, 10:29 AM   #4 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Posts: 310
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

... maybe it would be a good idea to study RIM's developer guide...
and take a look at the phone api demo in your JDE folder ...
Offline  
Old 07-03-2008, 11:00 AM   #5 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 8100
PIN: N/A
Carrier: Vodafone
Posts: 134
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Simon

Ian too had suggested the same
Code:

package com.blackberrydeveloper.ImplCallDiverter;

import net.rim.blackberry.api.phone.*;

public final class ImplCallDiverter extends UiApplication implements PhoneListener
{
    public static void main(String[] args)
    {
        ImplCallDiverter theApp = new ImplCallDiverter();
        theApp.enterEventDispatcher();
    }
    
    // Constructor
    ImplCallDiverter()    
    {
        Phone.addPhoneListener(this);
        
        // ...
    }    
}
But wheredo I call the registerOnStartup() function then ?

Ian , do you have any suggestions ?

Quote:
Originally Posted by simon.hain View Post
how about using two classes and a callback?
Offline  
Old 07-03-2008, 11:38 AM   #6 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

if you implement PhoneListener you'll have to add empty implementations for all non-used methods.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 07-03-2008, 11:52 AM   #7 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 8100
PIN: N/A
Carrier: Vodafone
Posts: 134
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Simon

I had just now send you the code that I have written

I have send you a message specifying the link to it

Would it be possible for you to go through it if its OK with you ?

I had implemented code for just 2 classes that I had written

I had also deleted the rest of the unused listener Codes

Now I hope that was the error causing all this

But other than that I had also been getting warning saying entry point not found

Are thiose related ?



Quote:
Originally Posted by simon.hain View Post
if you implement PhoneListener you'll have to add empty implementations for all non-used methods.
Offline  
Old 07-04-2008, 02:14 AM   #8 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

sure, i am happy to get some additional work. please contact my company about our daily rate or possible trainings.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 07-04-2008, 05:41 AM   #9 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 8100
PIN: N/A
Carrier: Vodafone
Posts: 134
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Wow , I wish I were that rich to afford all such trainings!!

Anyway what is your company website ?

Quote:
Originally Posted by simon.hain View Post
sure, i am happy to get some additional work. please contact my company about our daily rate or possible trainings.
Offline  
Old 07-04-2008, 07:08 AM   #10 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

linked in my signature. you can also use www.isec7.com

because i get a lot of useful information from the forums it is tolerated that i read and answer some postings here. i am not reading the forums in my free time, and checking code of other programmers is not really covered by our agreement here.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 07-04-2008, 07:16 AM   #11 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 8100
PIN: N/A
Carrier: Vodafone
Posts: 134
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Simon

Folowing your instruction , I had recompiled using all the original implementations

I even tried a similar smple app from blackBerrysite but I am still geting the Entry point not found error

Can you please say what should be the project settings

I tried them as both types of CLDC along with checking on and off the four choices but still no luck

Does this warning mean my code is not executed at all ?
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.