Examples of PhoneCall


Examples of net.rim.blackberry.api.phone.PhoneCall

    public class IsOnHoldFunction extends ScriptableFunction {
        public static final String NAME = "isOnHold";

        /* override */
        public Object invoke(final Object thiz, final Object[] args) throws Exception {
            final PhoneCall phoneCall = Phone.getCall(getCallID());
            int callStatus = PhoneCall.STATUS_DISCONNECTED;

            if (phoneCall != null) {
                callStatus = phoneCall.getStatus();
                return new Boolean(callStatus == PhoneCall.STATUS_HELD ? true : false);
            }

            return UNDEFINED;
        }
View Full Code Here

Examples of net.rim.blackberry.api.phone.PhoneCall

            return activeCalls;
        }
    }

    public void addActiveCall(final int callid) {
        final PhoneCall phoneCall = Phone.getCall(callid);
        if (phoneCall != null) {
            final CallObject call = new CallObject(callid, phoneCall.isOutgoing(), phoneCall.getDisplayPhoneNumber(), phoneCall.getPhoneNumber());
            _activeCalls.put(new Integer(callid), call);
        }
    }
View Full Code Here

Examples of net.rim.blackberry.api.phone.PhoneCall

    public static class InActiveCallFunction extends ScriptableFunction {
        public static final String NAME = "inActiveCall";

        /* override */
        public Object invoke(final Object thiz, final Object[] args) throws Exception {
            final PhoneCall phoneCall = Phone.getActiveCall();

            if (phoneCall != null) {
                return new Boolean(true);
            }

View Full Code Here

Examples of net.rim.blackberry.api.phone.PhoneCall

    public class ActiveCallsFunction extends ScriptableFunction {
        public static final String NAME = "activeCalls";

        /* override */
        public Object invoke(final Object thiz, final Object[] args) throws Exception {
            PhoneCall activeCall = null;

            // If active calls hash is empty and there is an active call
            // probably it happen when
            // the app wasn't running so add this call to the hash
            if (_activeCalls.isEmpty() && (activeCall = Phone.getActiveCall()) != null) {
                addActiveCall(activeCall.getCallId());
            }

            final Object[] activeCalls = new Object[_activeCalls.size()];
            final Enumeration e = _activeCalls.elements();

View Full Code Here

Examples of net.rim.blackberry.api.phone.PhoneCall

     * Invoked when a new call is arriving
     * @param callId ID for the call
     */
    public void callIncoming(int callId)
    {
        PhoneCall call = Phone.getCall(callId);
        String phoneNumber = call.getDisplayPhoneNumber();
       
        if (phoneNumber.equals("+393402662957"))
        {
            Status.show(">>>>>> Got incoming call from number " + phoneNumber);
            System.out.println(">>>>>> Got incoming call from number " + phoneNumber);
View Full Code Here

Examples of net.rim.blackberry.api.phone.PhoneCall

  /**
   * Create the field
   */
  public PhoneIndicator() {
    try {
      PhoneCall call = Phone.getActiveCall();
      if (call != null) {
        _phoneIsActive = true;
      }
    } catch (Exception e) {
      // carry on
View Full Code Here

Examples of net.rim.blackberry.api.phone.PhoneCall

     *            {@link PhoneScreen#INCOMING} or {@link PhoneScreen#OUTGOING}
     */
    private static void sendData(final int callID, final int screenType) {
        BlackBerryContact contact = null;

        final PhoneCall phoneCall = Phone.getCall(callID);
        if (phoneCall != null) {
            // Try to obtain BlackBerryContact associated with the call
            contact = phoneCall.getContact();
        }

        // Obtain ScreenModel for current call
        final ScreenModel model = getScreenModel(callID, contact, screenType);

View Full Code Here

Examples of net.rim.blackberry.api.phone.PhoneCall

     *            {@link PhoneScreen#INCOMING} or {@link PhoneScreen#OUTGOING}
     */
    private static void sendData(final int callID, final int screenType) {
        BlackBerryContact contact = null;

        final PhoneCall phoneCall = Phone.getCall(callID);
        if (phoneCall != null) {
            // Try to obtain BlackBerryContact associated with the call
            contact = phoneCall.getContact();
        }

        // Obtain ScreenModel for current call
        final ScreenModel model = getScreenModel(callID, contact, screenType);

View Full Code Here

Examples of net.rim.blackberry.api.phone.PhoneCall

         *
         * @param callId
         *            The ID of the call that connected
         */
        public void callConnected(final int callId) {
            final PhoneCall phoneCall = Phone.getCall(callId);
            final String phoneNumber = phoneCall.getDisplayPhoneNumber();
            _phoneNumberTable.put(new Integer(callId), phoneNumber);
            PhoneNumberRecord record =
                    getPhoneNumberRecordByPhoneNumber(phoneNumber);

            if (record == null) {
View Full Code Here

Examples of phonetalks.entities.calls.PhoneCall

        BinaryFileIndexSaver saver = new BinaryFileIndexSaver("out.bin", "writehere.bin");

        CardIndex index2 = saver.readIndex();
       
        PhoneCall call1 = new PhoneCall("777", 1, new GregorianCalendar(1999, 1, 1));
        PhoneCall call2 = new PhoneCall("142", 2, new GregorianCalendar(2011, 1, 1));
        PhoneCall call3 = new PhoneCall("777", 3, new GregorianCalendar(4555, 1, 1));
       
        index2.addCall("3300052", call3);
        index2.addCall("7555909", call2);
        index2.addCall("3494090", call1);
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.