android developer tiny share-20160826
来源:互联网 发布:php怎么读 编辑:程序博客网 时间:2024/06/18 08:41
今天讲使用intent创建记事本。
New Note
Create a note
To create a new note, use the ACTION_CREATE_NOTE action and specify note details such as the subject and text using extras defined below.
Note: Apps must ask for confirmation from the user before completing the action.
Action
ACTION_CREATE_NOTE
Data URI Scheme
None
MIME Type
PLAIN_TEXT_TYPE
"*/*"
Extras
EXTRA_NAME
A string indicating the title or subject of the note.
EXTRA_TEXT
A string indicating the text of the note.
Example intent:
public void createNote(String subject, String text) { Intent intent = new Intent(NoteIntents.ACTION_CREATE_NOTE) .putExtra(NoteIntents.EXTRA_NAME, subject) .putExtra(NoteIntents.EXTRA_TEXT, text); if (intent.resolveActivity(getPackageManager()) != null) { startActivity(intent); }}
Example intent filter:
<activity ...> <intent-filter> <action android:name="com.google.android.gms.actions.CREATE_NOTE" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType=”*/*”> </intent-filter></activity>
0 0
- android developer tiny share-20160826
- android developer tiny share-20160627
- android developer tiny share-20160628
- android developer tiny share-20160629
- android developer tiny share-20160630
- android developer tiny share-20160701
- android developer tiny share-20160704
- android developer tiny share-20160705
- android developer tiny share-20160706
- android developer tiny share-20160707
- android developer tiny share-20160708
- android developer tiny share-20160711
- android developer tiny share-20160712
- android developer tiny share-20160713
- android developer tiny share-20160714
- android developer tiny share-20160715
- android developer tiny share-20160718
- android developer tiny share-20160719
- 第一章 Jenkins是什么?
- JAVA泛型详解
- java中==与equals的区别
- 12. Integer to Roman
- Springmvc4.1.6返回JSON时406错误
- android developer tiny share-20160826
- 软件中模块的理解
- 今天开始学习python
- oracle 常见问题处理
- App打造自定义的统计SDK, 是时候和友盟说分手了
- python学习日志
- JSB 下的深拷贝
- 从PHP获取一个数组,添加到页面的下拉选择框
- shape的使用