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[])