Icon that when clicked would launch to my website - android

I would think this would be one of the simpler and popular app questions on the net, but I have been unable to find any info…
I would like to create an icon that when clicked would launch to my website which has been modified for mobile devices. I would like to make this available on the android market.
Does anyone know how to do this or know where I can find a step by step guide?
Matt

Have you thought of using the WebView control? Then your UI can be a local HTML with an image button and you configure it with an onclick event that refresh the WebView control with your target website?

Related

How to make my android app display a specific facebook post

I am working on multi users android app and I was wondering if there any method to display a specific facebook post inside the app and when the users click on the post he'll be directed to the facebook app then he can "like or share .. that post" and go back to my app
I've been searching a couple of week for method to do that but I can't find any method to do it. If you know any method to do it please tell me.
Looking for the same answer myself.
Ended up in sending the link of the post to my app, along with the post-text and image if any. Display the post and image according to you will and redirect the user to the link on click on either the image or the text. If the Facebook app is installed on the device, it will automatically ask you if you need to go to the app. You can design the app to show the image and text one below another to achieve the (near fb) style you need.
This is just a workaround to achieve the feature. I could not find a solution to achieve embedding post in android, the way it can be achieved on the web

Phonegap opens external URL of third party library fullscreen

I'm having this little issue with PhoneGap when playing around with it:
Whenever I open an external link on my iPhone, it goes fullscreen and there is no way back but terminate the app and start again. I've read some articles and think this could be easily fixed by just calling window.open (or navigator.app.loadUrl on Android).
However, the problem continues with 3rd party library. In particular, I'm using Google Maps and the widget has little links to "Terms of Use" and something else. Tapping this link will load the Google URL full screen again.
My question is, is there any global configuration/code to either modify the in-app web browser (add header, back button and so on) or open every external links on device's default browser?
Thanks for reading and helping :)
First you study about InAppBrowser.
InAppBrowser open with close(done) button . This is not working means you also use ChildBrowser.
Reference 1
Reference 2

How close do links have to be to trigger link preview in Chrome beta?

Some of the users of my website are telling me they find it annoying when they try to touch certain links and instead of activating the link it zooms into the link and associated metadata (which is made up of a few links).
So how many css pixels of separation are needed between the link and the associated data to stop this behaviour?
I also would like to know that, and eventually a js/css trick to disable it on demand.
You can also have a look at this question :
How to prevent google chrome android browser to display the magnifier when users click a button?

Android Developer:: Opening external link within the app

Happy Friday to all.
I was wondering if there is a way to open an external link within the app itself? I currently can execute a link, but it opens it in a browser. I would like to open a site or two within the app.
Can this be done?
Oh, please tell me it can be, because this is one of the reasons why I am creating my app in Eclipse instead of Dreamweaver...html can only limit so much stuff!
please and thank you help me figure this out.
Cady
Yes, you need to use a WebView and load the html into it yourself.
Note that by default a WebView only displays html content. The plugins and javascript are off, and it does not handle link clicks, or forward / backward navigation
http://developer.android.com/reference/android/webkit/WebView.html
You can use a WebView to open HTML pages inside your app. There's a nice little tutorial in the docs showing the use of its basic features.
You can use WebView, put it in your layout and load URLs to show websites inside your app.
Yes it can be done, you can use a WebView to load the content inside your activity.

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)

Categories

Resources