Start Androidapp with a link in a email - android

Hallo Developers,
is it possible to start a activity with a link from a Email like in Iphone SDK and start this aktivity with params.
Iphone example:
Appname:///?param1=value1&param2=value2

It appears to be possible - check these other answers on stackoverflow:
How to implement my very own URI scheme on Android
Android Respond To URL in Intent

Not to my knowledge in stock Android. However they've made a link scheme that will open up the Market application to a specific page, so this is possible. I would think however that in order to set something like that up the app you are wanting to start from link would have to be listening for clicks on that specific type of link and tell the system that it can handle them. I have no idea how you'd go about implementing that though, and it would only be able to start specific apps that were designed that way.

Try content://com.user.package.ActivityClass/. I haven't tried it so I am not sure if it will work though.
See here for more information: http://developer.android.com/reference/android/content/Intent.html

Related

Is it possible to open native android clock app from web application?

I am looking for a way to open the native android alarm clock app when a user clicks on the link or button on a web browser of the android. So basically need to open the native android app from web application. I tried using intent://#Intent;package=com.android.deskclock;end' and it is not working. I am wondering if I am using the wrong package name or it is not even possible in android.
Thank you much for help!
According to this documentation, this is not possible. In particular, this footnote is the limiting factor:
Only activities that have the category filter, android.intent.category.BROWSABLE are able to be invoked using this method as it indicates that the application is safe to open from the Browser.
If you look at the AndroidManifest.xml for the DeskClock app, none of the activities contain the android.intent.category.BROWSABLE category filter, meaning none of them can be opened from the browser.
I have a suspicion that the problem is that you are not providing a URI path in your URL. It might need to be a path declared in the app's manifest. See: https://developer.chrome.com/multidevice/android/intents
This could change it to ie intent://path/#Intent;package=com.android.deskclock;end'
It might be helpful if you were to look at the javascript console when you try to click on that link in Chrome, there might be details of what went wrong.
Keep in mind that the alarm clock app is not necessarily consistent. Manufacturers can remove the default alarm clock app to replace it with a different one, or just modify the source code so that it has the same package name but different source code. You could try opening multiple package names from javascript depending on what happens when the intent can't be opened.
Welcome to code party
You can get a android device IFrame from appetize site.
This is the easiest way for show android apps in web applications.
Update me in comments ;)

Broadcast Receiver in Phonegap 'Build'

I'm trying to receive a link shared from another application like browser or youtube into my phonegap app. I'm using phonegap build (build.phonegap.com) to make my app.
I'd like to know how to make my app appear in the 'share' list for links.
All solutions I found online are making me edit Android Manifest or Java files, but is there a way (a plugin of sorts) I can use to make data transfer between apps possible?
There is a plugin available for PhoneGap which will handle receiving content from other application. You can use it. Following is the link to this plugin. https://www.npmjs.com/package/cordova-plugin-intent
If you find any issue or something else other than that functionality, you can make the custom plugin so that you will have direct access of java file from javascript.
If I understand your question correctly, you're talking about deep linking in android. The details about it can be found here
Correct me if I explain your ideas wrong: What you want to do is that you have an URL that showed up in another application (Ex: Facebook Messenger, Slack, ...) and you want after clicking it, a list of application that can be used to open that link appear and you want your app to be listed there.
But here is the problem, how can the OS knows what apps it can suggest to the end-user and what kind of link your is acceptable to your app? the answer lies in your application manifest and to be more precise, the intent-filter tag. It tells the OS what you kind of url you want and also use it to determine if the OS should suggest your app to be open by using that link for the user.
So the answer for your question about doing without editing Manifest is impossible. As for the reason why you don't want to edit your apps is unknown to me but I still suggest you to take a look at this tutorial. It still involves editing your manifest but the guide it self is clear and easy to implement.
Hope this help ^^

Link for launching and adding to Evernote app

I want to add a button to my site so that when a user clicks it, it opens a new note on the Evernote app and saves a specific message.
I've looked everywhere for this but didn't find any info about it.
Is this possible?
Edit:
I'm sorry the question isn't very specific but I'm not really sure on where to start.
So, what I was asking was is there was a way to create a link with an href that would open in the Evernote app. So:
Is it possible to add an href that will open on the Whatsapp app? (I've seen that something like evernote:// should do it, but how's the syntax of this and does this work in both iOS and Android?)
Is there code in Javascript that would do the requested? (opening the Evernote app with a text that I would choose).
Once again, thanks for the help!

Easiest way to launch webpage in android with an icon

We have a website that offers an e-mail service. We would like to create a fully fledged app for this but cannot afford this right now. In the mean time it would be great if we could give users an icon on their phones that will take them to a page formatted for mobile on the internet. So what I'd like to know is how can we get an icon on an android users phone that will simply launch a web link in a browser- does this have to be an app, is there an easier way, or am I over estimating how complicated it would be to make this as an app anyway?
Thanks in advance
Create a new Android project (after following the SDK installation steps provided at http://developer.android.com)
on the directory /res/drawable-*dpi you have the laucher icons. Modify all of them.
In the main activity, delete all inside the onCreate method an put this:
String url = "http://www.YOUR-URL.com";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
This will open the android browser with the URL provided.
I have done projects like this in the past, it is very simple. You need to create a website formatted for a smaller screen. Once you do this, building an android app that displays your website inside it is simple. You can even remove all of the android browser toolbars so it appears as if your website is a real android application. Google android webviews, this will point you in the right direction.
See here for what's probably the best instruction page on how to do exactly that:
http://intelnav.50webs.com/app_project.html
It's based on a Webview, that is it opens the page and does all the navigation in the app window, not in the default browser. So if you want to open it in the browser, you have to use Intent, as said in previous answers.
My 2 pennies worth, I think it's better in the app window unless you really want complex navigation with the possibility of opening additional tabs, windows and so on. The drawback with the external browser is that, as far as I could see, there's no way to tell if the page is already open in the browser so you'll launch a different copy (in a new tab) every time. If the user doesn't close the tab at the end, they usually don't, it can become quite annoying. Besides, within an app you'll probably have somewhat better possibilities for ads should you ever want them.
Versus a simple home-screen bookmark, as others pointed out, it's simpler and more convenient for end users to just download an app from an online store (usually Google Play). It's what they're used to do. And they do have a lot of additional info available, like what it does, what others say about it, screen shots (if you provide some for them but you should). Plus a way to comment / complain themselves. It's a different thing. Technically it may not make a lot of sense but from a simple user's perspective it's clearly better IMO.
One way is to bookmark the site and then add it to your home screen. Source
It seems to me like you need a mobile version of your web page. Do you have that already? Once you have your mobile website (ie. website optimized for mobile devices), you could create a simple application with only one WebView. All content would be fetched from your site and displayed inside a webview. This is trivial to make, however, making an entire mobile website will take some time.
Note that you do not HAVE TO have a mobile website, you could pack you existing website into a WebView, but this would lower user experience.
you would build an app that launches a browser intent linking to your website, or a custom WebView to launch your website in full screen without any navigation bar etc..
The only easier way is to put instructions on your site (directly, or as a contextual pop-up) on how to add the bookmark as an icon on your home screen. This can be slightly more complicated on Android, and depends on the browser. A simpler option for your potential users is to provide a wrapper app via the Marketplace.
It is not overly complicated to create a simple wrapper Android app in Java that launches the browser, using Intents. The essential browser launch code is basically this:
Uri uriUrl = Uri.parse("http://www.yourwebpage.com");
Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);
startActivity(launchBrowser);
A more detailed tutorial for creating this is available here:
http://mobile.tutsplus.com/tutorials/android/launch-android-browser/
Try this kick-start mobile device app for showing websites. Written with cordova for platforms like android, ios, browser and so on: https://github.com/jetedonner/ch.kimhauser.cordova.kickstartwebsite (GooglePlay: https://play.google.com/store/apps/details?id=ch.kimhauser.cordova.kickstartwebsite, Website: http://kimhauser.ch/index.php/projects/cordova-phonegap/kick-start-website)

Is there Android Intent concept in iPhone SDK

Just switching from Android to iPhone. In Android I can make several apps and use a tabView to call each app as intent.
In iPhone, I can make several apps. I need a tab to call each apps or app views. Is there similar concept as intent in iPhone? Just switched to iPhone, copying all the other projects into the tabbar does not work out. If you have other methods to solve, I really appreciate. Thanks,
Android and iOS are very different in this regard. Android is very open about letting you use intents to mix and match activities from other apps. iOS isn't like that; each app runs in its own private space and generally cannot even see other apps' data, let alone use their services. It is possible to cause other apps to run via custom URLs, but that's not the same thing.
What you'll need to do is to copy or move the code for the view controllers, views, etc. of your various iOS apps into your tab bar app project. You'll build them all into a single application, and the tab bar will switch between the view controllers.
With iOS 8 you will have something similar to Android Intents. Using App Extensions you can reach similar behavior.
In a close future Apps will start expose their "extension" (as you do in Android Framework declaring Intent Filters in the manifest) that will be used by application who need.The extension areas allowed in this first version are:
Today
Share
Action
Foto Editing
Document Provider
Custom Keyboard
It's great finally apple release this functionality!
Intent in Android covers a lot of functions. There is no iOS equivalent to that.
But if your objective is to launch a different app, and pass parameters to it, you can try out URL Schema.
Let's say you have app AAA with URL schema aaa:// and app BBB with URL bbb://
You can launch app AAA, and call bbb://v=1&c=2 for example, to launch BBB and get the parameters. you can even take these parameters to control what view to show, so you can have a similar concept in Android, to call different Activity with Intents.
You have to register URL schema in Info.plist
The closest concept to an Intent on iOS is the handling of certain URLs by the system applications. See here. It was possible to register your own application URL schemes at one point (see this article), but I must admit I haven't tried this in recent SDKs (IIRC Glympse links can be opened in the Glympse app, so this technique probably still works).
As of 2016, Apple has added an Intents framework that is similar to Android's, albeit much more restrictive. Expect Apple to add more Intents in the future, but for now it is quite limited. https://developer.apple.com/reference/intents
Since iOS 8, you can use App Extensions.

Categories

Resources