搜索热词

Jni知识翻看之前博客。直接上代码

1、Java层代码

public class AppActivity extends Cocos2dxActivity{

public static Activity acty;

protected void onCreate(Bundle savedInstanceState)

{

super.onCreate(savedInstanceState);

acty = this;

}

static {

System.loadLibrary("cocos2dcpp");

}

public static void Share(){

new Thread(new Runnable() {

@Override

public void run() {

// TODO Auto-generated method stub

Intent intent = new Intent("android.intent.action.SEND");

intent.setType("image/*");

intent.putExtra(Intent.EXTRA_SUBJECT,"我的分享");

intent.putExtra(Intent.EXTRA_TEXT,"分享完成");

intent.putExtra(

Intent.EXTRA_STREAM,Uri.parse(""));//要分享的文件路径

acty.startActivity(Intent.createChooser(intent,"分享"));

}

}).start();

}

}

2、Jni层代码与C++层代码

与上篇博客代码一样。http://blog.csdn.net/yuxikuo_1/article/details/40711875。注意加上平台判断。Jni知识自行百度。

总结

如果觉得编程之家网站内容还不错,欢迎将编程之家网站推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。

更多相关文章

  1. 禁止android显示状态栏
  2. android中widgets的简单实现
  3. Android(安卓)中各种XML文件的作用
  4. android经典开源代码集合
  5. 1、android源代码下载与跟踪
  6. 安卓,rebuild apk错误解决
  7. Android中重复执行动画bug
  8. 编程之路-客户端学习知识点纲要(Web/iOS/Android/WP)
  9. android 设置无标题

随机推荐

  1. android--Airbnb 动画库Lottie
  2. Mac 下载 编译 debug Android(安卓)源码
  3. Android引入外部字体更改APP字体
  4. android Android Framework
  5. 『Android/Java』Android Studio XML Edi
  6. android AVD启动后停止在android界面
  7. 安装Android(安卓)Source【转】
  8. ArrayAdapter和BaseAdapter的区别是什么
  9. Android开发之ListView 适配器(Adapter)优
  10. Android 控件之GridView