flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak MS <megharajdee...@gmail.com>
Subject Re: Deep linking in Flex mobile apps
Date Mon, 08 Sep 2014 05:55:16 GMT
A html page with following code and open it in safari on iPad:
<a href="invoke://?userName=
Deepak&anotherParameterName=anotherParameterValue">
        <img src="someImage.png" height="57" width="57" />
</a>

On click of that, it will open your flex app. (invoke is the app name here)

Flex code:
app.xml file:
<InfoAdditions><![CDATA[
            <key>UIDeviceFamily</key>
            <array>
                <string>1</string>
                <string>2</string>
            </array>

            <key>CFBundleURLTypes</key>
            <array>
                <dict>
                     <key>CFBundleURLSchemes</key>
                    <array>
                        <string>invoke</string>
                    </array>
                    <key>CFBundleURLName</key>
                    <string>com.someName.INVOKE</string> <!--This would be
same as app bundle id-->
                </dict>
            </array>
        ]]></InfoAdditions>

Added following line on initialise of a view:
NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE,
onInvoke);

private function onInvoke(event:InvokeEvent):void
            {
                //event.arguments is an array and one of the item in it
will have
"invoke://?userName=Deepak&anotherParameterName=anotherParameterValue" as
its value
            }

On Fri, Sep 5, 2014 at 9:30 PM, sbgtech <sbicksubscript@comcast.net> wrote:

> I need to build in deep linking into an existing iOS and Android app using
> the Flex 4.12 SDK.
>
> Requirements - app already installed - Allow the user to click a link to
> open the application in a specific location other than the default startup
> screen.
>
> This will typically be a result of clicking a link in a Twitter card:
> https://dev.twitter.com/docs/cards/app-installs-and-deep-linking
> <https://dev.twitter.com/docs/cards/app-installs-and-deep-linking>
>
> In a browser based app you could inspect the url and obtain parameters but
> since the app is being launched by the operating system, how can this
> information be passed in and used by the Flex mobile app?
>
> Thanks!
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Deep-linking-in-Flex-mobile-apps-tp7904.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message