
Android 官方说明文档简析
繁星点点-
不尝试去做就没有实现的可能。
展开
-
Android开发官方文档---Sharing Simple Data
发送简单数据到其他应用发送文本数据Intent sendIntent = newIntent(); sendIntent.setAction(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text tosend."); sendIntent.setType("text/plain"翻译 2015-12-22 15:29:59 · 737 阅读 · 0 评论 -
Android开发官方文档---Capturing Photos
如果应用要使用Camera,添加标签 android:required="true" /> ... 如果Camera是应用使用到的功能但不是必要的就可以设置required属性为false在应用里面可以调用hasSystemFeature(PackageManager.FEATURE_CAMERA) 决定是否使用Cam翻译 2015-12-24 17:14:29 · 518 阅读 · 0 评论 -
Android开发官方文档---Managing Audio Playback
(1)使用硬件控制应用的声音,在Activity的生命周期内进行设置,只需一次并尽早调用,可以在Activity的OnCreate()方法中设置。setVolumeControlStream(AudioManager.STREAM_MUSIC);(2)使用播放按钮控制应用的声音,无论什么时候点击这些按钮,都会广播一个action为ACTION_MEDIA_BUTTON的Intent。翻译 2015-12-24 17:09:39 · 762 阅读 · 0 评论 -
Android开发官方文档---Sharing Files
(1)指定FileProvider package="com.example.myapp"> ...> android:name="android.support.v4.content.FileProvider" android:authorities="com.example.m翻译 2015-12-22 15:31:21 · 944 阅读 · 0 评论 -
Android开发官方文档---Interacting with Other Apps
例如: 调用自带浏览器打开指定网页Uri webpage =Uri.parse("http://www.android.com"); Intent webIntent = new Intent(Intent.ACTION_VIEW, webpage); 打电话Uri number =Uri.parse("tel:5551234"); Intent callIntent翻译 2015-12-22 11:01:06 · 700 阅读 · 0 评论