BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 07-02-2008, 06:03 AM   #21
Jayaseelan
Thumbs Must Hurt
 
Join Date: Jun 2008
Location: Chennai
Model: 8130
PIN: N/A
Carrier: AIRTEL
Posts: 51
Default

Please Login to Remove!

HI Mobile developer,

I can able to disconnect a call..

Its working fine....
__________________
Jayaseelan.V
Mobile Application Developer
INDIA.
Offline  
Old 07-02-2008, 06:52 AM   #22
MobileDeveloper
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 8100
PIN: N/A
Carrier: Vodafone
Posts: 134
Default

Hi

Can you please share the Code that will disconnect the call

Also from the code you had posted earlier ,can you please say what is the need for

checkCall("callInitiated", callid);


Can you say what is being done in that function
Offline  
Old 07-02-2008, 06:55 AM   #23
MobileDeveloper
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 8100
PIN: N/A
Carrier: Vodafone
Posts: 134
Default

Also does it work on all BlackBerry Models ?
Offline  
Old 07-02-2008, 07:48 AM   #24
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Default

Quote:
Originally Posted by Jayaseelan View Post
I can able to disconnect a call..

Its working fine....
code or it did't happen.

if you managed to end a call without event injection i would be very interested to learn how!
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 07-02-2008, 08:58 AM   #25
MobileDeveloper
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 8100
PIN: N/A
Carrier: Vodafone
Posts: 134
Default

Hi Jaya

Was the code posted by you in its full ?

Is it sufficient to end a call in 8800 ?

Can you please reply ?
Offline  
Old 07-02-2008, 02:17 PM   #26
MobileDeveloper
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 8100
PIN: N/A
Carrier: Vodafone
Posts: 134
Default

Hello Simon

Can atleast you share the code for the automatic disconnection ?

It would be fine even if it works just on either the Simulator or Blackberry

A code that will work in any Model would be fine
Offline  
Old 07-02-2008, 10:23 PM   #27
samwize
New Member
 
Join Date: Apr 2008
Model: none
PIN: N/A
Carrier: starhub
Posts: 11
Default

Hi

I have developed a similar application that disconnect call and do a callback. You may download it at Hoiio. I would appreciate for any feedback.

But it seems like there are a lot of bugs surrounding PhoneListener, simulating key events to disconnect call and Invoke call event. I noticed two bugs:

1) There is a 'Ghost Call Effect', in which sometimes (randomly) after the call is disconnected with event injection, but the phone still shows 'Calling ...', but in fact is not dialling anymore! This will lead to another effect where the next incoming call received will be muted.

2) callInitiated callback event is called twice. I need to have a lock to prevent the extra event.

If someone experienced the same problem as me, let me know! Some of the code that you might be looking for and which I have tested to work in 4.2 and 4.3 are posted below. callInitiated does get the callback when a call is made.

Code:
public void callInitiated(int callid) {
        print("callInitiated");

        // To prevent simultaneous handling... If locked.. simply return
        if (locked) return;
        else locked = true;
              
        disconnectCall();
        // do your things..
        
        // release lock
        locked = false;
}
Code:
private void disconnectCall() {
            EventInjector.KeyCodeEvent pressEndKey = new EventInjector.KeyCodeEvent(
                    KeyCodeEvent.KEY_DOWN, (char) Keypad.KEY_END,
                    KeypadListener.STATUS_NOT_FROM_KEYPAD, 10);
            EventInjector.KeyCodeEvent releaseEndKey = new EventInjector.KeyCodeEvent(
                    KeyCodeEvent.KEY_UP, (char) Keypad.KEY_END,
                    KeypadListener.STATUS_NOT_FROM_KEYPAD, 10);
            EventInjector.invokeEvent(pressEndKey);
            try {Thread.sleep(50);} catch (InterruptedException ex) {ex.printStackTrace();}
            EventInjector.invokeEvent(releaseEndKey);
}
Offline  
Old 07-03-2008, 02:40 AM   #28
jversen
New Member
 
Join Date: Apr 2008
Model: 8800
PIN: N/A
Carrier: att
Posts: 4
Default

if you built all samples that came with jde 4.3, make sure you delete them form the simulator folder, and this problem may go away. i dont which samples conflics with
phonelistener interface.
Offline  
Old 07-03-2008, 04:01 AM   #29
MobileDeveloper
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 8100
PIN: N/A
Carrier: Vodafone
Posts: 134
Default

Hi

Thanks very much for the code

Even if there are any bugs , it would be fine

I just need to disconnect the calls

Can you please say whether the code will work across all the BlackBerry models ?

I will also try your app

Iis there a cod version other than the jad ?

Quote:
Originally Posted by samwize View Post
Hi

I have developed a similar application that disconnect call and do a callback. You may download it at Hoiio. I would appreciate for any feedback.

But it seems like there are a lot of bugs surrounding PhoneListener, simulating key events to disconnect call and Invoke call event. I noticed two bugs:



If someone experienced the same problem as me, let me know! Some of the code that you might be looking for and which I have tested to work in 4.2 and 4.3 are posted below. callInitiated does get the callback when a call is made.
Offline  
Old 07-03-2008, 08:12 AM   #30
samwize
New Member
 
Join Date: Apr 2008
Model: none
PIN: N/A
Carrier: starhub
Posts: 11
Default

Our app is tested and works with 4.2 and above. But if you just need phone listener and disconnection of call, I believe 4.0 and above should work. Check the api.

From our mobile web, only OTA installation via jad is available. But from our web, registered user can choose to download the cod/alx files.
Offline  
Old 07-03-2008, 08:20 AM   #31
MobileDeveloper
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 8100
PIN: N/A
Carrier: Vodafone
Posts: 134
Default

Hi Sam

I was mentioning about the BlsackBerry models that it would work on

Would it work on all models, both old and new ones ?

Thanks very much for the code
Offline  
Old 07-03-2008, 08:23 AM   #32
samwize
New Member
 
Join Date: Apr 2008
Model: none
PIN: N/A
Carrier: starhub
Posts: 11
Default

It all depends on the BlackBerry OS version that the model is running. OS version 4.0.0 and above should work.
Offline  
Old 07-03-2008, 08:52 AM   #33
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Default

using eventinjector is known, no need to repost it here several times. there has to be some way without it.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 07-04-2008, 10:36 AM   #34
MobileDeveloper
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 8100
PIN: N/A
Carrier: Vodafone
Posts: 134
Default

Hello

I tried compling it but it is giving me error

cannot find symbol
symbol : variable KeyCodeEvent


Do I have to import any library ?


Code:
Building MyPhone
C:\Program Files\Research In Motion\BlackBerry JDE 4.2.1\bin\rapc.exe  -quiet import=..\lib\net_rim_api.jar codename=MyPhone MyPhone.rapc warnkey=0x52424200;0x52435200;0x52525400 "C:\Documents and Settings\Administrator\My Documents\RACProjs\BBerrySample\CallListener\MyPhone.java" "C:\Documents and Settings\Administrator\My Documents\RACProjs\BBerrySample\CallListener\icon.png"
C:\Documents and Settings\Administrator\My Documents\RACProjs\BBerrySample\CallListener\MyPhone.java:31: cannot find symbol
symbol  : variable KeyCodeEvent
location: class com.blackberrydeveloper.myphone.MyPhone
            EventInjector.KeyCodeEvent pressEndKey = new EventInjector.KeyCodeEvent(KeyCodeEvent.KEY_DOWN, (char) Keypad.KEY_END,KeypadListener.STATUS_NOT_FROM_KEYPAD, 10);
                                                                                    ^
C:\Documents and Settings\Administrator\My Documents\RACProjs\BBerrySample\CallListener\MyPhone.java:31: internal error; cannot instantiate KeyCodeEvent(int,char,int,int) at net.rim.device.api.system.EventInjector.KeyCodeEvent to ()
            EventInjector.KeyCodeEvent pressEndKey = new EventInjector.KeyCodeEvent(KeyCodeEvent.KEY_DOWN, (char) Keypad.KEY_END,KeypadListener.STATUS_NOT_FROM_KEYPAD, 10);
                                                     ^
C:\Documents and Settings\Administrator\My Documents\RACProjs\BBerrySample\CallListener\MyPhone.java:32: cannot find symbol
symbol  : variable KeyCodeEvent
location: class com.blackberrydeveloper.myphone.MyPhone
            EventInjector.KeyCodeEvent releaseEndKey = new EventInjector.KeyCodeEvent(KeyCodeEvent.KEY_UP, (char) Keypad.KEY_END,KeypadListener.STATUS_NOT_FROM_KEYPAD, 10);
                                                                                      ^
C:\Documents and Settings\Administrator\My Documents\RACProjs\BBerrySample\CallListener\MyPhone.java:32: internal error; cannot instantiate KeyCodeEvent(int,char,int,int) at net.rim.device.api.system.EventInjector.KeyCodeEvent to ()
            EventInjector.KeyCodeEvent releaseEndKey = new EventInjector.KeyCodeEvent(KeyCodeEvent.KEY_UP, (char) Keypad.KEY_END,KeypadListener.STATUS_NOT_FROM_KEYPAD, 10);
                                                       ^
4 errors
Error!: Error: java compiler failed: javac -source 1.3 -target 1.1 -g -O -d C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\rapc_6eb20e26.dir -bootcl ...
Error while building project
Quote:
Originally Posted by samwize View Post
Hi

I have developed a similar application that disconnect call and do a callback. You may download it at Hoiio. I would appreciate for any feedback.

But it seems like there are a lot of bugs surrounding PhoneListener, simulating key events to disconnect call and Invoke call event. I noticed two bugs:

1) There is a 'Ghost Call Effect', in which sometimes (randomly) after the call is disconnected with event injection, but the phone still shows 'Calling ...', but in fact is not dialling anymore! This will lead to another effect where the next incoming call received will be muted.

2) callInitiated callback event is called twice. I need to have a lock to prevent the extra event.

If someone experienced the same problem as me, let me know! Some of the code that you might be looking for and which I have tested to work in 4.2 and 4.3 are posted below. callInitiated does get the callback when a call is made.

Code:
public void callInitiated(int callid) {
        print("callInitiated");

        // To prevent simultaneous handling... If locked.. simply return
        if (locked) return;
        else locked = true;
              
        disconnectCall();
        // do your things..
        
        // release lock
        locked = false;
}
Code:
private void disconnectCall() {
            EventInjector.KeyCodeEvent pressEndKey = new EventInjector.KeyCodeEvent(
                    KeyCodeEvent.KEY_DOWN, (char) Keypad.KEY_END,
                    KeypadListener.STATUS_NOT_FROM_KEYPAD, 10);
            EventInjector.KeyCodeEvent releaseEndKey = new EventInjector.KeyCodeEvent(
                    KeyCodeEvent.KEY_UP, (char) Keypad.KEY_END,
                    KeypadListener.STATUS_NOT_FROM_KEYPAD, 10);
            EventInjector.invokeEvent(pressEndKey);
            try {Thread.sleep(50);} catch (InterruptedException ex) {ex.printStackTrace();}
            EventInjector.invokeEvent(releaseEndKey);
}
Offline  
Old 07-10-2008, 01:40 AM   #35
gizmo01
Knows Where the Search Button Is
 
Join Date: Aug 2005
Location: Toronto
Model: 9700
Carrier: Rogers
Posts: 30
Default

Quote:
Originally Posted by samwize View Post
Our app is tested and works with 4.2 and above. But if you just need phone listener and disconnection of call, I believe 4.0 and above should work. Check the api.

From our mobile web, only OTA installation via jad is available. But from our web, registered user can choose to download the cod/alx files.
I would LOVE a copy of the alx file to do some testing for you. I've only got the email plan from Rogers, so I cant' easily download stuff..

Thanks
Offline  
Old 07-10-2008, 09:37 PM   #36
joginder
BlackBerry Extraordinaire
 
Join Date: May 2005
Location: AZ
Model: Passp
Carrier: ATT
Posts: 1,123
Default

I don't know how much it is helpful:
I have installed the little app from RelianceIndiaCall.com on my BB and every time i dial a number with +nnnnnnnnnnn then it will automatically initiate the call. I have tried to make a call without + in the number and call will not go thru.
__________________
_____________________________
Never be silent about the things that matter, but what about Democracy? That matters too
Offline  
Old 07-16-2008, 03:28 AM   #37
Jayaseelan
Thumbs Must Hurt
 
Join Date: Jun 2008
Location: Chennai
Model: 8130
PIN: N/A
Carrier: AIRTEL
Posts: 51
Default

HI,

My app runs in Background after installation.

Now i want to know how to start the app after switch on the mobile .

The app should automatically starts the execution without UI part,

Can any one help me..
__________________
Jayaseelan.V
Mobile Application Developer
INDIA.
Offline  
Old 07-16-2008, 09:45 AM   #38
MobileDeveloper
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 8100
PIN: N/A
Carrier: Vodafone
Posts: 134
Default

Hi

Is your BackGround PhoneListener program working ?

Can you please share the code for it ?

Quote:
Originally Posted by Jayaseelan View Post
HI,

My app runs in Background after installation.

Now i want to know how to start the app after switch on the mobile .

The app should automatically starts the execution without UI part,

Can any one help me..
Offline  
Old 07-19-2008, 12:59 AM   #39
Jayaseelan
Thumbs Must Hurt
 
Join Date: Jun 2008
Location: Chennai
Model: 8130
PIN: N/A
Carrier: AIRTEL
Posts: 51
Default

Hi Mobile Developer,

I have attached the code ..You can use this and it will works fine..
Attached Files
File Type: txt MyPhone.txt (6.1 KB, 105 views)
__________________
Jayaseelan.V
Mobile Application Developer
INDIA.

Last edited by Jayaseelan; 07-23-2008 at 01:30 AM..
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

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

Forum Jump


Dec/Adac Corp. D4-10390 Rev 6 Model 1664ATTL Output Pulse Board 1983 (B16) picture

Dec/Adac Corp. D4-10390 Rev 6 Model 1664ATTL Output Pulse Board 1983 (B16)

$189.99



Niedermaier vintage Mannequins Visual Display Props Dec. 1991 Catalogue picture

Niedermaier vintage Mannequins Visual Display Props Dec. 1991 Catalogue

$141.00



VINTAGE Bruker Board DEC W4P3042 for SpectroSpin 250 picture

VINTAGE Bruker Board DEC W4P3042 for SpectroSpin 250

$99.99



Adec Vintage Adjusting Dentist Doctor Medical Stool Rolling Swivel Chair picture

Adec Vintage Adjusting Dentist Doctor Medical Stool Rolling Swivel Chair

$199.99



VINTAGE WESTERN ELECTRIC METER ORDNANCE A322525 WWII ERA DECEMBER 1943 picture

VINTAGE WESTERN ELECTRIC METER ORDNANCE A322525 WWII ERA DECEMBER 1943

$30.00



HSS 12pcs Valve Seat & Face Cutter 45dec 30dec 20dec for Vintage Car, Bikes ,Jee picture

HSS 12pcs Valve Seat & Face Cutter 45dec 30dec 20dec for Vintage Car, Bikes ,Jee

$235.94







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