我正在尝试实现一个应用程序来发送,接收和解析Android上的USSD代码.到目前为止,我使用http://commandus.com/blog/?p=58上的代码来获得此功能.为了使服务正常工作,需要重新启动手机.这在用户第一次安装应用程序时不会出现问题,但我在仿真器上测试时注意到的是,即使服务没什么新功能,手机也需要在每次更新时重新启动.我想知道的是以下内容:
作为参考,我已经包含了我用于服务的代码,因为界面部分与原始网站上发布的代码不同.
接口:
* This file is auto-generated. DO NOT MODIFY.
package com.android.internal.telephony;
/**
* Interface used to interact with extended MMI/USSD network service.
*/
public interface IExtendedNetworkService extends android.os.IInterface {
/** Local-side IPC implementation stub class. */
public static abstract class Stub extends android.os.Binder implements
com.android.internal.telephony.IExtendedNetworkService {
private static final java.lang.String DESCRIPTOR = "com.android.internal.telephony.IExtendedNetworkService";
/** Construct the stub at attach it to the interface. */
public Stub() {
this.attachInterface(this, DESCRIPTOR);
}
/**
* Cast an …Run Code Online (Sandbox Code Playgroud)