DeepLinks and proper way to deal with 404 - android

so I want to have some DeepLinks on my webpage that fire up a mobile app I created on my mobile device using Unity.
The DeepLinks are constructed in a way:
myapp://view?itm=356723
Now, if my mobile phone has the app installed, it will launch the app and use the information provided by the DeepLink properly. If I do not have the mobile app installed, I'll get a 404.
What I'd like to know: Is there any way to provide a special 404-page that tells the user to download the App with a link from the app-store instead of redirecting to the standard 404-page the webserver provides? For this, I'd like to assume that I run on a recent Apache Webserver and have access to .htaccess and everything else. Even PHP is a given.
I know that there are sophisticated solutions for DeepLinking like branch.io but let's say I want to keep things simple and use this approach.
Thanks for your help!

Related

How to stop developers from opening my website in a WebView?

An unauthorized person has created an android app on our name, logo and showing our website content as is. It has fully functional browser experience in an app. This person is using advertisement to make money using our content.
Our Website: http://www.chittorgarh.com
Fake App: https://play.google.com/store/apps/details?id=davidjack.chittorgarh
What we did in last 2 days:
Complaint to Google. No response so far.
Sent emails to fake app publisher. No response so far.
Created our own official app using exact same way and made it live. We will start pushing it through our website soon. It’s not what we want but do not see any other option.
https://play.google.com/store/apps/details?id=ipo.chittorgarh
Question: How do disable all the traffic from the Fake App?
Tried User-Agent but no luck as it’s exactly same as someone opens the app in chrome on android.
It is basically a web browser within an app, so there isn’t any way around this, if it’s publicly accessible via the web then it’s available to anyone to access or implement within a web view.
All you can do really is create your own app, and add a message regarding the fake app on the homepage of your website.

Enable Deep Linking for an Android app

Recently I built an Android app that consume data through JSON from a back-end. There is no public/front zone, it's only back-end. Moreover I built a showcase-website just to let people know the app exists.
Back-end and Showcase-Webiste reside at two different URLs. In the developer console I enabled the app indexing and the showcase-website is the one I set.
I'd like to add deep linking but I can't figure out how to configure the intent-filter.
For example, suppose my showcase-website URL is this:
http://nolimitsworld.com/
How should I configure the data section of the intent-filter? the host parameter should be?
The question in your subject line is misleading. You do have a public web site, and that's your showcase web site. Use that showcase web site for your intent filter. The backend url only gets called from your android app anyway, so no one needs to know that one but you.
If you still need help figuring it out, please remove the api url from your question, and just show us the url to your showcase web site instead (and only register that one with google).
Now if your other concern is that you wish to index your application without going through any web site at all since most people wouldn't recognize the domain name of your web site anyway, then there is actually no need to do deeping linking and app indexing through google.
You could just get away with indexing the content of your app with a search provider and launching your app with an explicit intent. Google doesn't even need to get involved if you do that.

Facebook Share From Mobile Web to Native App Without Javascript?

I am looking to let a reader of my site share the url from a mobile browser to their native facebook app without using javascript, or having them login through the cumbersome web process.
In the past, this was accomplished using the fb://publish/profile/me?text=blah url scheme for both iOS and Android. When clicked, this link would open the native app and start a new share dialog.
Sometime in late 2013/early 2014 though, this method stopped working. Is there a more current way to use a static URL to open up a native share dialog on iOS and/or an Android Intent? A canonical answer is needed here as searching SO leads to a ton of old, deprecated dead ends.
It's crazy that facebook doesn't have the latest URI schemes documented. Whatsapp, twitter, mail, sms, tel all have them available and are working.
Whatsapp:
whatsapp://send?text=Hello%20World!
Twitter:
twitter://post?message=hello%20world!
Mail:
mailto:<address>[?<header1>=<value1>[&<header2>=<value2>]]
SMS:
sms:+15105550101?body=hello%20there
Tel:
tel:<phonenumber>
I've been researching methods of HTML5 interaction with phone features (intents), maybe there is a way to open the mobile phone share menu from a web url? This would allow the user to share an article, per say, with any native app if installed (fb, twitter, etc...)
I don't know if you've come across this thread, but the guy seems like did some reverse engineering and has a full list of all Facebook custom URL schemes
In short there is NO official or unofficial way to do this anymore (or yet).
The URL schemes above described was never documented as an official way to open the the sharing dialog.
BUT
There is the new AppLinks framework.
The App Links framework is documented here
What it does is basically allows you to have meta tags on certain URLs that let you launch your (or any) app from Facebook. Basically Facebook checks if your page supports an app link and then links directly to your app
So, theoretically it should be simple to launch the Facebook app from your browser if you have it and if not load another link. (which is basically what you need). However even though Facebook created it they haven't put it on their pages yet. (in other words in the future these meta tags might work to open the apps).

Android App - Log into site WITHOUT authentication?

I am working on an Android login app for a service called Netclassroom. There are many for different schools (you can google for one), but I'd prefer not to share the one I'm working on. They're all the same. I want the app to log into the site using given credentials, but I'm running into a problem.
The problem is that it "does not use authentication" and the post request doesn't work? Is it even possible to log into a site like this? By that I mean that I want to enter credentials and get to the member page to parse.
You can make an app that just starts the browser on a particular URL. Here's a post that describes how to do it,
How can I open a URL in Android's web browser from my application?
Further, I think you are asking if the app can circumvent the normal web page login mechanism. Don't do that. There's a login on the web page for a reason. If your app gets around that, then it's decreasing the security that the folks that designed the web page put in place. The correct thing to do is to work with the folks that wrote the website. If they think what you are doing is acceptable, they should make their login cookie longer-lived, or allow the user / pass fields to be stored in the browser, etc.
Again, there's absolutely no rational for making the android app less secure than the browser app.

Can you share any kind of information between a web app and a native android app?

Been researching it for a couple of days, and it seems quite impossible (though highly desired).
I'm Looking for a way to anonymously identify users on our website as they later on run our mobile apps (both iphone and android, actually). At the very basic level, I'd simply generate a UID when someone visits our site, plant a cookie on their device, and then retrieve it later when our app is run. This simple implementation seems to be impossible, because the apps don't get access to the same cookie-base as the browsers (which makes sense, privacy-wise).
Also thought about using HTML5 for this purpose, which doesn't seem to provide any solution.
I Tried going the other way around and using the device id as identifier. However, seems like device id won't be available to the web server when someone visits our site.
There seems to be a perfect disconnect between data accessible from the browser, and accessible from the device itself in native apps.
Has anyone ever found a solution for this scenario?
As of my experience what you seek is almost impossible to achieve for a third party developer.
As you mention, the web browser - by default - doesn't have file-system access from the javascript context (which is where your web app will most likely run) and the cookies infrastructure isn't exposed to the application context.
What you could do is to write a plugin to the browser which might enable this one way or another. But then there is the technicality that the browsers on mobile devices usually don't support plugins and even if they did; you can't force your web app users to install the plugin :-(
Yet another, and if possible even more unlikely solution would be to try to influence the device browser project (WebKit or whatever project you wish to target) community to implement the functionality for you (good luck) :-)
A third solution and perhaps even the ethically more correct one would be to allow the user to identify him/her self optionally when using your device client application. Your client iPhone/Android application would then have a "Identify me as a client user"-button. This would of course require you to allow the user to choose a key (an e-mail address?) of his/her own when entering the web app. You'd likely need to store the key on the web server opposed to the client browser cookies.
Hope this gives you some further ideas.
Cheers
Here are some things I think would work (untested):
You can check if the user has a google account login in the browser and on the phone.
Another way would be to have them log in in both apps
Register a special url-handler which opens your android-app with an user-identifier which gets called by the webapp (see this question)
Edit: I over-read the IPhone part - #1 and #3 those answers are Android only (I think).

Categories

Resources