[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

test[jx8Intents] Create a Note


SwikiCodeRobot @> 587

"Create a note."
| intent context subject text |
subject := 'aNote from S8'.
text := 'Object selectors 
',Object selectors sorted asLiteral.
context := MainActivity current.
intent := Intent action: 'com.google.android.gms.actions.CREATE_NOTE'.
intent putExtra: 'com.google.android.gms.actions.extra.NAME' value: subject.
intent putExtra: 'com.google.android.gms.actions.extra.TEXT' value: text.
(intent resolveActivity: context packageManager) isNil ifTrue: [
	self error: 'Intent canīt be resolved'
].
context startActivity: intent.
^#Ok