User Tag List

Results 1 to 5 of 5

Thread: Launching a second application by intent

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Feb 2009
    Location
    Australia
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Launching a second application by intent

    Hi,

    I've been trying to launch a second clickteam android application from a sister application using an intent in the Android object.
    From what I understand this should be possible by:

    setting category to -> android.intent.category.LAUNCHER
    intent_outgoing -> application.launchintent (for example com.yourcompany.yourapp.Main)

    However, so far I cannot get it to launch a clickteam app. Is there any way to do this?

    Thanks in advance,
    David

  2. #2
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,784
    Mentioned
    298 Post(s)
    Tagged
    4 Thread(s)
    no you are not doing right, try this


    android.intent.ACTION_VIEW ------- since the only way of opening and application is viewing it

    and the url set to the package name, e.g: "com.yourcompany.yourapplication"


    that should work test and let me know
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Feb 2009
    Location
    Australia
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi FVivolo,

    I actually tried the method you suggested first but had no luck. Since you implied that this should work I tried again:
    1) setup dummy program to be called by setting package name in Android options tab to com.dave.test. (Compile, runs on my phone as per normal)
    2) setup launcher program which uses android object to start outgoing intent android.intent.ACTION_VIEW to com.dave.test. (No result)
    I also tried several other possibilities including android.intent.action.VIEW and com.dave.test://

    So I do not think the method you describe is quite right, probably because the clickteam application is not set up to respond to a view intent called in this way.

    To get this to work, I went into AndroidManifest.xml and added some lines like:

    <intent-filter>
    <action android:name="android.intent.action.VIEW" />

    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />

    <data
    android:host="example.com"
    android:pathPrefix="/someresource/"
    android:scheme="http" />
    <data
    android:host="www.example.com"
    android:pathPrefix="/someresource/"
    android:scheme="http" />
    </intent-filter>

    Now in Fusion when I use the call URL method to http://www.example.com/someresource/" it brings up the second Fusion app. Actually I modified the code above slightly to use a custom scheme rather than point to someone elses URL.

    This works ok. Actually its nice because now when the user browses to my website in their browser, if they have the app installed it launches automatically. But I'm worried its not full proof. It may still be better to use the launcher built into android with the package manager in Android (see http://stackoverflow.com/questions/3...er-application)

    - David

  4. #4
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,784
    Mentioned
    298 Post(s)
    Tagged
    4 Thread(s)
    sorry i don´t understand the "com.xxxx.yyyyyy" is a package name not an URL

    this apply to anything, e.g: if you set intent.view to an image it will open the gallery or any application assigned to view images, this is the basic also that apply to an URL.

    how are you implementing this is in your mfa?

    permission need it is "android.permission.INSTALL_PACKAGES" i wil ask Yves to add this permission in the list of the allowed permissions of the android exporter next beta (please set manually for testing)

    you know that simple intent should not work if you have installed this application in some devices or non rooted devices also it will not allow install if the application is in foreground.

    try

    setType "application/vnd.android.package-archive"

    setURI "file:///"+fullpath_to_apk

    Intent.view

    please test and let me know if is ok, also post the device´s specs which you use for testing
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  5. #5
    Forum Moderator Multimedia Fusion 2 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Eagle4's Avatar
    Join Date
    Jul 2006
    Posts
    957
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hi man !

    I have this problem too ! I want to donwload an apk file, install it and launch it automatically (User must not see the installation)
    How can I do that plz ? Can you make MFA's example with 2 applications (One can launch the other)

    Best regards,
    Clement.
    My effect library are available
    http://myetic-studio.fr/produits.php

    My Game
    Luor | Remedium | Sky Invader

Similar Threads

  1. Android Send Intent (Share)
    By Neildo64 in forum Android Export Module 2.5
    Replies: 51
    Last Post: 7th July 2020, 05:29 AM
  2. Intent for auto send SMS
    By Vantales in forum Android Export Module 2.5
    Replies: 2
    Last Post: 11th June 2014, 03:10 AM
  3. Launch Skype from App via Intent?
    By StingRay in forum Android Export Module 2.5
    Replies: 4
    Last Post: 18th January 2014, 09:14 AM
  4. Need Help Fixing Launching Bug!
    By Kolar_Games in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 18th August 2013, 05:47 PM
  5. Start Intent
    By kiko in forum Android Export Module Version 2.0
    Replies: 7
    Last Post: 8th November 2012, 07:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •