Example usage for android.os RemoteException printStackTrace

List of usage examples for android.os RemoteException printStackTrace

Introduction

In this page you can find the example usage for android.os RemoteException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:com.omniwearhaptics.api.OmniWearHelper.java

public void disconnect() {

    if (mOmniWearInterface != null) {
        try {//from  ww  w  .  java2 s.c  o  m
            mOmniWearInterface.disconnect();
        } catch (RemoteException e) {
            e.printStackTrace();
        }
    }
}

From source file:com.omniwearhaptics.api.OmniWearHelper.java

public void searchForOmniWearDevice() {

    if (mOmniWearInterface != null) {
        try {//from  w  w  w.  j  av  a 2  s .co m
            mOmniWearInterface.searchForOmniWearDevice();
        } catch (RemoteException e) {
            e.printStackTrace();
        }
    }
}

From source file:com.omniwearhaptics.api.OmniWearHelper.java

public void connectToKnownDevice(String deviceMAC) {

    if (mOmniWearInterface != null) {
        try {/*from  w  w w . j av a 2  s  . c  om*/
            mOmniWearInterface.connectToKnownDevice(deviceMAC);
        } catch (RemoteException e) {
            e.printStackTrace();
        }
    }
}

From source file:com.omniwearhaptics.api.OmniWearHelper.java

public void setMotor(byte motorId, byte intensity) {

    if (mOmniWearInterface != null) {
        try {/*from w  ww  .ja va  2s. c o  m*/
            mOmniWearInterface.setMotor(motorId, intensity);
        } catch (RemoteException e) {
            e.printStackTrace();
        }
    }
}

From source file:com.morlunk.mumbleclient.channel.actionmode.ChannelActionModeCallback.java

@Override
public boolean onActionItemClicked(ActionMode actionMode, MenuItem menuItem) {
    boolean adding = false;
    switch (menuItem.getItemId()) {
    case R.id.context_channel_join:
        try {//from  w  w  w .j  av  a 2 s.  c o m
            mService.joinChannel(mChannel.getId());
        } catch (RemoteException e) {
            e.printStackTrace();
        }
        break;
    case R.id.context_channel_add:
        adding = true;
    case R.id.context_channel_edit:
        ChannelEditFragment addFragment = new ChannelEditFragment();
        Bundle args = new Bundle();
        if (adding)
            args.putInt("parent", mChannel.getId());
        else
            args.putInt("channel", mChannel.getId());
        args.putBoolean("adding", adding);
        addFragment.setArguments(args);
        addFragment.show(mFragmentManager, "ChannelAdd");
        break;
    case R.id.context_channel_remove:
        AlertDialog.Builder adb = new AlertDialog.Builder(mContext);
        adb.setTitle(R.string.confirm);
        adb.setMessage(R.string.confirm_delete_channel);
        adb.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                try {
                    mService.removeChannel(mChannel.getId());
                } catch (RemoteException e) {
                    e.printStackTrace();
                }
            }
        });
        adb.setNegativeButton(android.R.string.cancel, null);
        adb.show();
        break;
    case R.id.context_channel_view_description:
        Bundle commentArgs = new Bundle();
        commentArgs.putInt("channel", mChannel.getId());
        commentArgs.putString("comment", mChannel.getDescription());
        commentArgs.putBoolean("editing", false);
        DialogFragment commentFragment = (DialogFragment) Fragment.instantiate(mContext,
                ChannelDescriptionFragment.class.getName(), commentArgs);
        commentFragment.show(mFragmentManager, ChannelDescriptionFragment.class.getName());
        break;
    case R.id.context_channel_pin:
        try {
            long serverId = mService.getConnectedServer().getId();
            boolean pinned = mDatabase.isChannelPinned(serverId, mChannel.getId());
            if (!pinned)
                mDatabase.addPinnedChannel(serverId, mChannel.getId());
            else
                mDatabase.removePinnedChannel(serverId, mChannel.getId());
        } catch (RemoteException e) {
            e.printStackTrace();
        }
        break;
    }
    actionMode.finish();
    return true;
}

From source file:com.omniwearhaptics.api.OmniWearHelper.java

public int getConnectedDeviceType() {

    if (mOmniWearInterface != null) {
        try {/*from  w  w  w . j a va 2s  .c  om*/
            return mOmniWearInterface.getConnectedDeviceType();
        } catch (RemoteException e) {
            e.printStackTrace();
        }
    }
    return DEVICETYPE_ERROR;
}

From source file:com.omniwearhaptics.api.OmniWearHelper.java

public String getConnectedDeviceMAC() {

    if (mOmniWearInterface != null) {
        try {//from  w  w w  . j  a va 2  s .  c o m
            return mOmniWearInterface.getConnectedDeviceMAC();
        } catch (RemoteException e) {
            e.printStackTrace();
        }
    }
    return "";
}

From source file:com.omniwearhaptics.api.OmniWearHelper.java

private void permissionsCheck() {

    if (ContextCompat.checkSelfPermission(mParent,
            Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
        try {/*from  www . j  a  va  2s. com*/
            mCallback.onOmniWearEvent(EVENT_NO_PERMISSION);
        } catch (RemoteException e) {
            e.printStackTrace();
        }
    }
}

From source file:org.trace.tracker.Tracker.java

private void sendRequest(Message msg) {

    try {/*from   w  ww.  j a  v a2  s . com*/
        mMessenger.send(msg);
    } catch (RemoteException e) {
        e.printStackTrace();
    }
}

From source file:com.chatwing.whitelabel.services.NotificationIntentService.java

private void insertNotificationMessagesToDb(Message[] messages) {
    ArrayList<ContentProviderOperation> batch = new ArrayList<ContentProviderOperation>();
    Uri notificationMessagesUri = ChatWingContentProvider.getNotificationMessagesUri();
    ContentValues values;// ww w  .j a va  2 s. c o m

    for (Message message : messages) {
        values = NotificationMessagesTable.getContentValues(message);
        batch.add(ContentProviderOperation.newInsert(notificationMessagesUri).withValues(values).build());
    }

    try {
        getContentResolver().applyBatch(ChatWingContentProvider.AUTHORITY, batch);
    } catch (RemoteException e) {
        e.printStackTrace();
    } catch (OperationApplicationException e) {
        e.printStackTrace();
    }
}