2017년 3월 8일 수요일

How do I use Activity Starter to launch the Calculator App?


How do I use Activity Starter to launch the Calculator App and is there a way for it to return a value?

--
According to the Activity Starter documentation

The activity starter can be used to

- start another app inventor app
- start the camera
- perform a web search
- open the browser

so it doesn't look like you can use it to open your phone's calculator application.

If you needed to, you could program a basic calculator application with app inventor and use it to return the values that you need.

--
there is also this documentation Using the Activity Starter
also these links might help

⦁ Activity Starter Project by Gene & Tonysource v 0.74
⦁ Activity Starter & Intents Tracker, Google Docs
⦁ App Inventor Activity Starter App with more than 100 examples of activities

--
Figuring out how to set the properties
If you can't find documentation for the activities you want to start, one way to figure out how to set the properties is to start up the activity manually and look at what appears in the Android System Log. For example, if you use YouTube to play a video, you'll see in the log:
I/ActivityManager( 86): Starting activity: Intent { act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE] dat=http://www.youtube.com/watch?v=8ADwPLSFeY8 flg=0x3800000 cmp=com.google.android.youtube/.PlayerActivity }
If you can find the "cmp=" string, then the ActivityPackage is the part before the slash, and the ActivityClass is is the entire "cmp=" part, without the slash character. As in the YouTube example, there may also be "dat=" information that can specify with the DataUri property.
--

댓글 없음:

댓글 쓰기