Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

sms: openURL OK on Iphone/Android with Marshmallow, not OK on Nougat
Started by henrik5 Sep 04 2017 12:29 AM

3 replies to this topic
send sms android
[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

henrik5

[GLOBAL: userInfoPane.html]
henrik5
  • Contributor

  • 249 posts
  • Corona SDK

Using 2017.3086.

This is the call: 

system.openURL("sms:07061234567")

Symptom: It doesn't open the dialog where you choose which app to use to compose the new SMS.

And these are my build.settings:

-- Supported values for orientation:-- portrait, portraitUpsideDown, landscapeLeft, landscapeRight


settings = {
    plugins =
    {


        ["plugin.notifications"] =
        {
            publisherId = "com.coronalabs"
        },
        
        --nytt, behovs nu nar det finns ett Firebaseplugin ocksa
        ["shared.google.play.services.gcm"] =
        {
            publisherId = "com.coronalabs",
            supportedPlatforms = { android=true }
        },
        
    },


    splashScreen =
    {
        ios = {
            enable = false,
        },
        android = {
            enable = true,
            image = "Default-Android.png"
        }
    },
    
android =
    {
largeHeap = false, --for image manipulation, enable if camera!
   usesExpansionFile = false, --true if > 50MB. Corona fixes everything.


permissions =
{
{ name = ".permission.C2D_MESSAGE", protectionLevel = "signature" },
},


        usesPermissions =
        {
            "android.permission.CALL_PHONE",
            --"android.permission.WRITE_EXTERNAL_STORAGE", --for camera
            "android.permission.INTERNET", --for things like downloading, MapView, LICENSE CHECK
            "android.permission.ACCESS_FINE_LOCATION", --GPS
            "android.permission.ACCESS_COARSE_LOCATION", --WIFI 


"com.google.android.c2dm.permission.RECEIVE",
".permission.C2D_MESSAGE",


        },
        usesFeatures =
        {
            -- If you set permissions "ACCESS_FINE_LOCATION" and "ACCESS_COARSE_LOCATION" above,
            -- then you may want to set up your app to not require location services as follows.
            -- Otherwise, devices that do not have location sevices (such as a GPS) will be unable
            -- to purchase this app in the app store.
            { name = "android.hardware.location", required = true },
            { name = "android.hardware.location.gps", required = false },
            { name = "android.hardware.location.network", required = false },
        },
    },
    
    orientation = {
default = "portrait",
supported = { "portrait", }
},




iphone = {
plist = {
CFBundleDisplayName = "Finnvedens Lastvagnar",
CFBundleShortVersionString = "1",
CFBundleIdentifier = "se.avia.finnvedenslastvagnar",


UIStatusBarHidden = true, 
UIPrerenderedIcon = true,  -- set to false for "shine" overlay
UIApplicationExitsOnSuspend = false,  -- CAMERA: false to not quit app on suspend! also set variable in main!
NSLocationAlwaysUsageDescription = "Appen behöver veta din telefons position för att visa kartor och vägbeskrivningar.",
NSLocationWhenInUseUsageDescription = "Appen behöver veta din telefons position för att visa kartor och vägbeskrivningar.",
NSAppTransportSecurity = { NSAllowsArbitraryLoads = true }, --allow app to access Internet...
                       


}
},




}
User is running Nougat 7.0.
 


[TOPIC: post.html]
#2

henrik5

[GLOBAL: userInfoPane.html]
henrik5
  • Contributor

  • 249 posts
  • Corona SDK

I.e. nothing happens when openURL is given that URL. (The phone number in the URL is modified from a legit one to protect the innocent.)



[TOPIC: post.html]
#3

henrik5

[GLOBAL: userInfoPane.html]
henrik5
  • Contributor

  • 249 posts
  • Corona SDK

Any ideas?



[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,253 posts
  • Enterprise

Can you put together a demo project and share it via google drive or DropBox?




[topic_controls]
[/topic_controls]