Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Launch an App from Web browser
Started by gasnervino Apr 28 2016 01:28 AM

* * * * * 1 votes
1 reply to this topic
app browser web launch build build.setting

Best Answer gasnervino , 28 April 2016 - 02:08 AM

Ok, I solved on myself

 

I forgot to add the urlscheme to build.setting in this way

 

-- iOS Support - on plist section

  -- iOS app URL schemes:
  CFBundleURLTypes =
  {
     {
     CFBundleURLSchemes =
     {
          "prova",
     }
   }
}
 
 
 
-- Android Support - on android section

intentFilters =
   {
         {
             label = "What you want",
           actions = { "android.intent.action.VIEW" },
           categories =
           {
              "android.intent.category.DEFAULT",
              "android.intent.category.BROWSABLE",
           },
           data = { scheme = "prova" },
          },
},

 

[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

gasnervino

[GLOBAL: userInfoPane.html]
gasnervino
  • Observer

  • 28 posts
  • Corona SDK

How to build an App to be launched by the smartphone web browser ?

I need to add something to build.setting ? 

 

I tried in the standard way but it doesn't work for me

 

HTML

<html>
	<head></head>
	<body>
 
	<script type="text/javascript">
 
		window.open("prova://","_blank")
 
	</script>
 
	Hello
 
	</body>
</html>

LUA - main.lua

 

local launchArgs = ...
local appName = system.getInfo( "appName" );
print(appName);

 

 

LUA - build.setting

settings =
{
    
    orientation =
    {
        default = "portrait",
        supported = { "portrait", }
    },
    
    excludeFiles =
    {
        iphone = { "Icon-*dpi.png", },
        android = { "Icon.png", "Icon-Small-*.png", "Icon*@2x.png", },
    },
    --
    -- iOS Section
    --
    iphone =
    {
        plist =
        {
            CFBundleDisplayName = "prova",
            CFBundleName = "prova",
            UIStatusBarHidden = false,
            UIPrerenderedIcon = true,
            CFBundleIconFiles =
            {
                "Icon.png",
                "Icon@2x.png",
                "Icon-167.png",
                "Icon-60.png",
                "Icon-60@2x.png",
                "Icon-60@3x.png",
                "Icon-72.png",
                "Icon-72@2x.png",
                "Icon-76.png",
                "Icon-76@2x.png",
                "Icon-Small.png",
                "Icon-Small@2x.png",
                "Icon-Small@3x.png",
                "Icon-Small-40.png",
                "Icon-Small-40@2x.png",
                "Icon-Small-50.png",
                "Icon-Small-50@2x.png",
            },
        }
    },
    
    --
    -- Android Section
    --
    android =
    {
        usesPermissions =
        {
            "android.permission.INTERNET",
        },
    },
}
 

 



[TOPIC: post.html]
#2

gasnervino

[GLOBAL: userInfoPane.html]
gasnervino
  • Observer

  • 28 posts
  • Corona SDK

  Best Answer

Ok, I solved on myself

 

I forgot to add the urlscheme to build.setting in this way

 

-- iOS Support - on plist section

  -- iOS app URL schemes:
  CFBundleURLTypes =
  {
     {
     CFBundleURLSchemes =
     {
          "prova",
     }
   }
}
 
 
 
-- Android Support - on android section

intentFilters =
   {
         {
             label = "What you want",
           actions = { "android.intent.action.VIEW" },
           categories =
           {
              "android.intent.category.DEFAULT",
              "android.intent.category.BROWSABLE",
           },
           data = { scheme = "prova" },
          },
},

 




[topic_controls]
[/topic_controls]