将cantk runtime嵌入到现有的APP中
来源:互联网 发布:部落冲突九本满防数据 编辑:程序博客网 时间:2024/04/30 13:22
1,先取cantk-runtime-demos到本地:
git clone https://github.com/drawapp8/cantk-runtime-demos
2,创建一个Android App(或者拷贝现有的项目):
cd cantk-runtime-demosandroid create project -n MyApp -k com.demo -a MyAppActivity -p ./MyApp -t cd MyApp
3,合并phonegap和cantk-runtime相关文件。
GAMERUNNER=../GameRunner/platforms/androidmkdir -p assetscp -rvf $GAMERUNNER/libs .cp -rvf $GAMERUNNER/src/* src/.cp -arvf $GAMERUNNER/res/xml rescp -arvf $GAMERUNNER/assets/www assets/cp -rfv $GAMERUNNER/CordovaLib/src/* src/.rm -rf assets/www/cordova-js-src/
4,修改AndroidManifest.xml,增加activity
<activity android:name="com.tangide.GameRunnerActivity" android:label="@string/app_name"></activity>
5,启动GameRunnerActivity
import com.tangide.GameRunnerActivity;...Intent intent = new Intent();Bundle bundle = new Bundle(); intent.setClass(EmbedDemoActivity.this, GameRunnerActivity.class);bundle.putString("url", "file:///mnt/sdcard-ext/cantk-rt-root/game1/index.html");intent.putExtras(bundle);startActivity(intent);
(请把游戏放在SDCARD中,路径与上面指定的URL一致, EmbedDemo/examples/里有测试游戏)
6,编译安装
ant debugadb install -r bin/MyApp-debug.apk
如果编译不过,请修改project.properties:
target=android-21
示例:https://github.com/drawapp8/cantk-runtime-demos/tree/master/EmbedDemo
0 0
- 将cantk runtime嵌入到现有的APP中
- 将网页嵌入到app中案例实现
- 如何才能将企业现有的组织关系集成到jbpm中?
- 将myeclipse中现有的项目连接到svn
- 嵌入到现有原生应用
- 将Word嵌入到自己的程序中
- 将excel用户界面嵌入到自己的windows form中
- 将jwebsocket嵌入到tomcat中环境的搭建
- 将Tomcat嵌入到自己的应用中
- 将Mono嵌入到自己的程序中
- 怎样将FCKeditor嵌入到jsp中
- 将Google Talk嵌入到网页中
- 将ogre 嵌入到 Qt中
- 将manifest嵌入到应用程序中
- 将ogre 嵌入到 Qt中
- 将ogre 嵌入到 Qt中
- 将网页嵌入到android应用中
- 将CFormView嵌入到CDockablePane中
- iOS Provisioning Profile(配置文件)与Code Signing详解
- CUint
- Redis 2种持久化模式的缺陷
- 宽带离网用户分析(3) 建模框架
- 关于使用github上开源类库 ios-ftp-server 的心得
- 将cantk runtime嵌入到现有的APP中
- 想写什么写什么
- [UE4.4.x] 虚幻4 安卓打包
- 七巧板涂色 c++
- Unity3d优化之路
- POJ1190生日蛋糕题解
- POJ 1321--棋盘问题【DFS】
- HDU5119.Happy Matt Friends
- H.264码流结构