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

test[jx8Intents] Show a location on a map


SwikiCodeRobot @> 585

"Show a location on a map."
| intent context uri |
uri := Uri parse: 'geo:0,0?q=-16.604292,-151.565876(Taha''a+coral+garden)'.
context := MainActivity current.
intent := Intent action: Intent actionView.
intent data: uri.
(intent resolveActivity: context packageManager) isNil ifTrue: [
	self error: 'Intent canīt be resolved'
].
context startActivity: intent.
^#Ok