Disconnect the call triggered by the user

I need an application that must hang up initiated by the user and call another number (say a few default) programmatically.

I tried the following code in the method callInitiated() of the earpiece of the phone. But it does not work as expected.

Test 1 - using the method Phone.initiateCall)

public void callInitiated(int callid) {
    System.err.println("Call initiated.."+callid);

    try {
        Phone.initiateCall(callid, "1234888888");
    } catch (RadioException e1) {
        // TODO Auto-generated catch block
        e1.printStackTrace();
    }
}

Test 2 - using the injector event method

public void callInitiated(int callid) {
    System.err.println("Call initiated.."+callid);

    PhoneCall phNr = Phone.getCall(callid);
    ApplicationPermissionsManager permissionsManager = ApplicationPermissionsManager.getInstance();
    System.err.println("Beforeeeeee"+permissionsManager.getPermission    (  ApplicationPermissions.PERMISSION_INPUT_SIMULATION));
    if(permissionsManager.getPermission(ApplicationPermissions.PERMISSION_INPUT_SIMULATION) != ApplicationPermissions.VALUE_ALLOW){
        System.err.println("Permissions are NOT OK");
        ApplicationPermissions neededPermissions = new ApplicationPermissions();
        neededPermissions.addPermission(ApplicationPermissions.PERMISSION_INPUT_SIMULATION);
        permissionsManager.invokePermissionsRequest(neededPermissions);
        System.err.println("Nowwwww the permission is....."+permissionsManager.getPermission(ApplicationPermissions.PERMISSION_INPUT_SIMULATION));
    }
            System.err.println("Permissions are OK");

    EventInjector.KeyCodeEvent ev = new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEvent.KEY_DOWN,  Keypad.map(Keypad.KEY_END), KeypadListener.STATUS_ALT);
    System.err.println("b4 1 EventInjector invokeddddddddddddd");
    EventInjector.invokeEvent(ev);
    System.err.println("aftr 1 EventInjector invokeddddddddddddd");
    try {
        Thread.sleep(1000);
    } catch (InterruptedException e1) {
        // TODO Auto-generated catch block
        e1.printStackTrace();
    }

    EventInjector.KeyCodeEvent ev1 = new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEvent.KEY_UP,  Keypad.map(Keypad.KEY_END), KeypadListener.STATUS_ALT);
    System.err.println("b4 2 EventInjector invokeddddddddddddd");
    EventInjector.invokeEvent(ev1);
    System.err.println("aftr 2 EventInjector invokeddddddddddddd");
}

The trials were unsuccessful, and no exception is thrown. Rather, the user dialed number is called.

What is the error that I do?

I use STATUS_NOT_FROM_KEYPAD, not STATUS_ALT.
I inject a keydown and keyup event.

Tags: BlackBerry Developers

Similar Questions

  • Windows 7 can not disconnect the user

    Hello!

    I thought that Windows 7 is the multi-user operating system, but it looks like I was mistaken. Sometimes, you may not disconnect to connect to another user. This happened to me today again. And it wasn't the first time. Then I wait in my exercise of laptop and notebook battery went to hibernation. I plugged in and turn on again and you can not belive - it pick up Windows and continue to end the session. Apparently there is no option to turn it off with the power button / stop. What to do or use an account that one user, of course, Windows 7 isn't able to use more than one user account?
    What a beautiful end of week for users of Microsoft products. Yesterday my desktop with Windows 7 PC crashed (BSOD), today in the morning my Windows Phone 7 reboot randomly (it's not resolved and answered: http://goo.gl/xF9fx) and now laptop with Windows 7 doesn't know how to disconnect the user. I can't imagine what would happen if I had an Xbox. I am so happy. :-)

    Kind regards
    Matej

    Hello SLOMatej,

    You can see this FAQ on the failover of the user.
    This may not affect you, but it would be interesting to watch.

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-desktop/i-cant-switch-users-in-Windows-7/b1d6edca-dcf8-4b54-960d-1a2a04fb4f4e

    Let us know if it helps.

    Marilyn

  • Unable to disconnect the user call

    Hi all

    I want to make an application in which the user is not able to disconnect call.is is possible? can I blocked the red button.

    Thank you

    Ketan

    crush the keydown/keyup. the red button code is 1179648

  • Disconnect the user from the sql server Server 2008 SQL server client

    Hello...

    Please can someone guide me on how to disconnect the server SQL server 2008 sql server user client if the client is more than 10 minutes of inactivity
    Thank you
    Salomé

    Hello

    SQL Server is not supported in these forums. Please ask the appropriate here Microsoft TechNet Ant:

    http://social.technet.Microsoft.com/forums/SQLServer/en-us/home?category=SQLServer

    Thank you.

  • Unable to disconnect the user admin, user has the application running

    Hello

    Is there anyway that I can disconnect this user admin, because I know that there is demand running, I'm trying to Log using the regional service, but it keeps giving me the user a reuqest running.

    What should I do about this?

    Thank you

    Celine wrote:
    Robb,

    Thanks for the reply. The problem is that I can't find the application. then I tell myself that what essbase studio performs the import.

    Thanks again.

    Don

    Stop the services...
    N

    Kill Esssvr.exe process of essbase server.

    Kind regards
    Katia

    Published by: P on April 7, 2011 15:11

  • Server Terminal server disconnects the user frequently

    I have a small problem with one user and terminal server session server goes dark and logout on it.  We have the installer, group policy and do not know why this person knows the problem.  His hard drive crashed recently, but he's back running.

    Is there something I need to do on Windows 7 or Server terminal server itself?

    Server Terminal server are better to ask questions on TechNet

    http://social.technet.Microsoft.com/forums/en-us/categories/

  • When you use the feature of period of Parental controls for my child's account, the session is saved, and although very convenient for the user, it's boring for the parent. How can I disconnect this acct when it expired already?

    When you use the period of Parental control feature, acct of my child receives the 15 min and 1 put min warning, and then the closure of the session. However, any Web site that it has a really annoying music keeps playing even when I connected under my account admin the only way I can disconnect the acct with Parental control game is to restart my whole machine. Is there another way to disconnect the user standard acct with this feature of limitation in time game? THX.

    Hi marion_librarian

    Thank you for using the Microsoft Answers Forums!

    This is the problem of design, the session remains active in the background, however, so the next time they connect, they can pick up where they left off without losing any of their work.

    In case if you complete the program, there is no these settings in the parental control to close the program, you can disconnect the program using the Task Manager.

    Check the link for more information:

    Explore the features: Parental controls:

    http://www.Microsoft.com/Windows/Windows-Vista/features/parental-controls.aspx

    Set up Parental controls:

    http://Windows.Microsoft.com/en-us/Windows-Vista/set-up-parental-controls

    NOTE: When you log in as an administrator you can connect to the wide of other users. Follow these steps to log on to the account with Parental control and/or any other user.

    1 click-right on the taskbar and open the Task Manager.

    2. Select users

    3. right click on the user name you want to disconnect, and then click close session.

    Hope this information was useful.

    Let me know if it worked.

    All the best!

    Thank you and best regards,

    R uma - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • the user is logged out automatically - timeout?

    Hello

    It is quite difficult to describe my problem... Well, we have an application with direct payment, but no custom window. Means, when the user opens the application, he sees an empty library, when he signs, he sees folios there right to. When he signed, he sees only the folios he is already downloaded, the other those diappear. Very simple. Works perfectly on my device.

    Now I'm getting reports of several users on the following behavior:

    1. the user connects to the library

    2. 3 folios appear to which they have access

    3. the user downloads 1 of folios (good)

    then

    4. the user closes the application (with double click on the home button and close the application window in "task manager")

    5 when it opens again the application, it is automatically disconnected, but see again all 3 folios - even those it has never downloaded before!

    6 when it tries to download one of these folios, the accidents of the application - which is quite logical, cause it there no right to download the folio.

    My questions are:

    1.

    Why the user get disconnected automatically when the application is closed? (doesn't happen on my device, I stay permanently connected)

    2.

    Why the library always displays all folios, even if the user is offline?

    Note: If the user logs on "manually" in the library (upper-left button), folios disappear properly.

    I was unable to "reproduce" this error on my device, but it seems to happen to several users.

    Can you help me?

    Best

    Ninetta

    I asked around, and it is likely that the call to RenewAuthToken does not work correctly. It is called when the user opens the application. A response not valid will be to disconnect the user.

  • How do I know if a call is disconnected by the user or by the appellant?

    When there is an incoming call, the phone user can log out by clicking on the red button, or it can be cut by the appellant. I must say that out of these two types.

    But no matter how the call is interrupted, the system continues to produce a callDisconnected event.

    Also, I tried to save an event key listener to monitor the events of the red button. But as the system have consumed the event, the system will not send this event of red button at my request.

    Do you have an idea how know if a call to imcomming is disconnected by the user or by the appellant?

    I tried, although the keydown event of the red button has been consumed by the system, but the keyup event is still distributed, so that the application can listen to the event keyup to know if the call is interrupted by the appellant or by user.

  • intermittent connection problem: 'the user profile Service service has no logon. The remote procedure call failed and did not execute. »

    Hello, I'm having intermittent problems with logging in my Windows 7 computer.

    Often after reboot due to applications of Windows Update or any simply restart after the holidays, I have the following message on trying to connect:

    "The service user profile Service has no logon. The remote procedure call failed and did not execute. "

    When I click 'OK', the machine disconnects and try to restart.  This can occur 2 to 5 times before _works_ .  But sometimes it happens at all.  And sometimes he _partially_ connects, but my "reminder" and the "Sidebar Gadgets' not loading not correctly and I get a different RPC error - for example, I lived once a message RPC over Skype cannot work because the remote procedure call failed.

    I'm fairly certain that it is different from the frequently reported issue 'profile of corruption', which was experienced by others.  This problem manifests itself as 'the user profile Service does not log. The user profile could not be loaded "and is reported as a blocking problem consistently reproducible which is set by the 'fixing' of the profile.

    However, the issue I feel is clearly related to an RPC problem is intermittent and not consistent - maybe one of my devices is not reset properly?  Where I can look in the logs of Windows, to provide relevant information on this subject?

    Because my computer was still under warranty, I have raised the issue of Dell and they removed the damaged system file (user account) last week.

    I hope that this will finally fix the problem (previously the error message disappear and reappear after a few weeks later.)  I'll give it a few more weeks to be sure.

  • Can someone guide me how disable or disconnect a specific user of WiFi for laptop user and Mobile WiFi user without the user's knowledge.

    Hi, can someone help me to disable a user especially wifi?

    Hello

    Can someone guide me how disable or disconnect a specific user of WiFi for laptop user and Mobile WiFi user without the user's knowledge.

    Because I gave the WiFi setting for the particular user who uses more bandwidth. So, I need to disable his WiFi without his knowledge

    I need help on this

    Thanks in advance

    Waiting for a good and simple suggestion

    Change the WPA2 password on your wireless access point and tell them what it is.

  • code 80090006 error, problem is preventing windows to check exactly the license for this computer. Then you disconnects to the user menu.

    Have window xp error. A problem is preventing windows to check exactly the license for this computer. error code 0 x 80090006. Then it disconnects you return to the screen of the user menu.

    Error code 0 x 80090006

    This problem occurs because the drive letter has changed or that some files can be found in default locations.

    See: http://support.microsoft.com/kb/914232

    You may receive error code 0 x 80004005 and other error codes when you try to start a Windows XP-based computer

    When you try to start a Microsoft Windows XP-based computer, you may receive an error message that contains different error codes. This article describes the causes of the different error codes. This article also provides workarounds for the following error codes:

    • Error code 0x80004005
    • Error code 0 x 80090006
    • 0x8009001d error code
    • Error code 0 x 80070002
    • Error 0x8007007f code or code error 0x8007007e
    • 0x800705aa error code 0x8007007e error code and error code 0x80004005
    • 0x800705aa, error code 0 error code 80070002 x, error code 0x80004005, 0x800405aa error code and error code 0 x 80090019
    • 0x800703e7 error code

    Additionally, this article contains workarounds for some error codes that aren't in this list.

    etc.

    TaurArian [MVP] 2005-2011 - Update Services

  • Phone call and dial a number without confirmation to the user

    Hi Forum,

    I am trying to initiate a phone call from a Webworks HTML5 app. I don't want to use something like ... because it shows a confirmation dialog box that must be confirmed on the phone. I want to start the call with no other user interaction. Is this possible with the Webworks framework?

    This is my code:

    function docall() {
        blackberry.invoke.invoke(
            {
                type: "application/vnd.blackberry.phone.startcall",
                action: "bb.action.DIAL",
                data: "{'number': '0123456789'}"
            },
            onSuccess,
            onError
        );
    }
    
    function onSuccess() {
        console.log("Success");
    }
    
    function onError(error) {
        console.log("Error: " + error);
    }
    

    I tried a few alternatives for the attribute data as it send via the uri attribute:
    URI: ' data : //local?number=0123456789.

    Nothing really works. The onSuccess callback is called and it opens from the phone app, but no number is dialled. It shows just the last calls (probably because it's the first screen of the phone app).

    Is there something left? Can a webworks app dial without the intervention of the user more away?

    I am aware that the user must confirm a phone call. Otherwise, a developer could have the user dial any phone number they wanted.

  • Call the action when the user clicks on notification of hub

    I wish that my application to call directly when a user clicks on a notification of hub (as with BBM messages).

    Is it possible, or BBM is a special case?  Currently, I have it so there is a button 'open' on the notification of hub, but that is not optimal.

    No, it only is not supported today.

  • Call functions of qml in main.qml of a part of the user interface of the part without application head.

    Hi all;

    I wanted that my application runs in the background (Headless) but first encountered several problems, calculation are qml functions (in main.qml: updateUi() with call javascript *.js files), who should I call their headless part when the part of the user interface is closed by the user? Please help me if you have any solution.

    Thank you very much.

    identify what treatment you need for the game without head and migrate to c + c++ / Qt.

Maybe you are looking for

  • What data is stored online my Palm Pre?

    Hi all I wonder what data are stored exactly on my Palm profile? How is data protected? Y at - it a sequel to disable this option? I feel not comfortable to have confidential information possibly floating somewhere. Thank you! Sapag

  • How to sync the button in the mainVI with a Subvi round?

    (1) son? (2) global variable? ================ I want to stop some programs in Subvi execution by pressing the button in the mainVI. How to connect the button in the mainVI with a Subvi round? (1) son? It does work if I connect the button with the cy

  • Albums AES Mic

    Hi, currently I'm under my double Sony DWR S01D receiver in channel 1 of my F5 with AES on. This works great except when I want to use my micro page. I expected to plug in my microphone on channel two and run 3/4, but because it is not AES, it won't

  • THE PC SE BEGINS SOLA

    I have a problema don't con mi PC, restaurando el sistema estaba a UN punto anterior y al apagarse is starts sola y no carga ayuda por favor, tampoco puedo iniciar reparando el equipo nor con el modo seguro aguardo responses gracias

  • Reinstall XP Professional Retail with the XP Professional SP2 retail installation CD

    I'm going to build a new PC and I'll dismantle an old PC and re-use XP from this PC to the new PC. The problem is that the old PC installation CD is Windows XP Professional Retail without any service packs. I would like to avoid having to install all