Intent Filter Issues

We have the following build.settings file

 

settings = { android = { usesPermissions = { "android.permission.INTERNET", }, intentFilters = { { label = "My App Name", actions = { "android.intent.action.VIEW" }, categories = { "android.intent.category.DEFAULT", "android.intent.category.BROWSABLE", }, data = { scheme = "myappname" }, }, }, }, orientation = { default = "portrait", supported = { "portrait" }, }, }

And then we are sending out an email to users that has a link <a href=“myappname://test”/> however this link is not doing anything.  On the Android Gmail app, where there should be links there are no links at all, just text.  The links are only showing up when I check Gmail through the Android Chrome browser.  Also, if I just type “myappname://test” in the Android Chrome browser, it simply does a Google.com search for that string.

I am using the latest public release.  Anyone have any ideas?

It’s not a Corona issue.  We take whatever intent-filter configuration that you put into the “build.settings” and inject it into your app’s “AndroidManifest.xml” file as-is.  So, if the intent-filter configuration that you’re using is not working, then you’re going to need to figure out a configuration that does work.  None of us here know the answer.  In my opinion, intent-filters on Android are ridiculously complicated on Android.  If you search sites such as stackoverflow, you’ll find plenty of native Android developers struggling with this same issue.  My suggestion is to lookup how many other native Android developers are setting up their intent-filters and test them out for yourself to see how well their solutions work for you.

Also, if your link is showing up as plain text in the mail app, then that’s a different issue.  It likely means that the mail app changed your mail to plain text or it’s not respecting custom URL schemes.  In which case, I doubt their is anything we can do about it.

I’m having the same problem as matthuston.

So no one in this community has a working android intent filter that they are willing to share?

Disappointing…

It’s making Corona useless for Android for my app. (Not Corona’s fault from what Joshua says - but true just the same).

>> So no one in this community has a working android intent filter that they are willing to share?

There are many examples on the Internet on how to do this.  All you have to do is Google search “intent-filter url mail”.  Just be aware that solutions work and some don’t.  But once you’ve found a solution that works best for you, then you can be the first person who “shares” it here.  :slight_smile:

>>> All you have to do is Google search “intent-filter url mail”. 

Really!?!?!? Now why didn’t I think of that! (blatant sarcasm, all in good fun)

>>> Just be aware that solutions work and some don’t.

So far haven’t found one that works.

You know, it might be possible that some mail apps just don’t respect custom URL schemes.  If that’s the case, then there might be no solution to this.  You might want to test your URL with 3rd party mail apps to be sure.  Or check if there are other apps that are able to make this work, such as facebook deep linking URLs via mail.

Also, I’m thinking a custom URL scheme doesn’t make a lot of sense in an e-mail anyways, because it would do nothing if your app was not installed.  Especially if the end-user clicks the link on Windows or Mac.  A better solution would be to set the URL to a web page and to set up your app’s intent-filter to handle web URLs to your website’s domain.  That way when the end-user taps the link, it’ll take him/her to the Browser app if your app is not installed or to your app if it is installed.

It’s not a Corona issue.  We take whatever intent-filter configuration that you put into the “build.settings” and inject it into your app’s “AndroidManifest.xml” file as-is.  So, if the intent-filter configuration that you’re using is not working, then you’re going to need to figure out a configuration that does work.  None of us here know the answer.  In my opinion, intent-filters on Android are ridiculously complicated on Android.  If you search sites such as stackoverflow, you’ll find plenty of native Android developers struggling with this same issue.  My suggestion is to lookup how many other native Android developers are setting up their intent-filters and test them out for yourself to see how well their solutions work for you.

Also, if your link is showing up as plain text in the mail app, then that’s a different issue.  It likely means that the mail app changed your mail to plain text or it’s not respecting custom URL schemes.  In which case, I doubt their is anything we can do about it.

I’m having the same problem as matthuston.

So no one in this community has a working android intent filter that they are willing to share?

Disappointing…

It’s making Corona useless for Android for my app. (Not Corona’s fault from what Joshua says - but true just the same).

>> So no one in this community has a working android intent filter that they are willing to share?

There are many examples on the Internet on how to do this.  All you have to do is Google search “intent-filter url mail”.  Just be aware that solutions work and some don’t.  But once you’ve found a solution that works best for you, then you can be the first person who “shares” it here.  :slight_smile:

>>> All you have to do is Google search “intent-filter url mail”. 

Really!?!?!? Now why didn’t I think of that! (blatant sarcasm, all in good fun)

>>> Just be aware that solutions work and some don’t.

So far haven’t found one that works.

You know, it might be possible that some mail apps just don’t respect custom URL schemes.  If that’s the case, then there might be no solution to this.  You might want to test your URL with 3rd party mail apps to be sure.  Or check if there are other apps that are able to make this work, such as facebook deep linking URLs via mail.

Also, I’m thinking a custom URL scheme doesn’t make a lot of sense in an e-mail anyways, because it would do nothing if your app was not installed.  Especially if the end-user clicks the link on Windows or Mac.  A better solution would be to set the URL to a web page and to set up your app’s intent-filter to handle web URLs to your website’s domain.  That way when the end-user taps the link, it’ll take him/her to the Browser app if your app is not installed or to your app if it is installed.

I understand that for this to work you need to have your app name in the label of the intent filter, is this a com.mycompany.myapp name or is it the name on the uploaded .apk or what?

I understand that for this to work you need to have your app name in the label of the intent filter, is this a com.mycompany.myapp name or is it the name on the uploaded .apk or what?