Web page open by Intent.ACTION_VIEW looks zoomed - android

I built a very simple web page for online FAQ reference.
This is basically a plain html page with very few css.
When I open it form my PC brawser it looks just fine, also when I open it from different smartphones (in default brawser) it looks cool in all of them.
Now my problems rises when I try to open it inside my mobile app by calling an intent with ACTION_VIEW like this:
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://my.domain.it:8443/FAQ/")));
In fact this leads to different behaviours depending on the device used to perform this action. Samsung S2 displays it right, but most of the other devices (i.e. Samsung Note, all Galaxys...) display the site much more zoomed than in ordinary brawser's view, also the zoom seems to be somehow 'fixed' as even zooming out the view won't turn it to the regular brawser correct view.
Is there something I can do for this? I've been googling this for a while but couldn't find a single helpful link.
EDIT
I validated the HTML and the CSS with an online validator and it gives "Valid" in both.
Thanks.

Check your site for HTML or CSS errors. Your issue got nothing in common with android really, but the way 3rd party application interpret your HTML/CSS

Related

Facebook Auto-Hyperlinking on Android?

Here's an interesting one; I'm writing a JSFiddle for a friend in order to illustrate using a :before 'content' CSS rule so as to avoid using two background images and thus hindering loadtime and reaction time. But I'm out of the house, so I'm Fiddling on my Nexus 7.
http://jsfiddle.net/kTMe8/2/ (Please disregard my quick-and-dirty solution, I'm just illustrating the point in as few loc as possible)
To the best of my knowledge, this Fiddle should work as expected on a proper computer, but when I click on the .icon to see if I can fake a 'hover' action from my tab, it redirects the page to Facebook's mobile site.
Wuuuut.
There's no linking code in there as far as I can tell -- it's, like, twenty lines max of inactive HTML and CSS. Is this an Android builtin, and if so, how do I disable it on sites I deploy? What is going on?!
Stats:
Stock Android 4.2.(?)
Chrome Beta Browser (Suspicious...?)

URLs that contain the text "feed" ask for an app to open with in Chrome for Android 4

I'm developing a web app and I have an url that has the word "feedback" in its path. When I tap it, Chrome for Android asks me whether I want to open it with Chrome, with Firefox or with RssDemon (an Rss app I installed).
I played with the url bit by bit until I realized that it's the word "feed" in the URL what triggers that behaviour. It doesn't have to be at the beggining nor at the end. Anything like "feeding animals" or "linefeed code" would have the same effect.
I don't want to have to change my urls to avoid that.
The problem is not in the web app in any way. It's all the fault of RssDemon, the RSS android app. After uninstalling RssDemon, the problem goes away.
It seems that RssDemon set up an URL intent filter so that links clicked on Chrome that had the text feed in them opened with RssDemon. Being a link, it's likely that Android also offers Chrome & Firefox as options to open it.
The bad thing about that is that I can't do anything in my web app to avoid such a behaviour. The good things is that I don't have to :-) . It'll work fine for anyone without an app like RssDemon that installs such an intent filter. And you can't really protect from those, any app could set up a filter for any pattern and it'll be up to the user to decide then.

How can I capture the whole web page in an Android phone while using its browser?

When I visit a web page using Android browser I can capture the visible part of the web page making a screenshot of the whole screen, but I need capture the whole web page, including the part of the web page that is outside the screen, I mean, not just the visible part of the page.
What I want is something like the option "Capture Entire Page" of Awesome Screenshot plugin. Pls, exclude all the programming method for do this, I want a already made tool easy to use for a newbie Android. The idea is allow common users reports layout bugs easily. So, what tool can I use to accomplish that?
A VALID REPLY IS SUCH TOOL NOT EXIST, but pls, put some reference.
You can use the Dolphin browser and Screen Cut add-on to capture full webpages on an Android phone. You do not need root access.
You cannot use any standard android method to get screenshot of entire screen (including non visible portion). But if you have root access, you can read the framebuffer to get the entire contents using this method
https://play.google.com/store/apps/details?id=com.leavjenn.longshot
This does exactly what you want. I have tested it.

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)

Any disadvantages to using WebView as opposed to TextView in Android

I am making an app a bit like a dictionary, where a user clicks on a word and get a display of an image and an explanation of that word. I know that WebView allows me to use html formatting but I have read that it takes a lot of memory. Is there any disadvantage to using a WebView in this way or should I use a TextView?
WebView works well on my phone, an HTC Wildfire.
TextView works fine if you only want to display text -- or only very simple formating.
If you want to display something more advanced, WebView will definitely allow you to do more, as it allows one to use Full-HTML.
Of course, this requires more power... but, still, if you are only using one WebView at a time on your screen/activity, it cannot be worse than when using the browser application -- and that one works fine, doesn't it ?

Categories

Resources