本文整理汇总了Java中android.os.DeadObjectException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java DeadObjectException.printStackTrace方法的具体用法?Java DeadObjectException.printStackTrace怎么用?Java DeadObjectException.printStackTrace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.os.DeadObjectException
的用法示例。
在下文中一共展示了DeadObjectException.printStackTrace方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: stop
import android.os.DeadObjectException; //导入方法依赖的package包/类
public void stop(){
/**
* Unbinds from the service. Should be called when the client app does not need this class anymore.
*/
Log.i("REMOTE_HANDLER", "stopping client");
if(isBound) {
if (mRemoteService != null) {
try {
mRemoteService.unregisterCallback(mCallback);
} catch (DeadObjectException de){
de.printStackTrace();
} catch (RemoteException e) {
// There is nothing special we need to do if the service
// has crashed.
}
}
context.unbindService(mRemoteServiceConnection);
isBound = false;
}
snachServiceEvent.onServiceDisconnected();
}
示例2: sendTest
import android.os.DeadObjectException; //导入方法依赖的package包/类
public void sendTest(){
Message msg = Message.obtain();
Bundle bundle = new Bundle();
bundle.putString (Constants.treatmentService.ACTION, Constants.treatmentService.OUTGOING_TEST_MSG);
bundle.putLong (Constants.treatmentService.DATE_REQUESTED, new Date().getTime());
bundle.putString (Constants.treatmentService.PUMP, "");
msg.setData(bundle);
try {
pump_driver_Service.send(msg);
} catch (DeadObjectException d){
Crashlytics.logException(d);
d.printStackTrace();
} catch (RemoteException e) {
Crashlytics.logException(e);
e.printStackTrace();
}
}
示例3: onButtonPressed
import android.os.DeadObjectException; //导入方法依赖的package包/类
@Override
public void onButtonPressed(int BUTTON_ID) {
try {
serviceCallback.OnButtonPressed(BUTTON_ID);
} catch (DeadObjectException de) {
de.printStackTrace();
}catch (RemoteException e) {
e.printStackTrace();
}
}
示例4: unbindAllClients
import android.os.DeadObjectException; //导入方法依赖的package包/类
private void unbindAllClients(){
if(serviceCallback != null){
try {
serviceCallback.StopClient();
} catch (DeadObjectException de){
de.printStackTrace();
} catch (RemoteException re){
re.printStackTrace();
}
}
}
示例5: sendAppContent
import android.os.DeadObjectException; //导入方法依赖的package包/类
public void sendAppContent(ListAppContentItem appContentItem){
try {
mRemoteService.setUpListAppContent(appContentItem);
} catch (DeadObjectException de){
de.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
}
}
示例6: sendPopUpContent
import android.os.DeadObjectException; //导入方法依赖的package包/类
public void sendPopUpContent(PopUpContentItem popUpContentItem){
try {
mRemoteService.setUpPopUpContent(popUpContentItem);
} catch (DeadObjectException de){
de.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
}
}