Launching another app from within a thunkable app


#1

I want to be able to have an app that is like a mini launcher that has buttons that can launch certain predefined apps. This could make it so that you could essentially build an app that uses other apps as alternate screens there by increasing the over all size of your app…As each Thunkable app can only be 10Mb in size…So rather than switching screen you launch an alternate app as your next view. ie. (Launcher Component)


#2

Use the activity starter component:

Example:

ActivityPackage:
com.thunkable.android.YOUR-EMAIL-NAME.YOUR-APP-Name

ActivityClass:
com.thunkable.android.YOUR-EMAIL-NAME.YOUR-APP-NAME.YOUR-FIRST-SCREEN-NAME


Here are some examples:

Start the Camera

To launch the Android Camera app, use an activity starter with these properties:

Action: android.intent.action.MAIN
ActivityPackage: com.google.android.camera
ActivityClass: com.android.camera.Camera

This is pretty much what the App Inventor Camera component does, although it is much more convenient to use the Camera component.

Launch a Web search

To launch a Web search for a particular query, such as “Homer Simpson”, use an activity starter with these properties:

Action: android.intent.action.WEB_SEARCH
ExtraKey: query
ExtraValue: Homer Simpson
ActivityPackage: com.google.android.providers.enhancedgooglesearch
ActivityClass: com.google.android.providers.enhancedgooglesearch.Launcher

Open the browser to a Web page

Use these activity starter properties to open a specific web page:

Action: android.intent.action.VIEW
DataUri: http://news.google.com


Ringtones code for an Android application
#3

hi @Mika i am trying to add a shortcut for instagram in my app. i followed the steps mentioned above but it isn’t working. i’ll add screenshot of blocks can you check where i went wrong. thanks in advance.


#4

Activity class for Instagram is com.instagram.android.activity.MainTabActivity


#5

thank you soo much. it works.:pray:


#6

what values do I change to search for a keyword?


#7

Thanks for your above answer. But I have a slightly different issue and hoping the community can assist with pointers and/or solution blocks.
I have a button that should provide bus status by launching a transportation app called : Rider.
If this app is not already installed on the user’s device, then s/he is directed to the Play Store to download and install the app.

I have tried various Activity statements (package, action, class, etc) but no luck.
How does one launch external apps (installed or not currently installed) to act as a helper apps? I am familiar with launching native apps (camera, phone, etc) and apps like facebook, youtube using activity starters but not sure what the package and class names for this app (Rider) are or how to get it.

Thanks for your help


#8

see Using the Activity Starter
chapter “Discovering how to set the ActivityStarter properties”

Taifun


#9

Thanks Taifun. I am aware of the Activity Starter component and use. My major difficulty rests with how to find the needed properties for the external app (in this case Tansloc RIder and Blackboard Learn apps installed on my device). I have followed the document at the link you provided and it is helpful to an extent that I can get the external app activity properties from the device syslog when it is running. I have installed several syslog apps (alogcat, syslog, etc) to get at this information but all I see is report of the Android system and the syslog app info.
No data on any of the apps running on the device.from which I can find the package and class names. I also closed all applications and ensure that only the app of interest is running to narrow my search. But no luck. I will greatly appreciate any advice on how to get the activity info from apps running on an android device. I have also sent a request to the developer of the app for documentation and data on the activity package and class of their app.
Thanks as you help.


#10

see also Live Development, Testing and Debugging Tools

these apps need root access and if you do not have root, then those apps will not help!

I normally use Eclipse and Logcat there, but if you have installed the App Inventor Software (see also http://appinventor.mit.edu/explore/ai2/setup-emulator.html), you already have everything you need to use logcat…

How to use Logcat

  • connect your device using USB with your computer
  • in File Manager go to the App Inventor directory, which is C:\Program Files\App Inventor or similar
  • press Shift and right mouse click the subdirectory commands-for-Appinventor to get the context menu
  • select “open command window here” and you will get a command window of that subdirectory
  • enter adb logcat and the logcat will start running
  • start the app
  • copy the log (see below)
    To copy your log, right click, click “select all” and enter to copy the complete log into the clipboard, then open Notepad and paste it using ctrl-v.

Taifun


#11

Simply download this app and nothing else


#12

Hi i try to open my app with changing app name but isn’t work, can you help me ?
app : SmartCammobile


#13

I want to open facebook messenger when button clicked…
tell me how to do it plz…


#14

Package: com.facebook.orca/
Class: com.facebook.orca.auth.StartScreenActivity
Google Play: https://play.google.com/store/apps/details?id=com.facebook.orca

Use activity starter in your blocks. :slight_smile:


#15

can you suggest for youtube?


#16

use that app to find it out yourself


Taifun


#17

Its not working :frowning: showing error message: Instagram Is Not Installed


#18

What is active class for Google Drive


#19

read this thread to find information about how to find this out yourself

Taifun


#20

Is this app inventor…because I have a similar problem…can we talk ([email protected])
I also need to have a shortcut to another app in my phone from my appinvetor app ,and I’d be thankfull