Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Can i call anohter appliction or app in titanium app

Can i call anohter appliction or app in titanium app for example )
i just wanna call another app like "what's app" in my own app

— asked July 8th 2011 by park jimmy
  • application
0 Comments

3 Answers

  • Accepted Answer

    You didn't mention a platform (please always do that!), so am guessing you are talking about a mobile project here instead of desktop. Since you also did not mention the OS, I will assume this must work under iOS and Android.

    To my knowledge, in order to call another program that program must have registered a custom URL scheme. Then you would call the program by using the Ti.Platform.openURL method. All titanium app's automatically register a custom URL scheme. For iOS apps, you can find (or modify) the name in the CFBundleURLName string tag value at (proj)/build/iphone/Info.plist

    For non-titanium apps, you need to find that app's custom URL name. If undocumented, I would first just experiment in the device browser with variations of:

    whatsapp://

    Basically, replace the http: with a custom scheme name, then use it as:

    Ti.Platform.openURL('whatsapp://');
    

    Often, programs also recognize things beyond the // as arguments to cause some specific action to be taken based on what was passed.

    For Android only, you may also be able to use Intents.

    — answered July 8th 2011 by Doug Handy
    permalink
    3 Comments
    • thank you for your big help

      — commented July 8th 2011 by park jimmy
    • did anybody know the actions for whatsapp, i.e. to put some custom text?

      — commented January 9th 2013 by Ursin Cola
    • what cat i do to send message to phone number by whatsapp so i would like to know url arguments for send message and call

      Ti.Platform.openURL('whatsapp://'????);

      — commented January 27th 2013 by mohamed elsnousy
  • Yes, see Doug Handy's explanation for how to do it with iOS. I recently answered a question like this utilizing the TomTom application.

    You can launch Android Activities (parts of the application) through intents. Check out the documentation. This might show a list of applications to perform the individual action however.

    — answered July 8th 2011 by Mike Robinson
    permalink
    0 Comments
  • what cat i do to send message to phone number by whatsapp
    so i would like to know url arguments for send message and call

    Ti.Platform.openURL('whatsapp://'????);

    — answered January 27th 2013 by mohamed elsnousy
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.