Return-Path: X-Original-To: apmail-flex-users-archive@www.apache.org Delivered-To: apmail-flex-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 28EF810A8F for ; Tue, 4 Mar 2014 10:21:34 +0000 (UTC) Received: (qmail 18380 invoked by uid 500); 4 Mar 2014 10:21:33 -0000 Delivered-To: apmail-flex-users-archive@flex.apache.org Received: (qmail 17941 invoked by uid 500); 4 Mar 2014 10:21:31 -0000 Mailing-List: contact users-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@flex.apache.org Delivered-To: mailing list users@flex.apache.org Received: (qmail 17933 invoked by uid 99); 4 Mar 2014 10:21:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Mar 2014 10:21:30 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of megharajdeepak@gmail.com designates 209.85.223.182 as permitted sender) Received: from [209.85.223.182] (HELO mail-ie0-f182.google.com) (209.85.223.182) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Mar 2014 10:21:23 +0000 Received: by mail-ie0-f182.google.com with SMTP id y20so4613613ier.41 for ; Tue, 04 Mar 2014 02:21:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Ma0x9ouBSEEp72d76C0rYhoerOHhWIJIv+wpYcxrXec=; b=bln56nbquFIuZAdsNwgNEkWkOJjE7mnEDxacpdV3Q8u82hoytiitf0eSOtAjiwq9ih jlFNao5v68Ph6TKtTpQoj5oXG6Z9fZD/asPzvVqVmXRvaxx9s5gU7uLADj7WtX3VoqAa IXsc903iipxKm4xhoB6Plh0btPh2fC99MwXPkFCPAFKIzh5UA3tI0Td+ho/I8NOY/3y9 Sdt6CASapiELDwlg8ZIdlIfxt5/NTYiiT/DOsCdFSuPThbC8jQkkxF1tROthBbBpiX8o CktFX/C1RLTV1TCnClexSDbnZJjs9bOEAfYTYYR7P4dX6ns0CSn9yJO6nKsG6sVPl8n3 JY8w== MIME-Version: 1.0 X-Received: by 10.50.66.205 with SMTP id h13mr2384683igt.19.1393928462882; Tue, 04 Mar 2014 02:21:02 -0800 (PST) Received: by 10.64.225.133 with HTTP; Tue, 4 Mar 2014 02:21:02 -0800 (PST) In-Reply-To: References: Date: Tue, 4 Mar 2014 15:51:02 +0530 Message-ID: Subject: Re: How to open a Flex App on iPad from a link in a browser From: Deepak MS To: "users@flex.apache.org" Content-Type: multipart/alternative; boundary=047d7bdc1b76df5efc04f3c5426e X-Virus-Checked: Checked by ClamAV on apache.org --047d7bdc1b76df5efc04f3c5426e Content-Type: text/plain; charset=ISO-8859-1 Oh! Excellent! Worked like charm. Here's what I did: I created a html page with following code and opened it in safari on iPad: When I tapped on the image, safari slid away and it opened up my Flex App. Flex code: app.xml file: UIDeviceFamily 1 2 CFBundleURLTypes CFBundleURLSchemes invoke CFBundleURLName com.someName.INVOKE ]]> 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 } Hope that helps others too. Thank you once again Marteen. Cheers! On Tue, Mar 4, 2014 at 3:05 PM, Maarten Cammaert wrote: > Yes, that should be possible. > The NativeApplication dispatches an invoke event and in the InvokeObject > there should be a parameters array. > But I haven't tried this yet. > > Here you can find more info > > http://help.adobe.com/en_US/air/build/WSfffb011ac560372f7e64a7f12cd2dd1867-8000.html#WS901d38e593cd1bac354f4f7b12e260e3e67-8000 > > > > On Tue, Mar 4, 2014 at 10:26 AM, Deepak MS > wrote: > > > Thanks, Maarten. I'm happy that atleast there is away to do it as this > was > > very critical requirement for a new project :) > > I'll give it a try. But can we also pass parameters to the flex app, > while > > we invoke it? In my case, after validation, I have to pass username to my > > flex app. > > > > > > On Tue, Mar 4, 2014 at 2:41 PM, Maarten Cammaert > > wrote: > > > > > Hi, > > > > > > In your app description.xml file you should add this in the iPhone > > > > InfoAdditions node > > > > > > CFBundleURLTypes > > > > > > > > > CFBundleURLSchemes > > > > > > URLSCHEME > > > > > > CFBundleURLName > > > YOUR.APP.ID > > > > > > > > > > > > And replace URLSCHEME with the url scheme you want to use, like 'myapp' > > > Now when you click a link in a browser or email with the url > > > 'myapp://someurl' your app will open. > > > > > > > > > Best regards, > > > Maarten > > > > > > > > > On Tue, Mar 4, 2014 at 10:03 AM, Deepak MS > > > wrote: > > > > > > > Hello, > > > > I have a requirement where is I need to open a link(a simple HTML > page > > > with > > > > username and password fields) in safari browser on ipad, enter some > > login > > > > credentials and hit login button. A service will be called to > validate > > > the > > > > login credentials and response would be passed back. > > > > > > > > Now, I want to pass this response(success\failure, with some > additional > > > > parameters) to my flex app and open it directly. > > > > > > > > Is that possible? > > > > > > > > Cheers! > > > > > > > > > > --047d7bdc1b76df5efc04f3c5426e--