資源簡介
項目中使用的一個獲取天氣的demo,是基于volly庫,利用雅虎API接口獲取的天氣,流程是先獲取到本地IP,反查出城市,可以是海外城市,然后通過雅虎接口獲取天氣,支持7天天氣查詢,歡迎大家下載使用。

代碼片段和文件信息
/*
?*?This?file?is?auto-generated.??DO?NOT?MODIFY.
?*?Original?file:?E:\\new_workspace\\weather_test\\src\\com\\test\\aidl\\IRemoteInterface.aidl
?*/
package?com.test.aidl;
public?interface?IRemoteInterface?extends?android.os.IInterface
{
/**?Local-side?IPC?implementation?stub?class.?*/
public?static?abstract?class?Stub?extends?android.os.Binder?implements?com.test.aidl.IRemoteInterface
{
private?static?final?java.lang.String?DEscriptOR?=?“com.test.aidl.IRemoteInterface“;
/**?Construct?the?stub?at?attach?it?to?the?interface.?*/
public?Stub()
{
this.attachInterface(this?DEscriptOR);
}
/**
?*?Cast?an?IBinder?object?into?an?com.test.aidl.IRemoteInterface?interface
?*?generating?a?proxy?if?needed.
?*/
public?static?com.test.aidl.IRemoteInterface?asInterface(android.os.IBinder?obj)
{
if?((obj==null))?{
return?null;
}
android.os.IInterface?iin?=?obj.queryLocalInterface(DEscriptOR);
if?(((iin!=null)&&(iin?instanceof?com.test.aidl.IRemoteInterface)))?{
return?((com.test.aidl.IRemoteInterface)iin);
}
return?new?com.test.aidl.IRemoteInterface.Stub.Proxy(obj);
}
@Override?public?android.os.IBinder?asBinder()
{
return?this;
}
@Override?public?boolean?onTransact(int?code?android.os.Parcel?data?android.os.Parcel?reply?int?flags)?throws?android.os.RemoteException
{
switch?(code)
{
case?INTERFACE_TRANSACTION:
{
reply.writeString(DEscriptOR);
return?true;
}
case?TRANSACTION_getPid:
{
data.enforceInterface(DEscriptOR);
int?_result?=?this.getPid();
reply.writeNoException();
reply.writeInt(_result);
return?true;
}
case?TRANSACTION_getData:
{
data.enforceInterface(DEscriptOR);
int?_result?=?this.getData();
reply.writeNoException();
reply.writeInt(_result);
return?true;
}
case?TRANSACTION_registerCallback:
{
data.enforceInterface(DEscriptOR);
com.test.aidl.IRemoteInterfaceCallback?_arg0;
_arg0?=?com.test.aidl.IRemoteInterfaceCallback.Stub.asInterface(data.readStrongBinder());
this.registerCallback(_arg0);
reply.writeNoException();
return?true;
}
case?TRANSACTION_unregisterCallback:
{
data.enforceInterface(DEscriptOR);
com.test.aidl.IRemoteInterfaceCallback?_arg0;
_arg0?=?com.test.aidl.IRemoteInterfaceCallback.Stub.asInterface(data.readStrongBinder());
this.unregisterCallback(_arg0);
reply.writeNoException();
return?true;
}
}
return?super.onTransact(code?data?reply?flags);
}
private?static?class?Proxy?implements?com.test.aidl.IRemoteInterface
{
private?android.os.IBinder?mRemote;
Proxy(android.os.IBinder?remote)
{
mRemote?=?remote;
}
@Override?public?android.os.IBinder?asBinder()
{
return?mRemote;
}
public?java.lang.String?getInterfaceDescriptor()
{
return?DEscriptOR;
}
//獲取Service運行的進(jìn)程ID
@Override?public?int?getPid()?throws?android.os.RemoteException
{
android.os.Parcel?_data?=?android.os.Parcel.obtain();
android.os.Parcel?_reply?=?android.os.Parcel.obtain();
int?_result;
try?{
_data.writeInterfaceToken(DEscriptOR);
mRemote.transact(Stub.TRANSACTION_getPid?_data?_reply?0);
_reply.readException();
_result?=?_reply.readInt();
}
finally?{
_reply.recycle();
_d
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????475??2016-06-14?13:41??weather_test\.classpath
?????文件????????848??2016-06-14?13:40??weather_test\.project
?????文件???????2182??2016-07-15?09:55??weather_test\AndroidManifest.xm
?????文件????????118??2016-08-16?16:38??weather_test\bin\aidl\com\test\aidl\abc.aidl
?????文件????????494??2016-08-16?16:37??weather_test\bin\aidl\com\test\aidl\IRemoteInterface.aidl
?????文件????????259??2016-08-16?16:37??weather_test\bin\aidl\com\test\aidl\IRemoteInterfaceCallback.aidl
?????文件???????2182??2016-08-16?16:37??weather_test\bin\AndroidManifest.xm
?????文件???????2568??2017-08-17?19:04??weather_test\bin\classes\com\test\aidl\IRemoteInterface$Stub$Proxy.class
?????文件???????2550??2017-08-17?19:04??weather_test\bin\classes\com\test\aidl\IRemoteInterface$Stub.class
?????文件????????494??2016-07-14?17:35??weather_test\bin\classes\com\test\aidl\IRemoteInterface.aidl
?????文件????????463??2017-08-17?19:04??weather_test\bin\classes\com\test\aidl\IRemoteInterface.class
?????文件???????1741??2017-08-17?19:04??weather_test\bin\classes\com\test\aidl\IRemoteInterfaceCallback$Stub$Proxy.class
?????文件???????2028??2017-08-17?19:04??weather_test\bin\classes\com\test\aidl\IRemoteInterfaceCallback$Stub.class
?????文件????????259??2016-07-15?10:41??weather_test\bin\classes\com\test\aidl\IRemoteInterfaceCallback.aidl
?????文件????????402??2017-08-17?19:04??weather_test\bin\classes\com\test\aidl\IRemoteInterfaceCallback.class
?????文件???????1550??2017-08-17?19:04??weather_test\bin\classes\com\test\aidl\MainActivity$1.class
?????文件???????2223??2017-08-17?19:04??weather_test\bin\classes\com\test\aidl\MainActivity$2.class
?????文件???????1939??2017-08-17?19:04??weather_test\bin\classes\com\test\aidl\MainActivity$3.class
?????文件???????6060??2017-08-17?19:04??weather_test\bin\classes\com\test\aidl\MainActivity.class
?????文件???????2483??2017-08-17?19:04??weather_test\bin\classes\com\test\aidl\RemoteService$1.class
?????文件???????1302??2017-08-17?19:04??weather_test\bin\classes\com\test\aidl\RemoteService$2$1.class
?????文件???????2690??2017-08-17?19:04??weather_test\bin\classes\com\test\aidl\RemoteService$2.class
?????文件????????859??2017-08-17?19:04??weather_test\bin\classes\com\test\aidl\RemoteService$3.class
?????文件???????3785??2017-08-17?19:04??weather_test\bin\classes\com\test\aidl\RemoteService$4.class
?????文件????????885??2017-08-17?19:04??weather_test\bin\classes\com\test\aidl\RemoteService$5.class
?????文件???????1188??2017-08-17?19:04??weather_test\bin\classes\com\test\aidl\RemoteService$6.class
?????文件????????911??2017-08-17?19:04??weather_test\bin\classes\com\test\aidl\RemoteService$7.class
?????文件???????9044??2017-08-17?19:04??weather_test\bin\classes\com\test\aidl\RemoteService.class
?????文件????????341??2017-08-17?19:04??weather_test\bin\classes\com\test\weather\BuildConfig.class
?????文件???????1990??2017-08-17?19:04??weather_test\bin\classes\com\test\weather\IpUtil$1.class
............此處省略113個文件信息
評論
共有 條評論