Skip to content

Commit 27020c1

Browse files
committed
Merge branch 'develop'
2 parents dc4b10d + ca46e53 commit 27020c1

File tree

19 files changed

+59
-330
lines changed

19 files changed

+59
-330
lines changed

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Android Dynamic Loader
2+
3+
Android Dynamic Loader is a plugin system. The host application is like a browser, but instead of load web pages, it load plugins which runs natively on Android system.
4+
5+
You can download the demo from <https://github.com/mmin18/AndroidDynamicLoader/raw/master/host.apk>
6+
7+
## How to run the sample plugins
8+
9+
The sample plugins is under **workspace** folder, but do not try to run them directly, it won't start.
10+
11+
First you need to install **host.apk** on your phone (or you can build the Host project yourself)
12+
13+
Also you need to make sure the Android SDK and Ant is installed and android-sdk/tools, android-sdk/platform-tools, ant is in your **PATH**.
14+
15+
Run the following commands:
16+
17+
chmod +x tools/update.sh
18+
tools/update.sh workspace
19+
cd workspace
20+
ant run
21+
22+
If it shows "device not found", make sure your phone is connected or simulator is running. "adb devices" will tell.
23+
24+
Since we don't specific a default entry in **workspace.properties**, it will popup a window and let you choose one. I suggest bitmapfun.
25+
26+
## About URL Mapping
27+
28+
// TODO:
29+
30+
## Folders
31+
32+
**/Host** contains the host application (build as host.apk).
33+
34+
**/tools/update.sh** checks your environment and helps you config your plugins. You should always run it once after git clone or create a new plugin.
35+
36+
**/workspace/sample.helloworld** is a most simple plugin.
37+
**/workspace/sample.helloworld/fragment.properties** defines the url mapping of your fragments.
38+

tools/update.sh

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,20 @@
1-
BASEDIR=$(dirname $0)
2-
java -cp ${BASEDIR}/lib/anttasks.jar com.dianping.ant.UpdateProject ${BASEDIR} $*
1+
#!/bin/bash
2+
3+
# check the environment
4+
which adb &>/dev/null
5+
[ $? -eq 0 ] || { echo "adb command not found."; exit 1; }
6+
7+
which android &>/dev/null
8+
[ $? -eq 0 ] || { echo "android command not found."; exit 1; }
9+
10+
which ant &>/dev/null
11+
[ $? -eq 0 ] || { echo "ant command not found."; exit 1; }
12+
13+
14+
if [ $# -eq 1 ]; then
15+
BASEDIR=$(dirname $0)
16+
java -cp ${BASEDIR}/lib/anttasks.jar com.dianping.ant.UpdateProject ${BASEDIR} $*
17+
else
18+
echo "update.sh useage:"
19+
echo " update.sh <workspace or project>"
20+
fi
1012 Bytes
Binary file not shown.
1012 Bytes
Binary file not shown.
1012 Bytes
Binary file not shown.

workspace/sample.home/.classpath

Lines changed: 0 additions & 9 deletions
This file was deleted.

workspace/sample.home/.project

Lines changed: 0 additions & 33 deletions
This file was deleted.

workspace/sample.home/.settings/org.eclipse.jdt.core.prefs

Lines changed: 0 additions & 4 deletions
This file was deleted.

workspace/sample.home/AndroidManifest.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.

workspace/sample.home/build.xml

Lines changed: 0 additions & 92 deletions
This file was deleted.

0 commit comments

Comments
 (0)