Skip to content

Commit fed1cca

Browse files
committed
Service AIDL Project Add
1 parent cfeac23 commit fed1cca

32 files changed

Lines changed: 837 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.fendou.activity"
4+
android:versionCode="1"
5+
android:versionName="1.0" >
6+
7+
<uses-sdk android:minSdkVersion="10" />
8+
9+
<application
10+
android:icon="@drawable/ic_launcher"
11+
android:label="@string/app_name" >
12+
<activity
13+
android:name=".MainActivity"
14+
android:label="@string/app_name" >
15+
<intent-filter>
16+
<action android:name="android.intent.action.MAIN" />
17+
18+
<category android:name="android.intent.category.LAUNCHER" />
19+
</intent-filter>
20+
</activity>
21+
</application>
22+
23+
</manifest>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/** Automatically generated file. DO NOT MODIFY */
2+
package com.fendou.activity;
3+
4+
public final class BuildConfig {
5+
public final static boolean DEBUG = true;
6+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/* AUTO-GENERATED FILE. DO NOT MODIFY.
2+
*
3+
* This class was automatically generated by the
4+
* aapt tool from the resource data it found. It
5+
* should not be modified by hand.
6+
*/
7+
8+
package com.fendou.activity;
9+
10+
public final class R {
11+
public static final class attr {
12+
}
13+
public static final class drawable {
14+
public static final int ic_launcher=0x7f020000;
15+
}
16+
public static final class id {
17+
public static final int bound_service_button=0x7f050000;
18+
public static final int clear_text_textview=0x7f050002;
19+
public static final int getmethod_from_service_button=0x7f050001;
20+
public static final int showresult_textview=0x7f050004;
21+
public static final int unbound_service_button=0x7f050003;
22+
}
23+
public static final class layout {
24+
public static final int main=0x7f030000;
25+
}
26+
public static final class string {
27+
public static final int app_name=0x7f040001;
28+
public static final int hello=0x7f040000;
29+
}
30+
}
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
/*
2+
* This file is auto-generated. DO NOT MODIFY.
3+
* Original file: D:\\AndroidWorkSpace\\AndroidBlog\\03_AndroidAIDL_Client_Blog\\src\\com\\fendou\\aidl\\MyIPerson.aidl
4+
*/
5+
package com.fendou.aidl;
6+
public interface MyIPerson extends android.os.IInterface
7+
{
8+
/** Local-side IPC implementation stub class. */
9+
public static abstract class Stub extends android.os.Binder implements com.fendou.aidl.MyIPerson
10+
{
11+
private static final java.lang.String DESCRIPTOR = "com.fendou.aidl.MyIPerson";
12+
/** Construct the stub at attach it to the interface. */
13+
public Stub()
14+
{
15+
this.attachInterface(this, DESCRIPTOR);
16+
}
17+
/**
18+
* Cast an IBinder object into an com.fendou.aidl.MyIPerson interface,
19+
* generating a proxy if needed.
20+
*/
21+
public static com.fendou.aidl.MyIPerson asInterface(android.os.IBinder obj)
22+
{
23+
if ((obj==null)) {
24+
return null;
25+
}
26+
android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
27+
if (((iin!=null)&&(iin instanceof com.fendou.aidl.MyIPerson))) {
28+
return ((com.fendou.aidl.MyIPerson)iin);
29+
}
30+
return new com.fendou.aidl.MyIPerson.Stub.Proxy(obj);
31+
}
32+
@Override public android.os.IBinder asBinder()
33+
{
34+
return this;
35+
}
36+
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
37+
{
38+
switch (code)
39+
{
40+
case INTERFACE_TRANSACTION:
41+
{
42+
reply.writeString(DESCRIPTOR);
43+
return true;
44+
}
45+
case TRANSACTION_getPerson:
46+
{
47+
data.enforceInterface(DESCRIPTOR);
48+
com.fendou.aidl.Person _arg0;
49+
if ((0!=data.readInt())) {
50+
_arg0 = com.fendou.aidl.Person.CREATOR.createFromParcel(data);
51+
}
52+
else {
53+
_arg0 = null;
54+
}
55+
java.lang.String _result = this.getPerson(_arg0);
56+
reply.writeNoException();
57+
reply.writeString(_result);
58+
return true;
59+
}
60+
}
61+
return super.onTransact(code, data, reply, flags);
62+
}
63+
private static class Proxy implements com.fendou.aidl.MyIPerson
64+
{
65+
private android.os.IBinder mRemote;
66+
Proxy(android.os.IBinder remote)
67+
{
68+
mRemote = remote;
69+
}
70+
@Override public android.os.IBinder asBinder()
71+
{
72+
return mRemote;
73+
}
74+
public java.lang.String getInterfaceDescriptor()
75+
{
76+
return DESCRIPTOR;
77+
}
78+
@Override public java.lang.String getPerson(com.fendou.aidl.Person mPerson) throws android.os.RemoteException
79+
{
80+
android.os.Parcel _data = android.os.Parcel.obtain();
81+
android.os.Parcel _reply = android.os.Parcel.obtain();
82+
java.lang.String _result;
83+
try {
84+
_data.writeInterfaceToken(DESCRIPTOR);
85+
if ((mPerson!=null)) {
86+
_data.writeInt(1);
87+
mPerson.writeToParcel(_data, 0);
88+
}
89+
else {
90+
_data.writeInt(0);
91+
}
92+
mRemote.transact(Stub.TRANSACTION_getPerson, _data, _reply, 0);
93+
_reply.readException();
94+
_result = _reply.readString();
95+
}
96+
finally {
97+
_reply.recycle();
98+
_data.recycle();
99+
}
100+
return _result;
101+
}
102+
}
103+
static final int TRANSACTION_getPerson = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
104+
}
105+
public java.lang.String getPerson(com.fendou.aidl.Person mPerson) throws android.os.RemoteException;
106+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# To enable ProGuard in your project, edit project.properties
2+
# to define the proguard.config property as described in that file.
3+
#
4+
# Add project specific ProGuard rules here.
5+
# By default, the flags in this file are appended to flags specified
6+
# in ${sdk.dir}/tools/proguard/proguard-android.txt
7+
# You can edit the include path and order by changing the ProGuard
8+
# include property in project.properties.
9+
#
10+
# For more details, see
11+
# http://developer.android.com/guide/developing/tools/proguard.html
12+
13+
# Add any project specific keep options here:
14+
15+
# If your project uses WebView with JS, uncomment the following
16+
# and specify the fully qualified class name to the JavaScript interface
17+
# class:
18+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19+
# public *;
20+
#}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This file is automatically generated by Android Tools.
2+
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3+
#
4+
# This file must be checked in Version Control Systems.
5+
#
6+
# To customize properties used by the Ant build system edit
7+
# "ant.properties", and override values to adapt the script to your
8+
# project structure.
9+
#
10+
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11+
#proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt
12+
13+
# Project target.
14+
target=android-14
9.18 KB
Loading
2.67 KB
Loading
5.11 KB
Loading
14 KB
Loading

0 commit comments

Comments
 (0)