Images and styles of website are not displayed in phone browser - android

I just moved my wordpress website on testing host to check how the website is actually displayed in actual phone browser and it turns out that neither styles nor images are being displayed (as shown in the right side of the image).
Website on desktop browsers works normal and it chrome dev tools if setted on Nexus 5 is displaying okey (as showed in the left side of the image).

There is actualy a plugin to take care of this for you. After you have moved the local files to your actual host, run this plugin, by searching for the root of your local website and change it to the actual root of your website.
Something like this:
Local: http://localhost/my-wordpress-website/
Live: http://www.my-website.com/

<img class="logo center-block" src="http://localhost/work/zarakunst/zaratheartist/wp-content/themes/starkers-master/img/zarakunst.png" alt="ZaraKunst logo">
You need to replace http://localhost in wp-admin/options-general.php

Related

How to correctly set the absolute path of a background-image when opening an html page directly from Android File Manager

i'm creating a simple html page using droidEdit in Android, simple as that.
In this page there's a div with a background.
This background is an image stored locally, but the url must be (for a number of reasons) an absolute path, not a relative one, and in particular one like this: file:///sdcard/assets/images/test.gif
Now, if i open my page opening Chrome and navigating to file:///sdcard/index.html everything works perfectly, and i can see my div with his nice animated background.
My problem is that if i instead open index.html directly from the file manager, Chrome is launched and it correctly display index.html but the div shows no background at all.
I'm not an expert in how Android system works underneath the surface, but since the same code (with a different file:/// path, of course) works in Windows, i suspect that Android somehow uses a different url/uri system to handle locally stored files.
Is there any way to set the right (absolute) path of test.gif to make the css load it correctly, when i open index.html directly from the file manager?
Thank You in advance
Accessing local images works when navigating directly to the file in chrome. It won't work when opening the html file from another page because of security rules imposed by browser. Checkout the full details here: https://blog.chromium.org/2008/12/security-in-depth-local-web-pages.html
It can be fixed by base64 encoding the image using any online tool(search for base64 image) and using the result as background:
body{
background: url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxMTEhUTExIVFhUXGRgYFxgXGBcXFhgXFxUXFxcXGBcYHSggGBolGxUXITEhJSkrLi4uFx8zODMtNygtLisBCgoKDg0OGxAQGy0lICYvLi0tLS0tLS0tLystLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tL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iZBJH1wltek0vLnkQJIg4x18NlheSvI59+jRKTUbQHdd6kZMZERJ6zA5pUauCAZcJYBuTBzj0CwvIRbtIVZpVQ97MV26gwsOrJycb5gdU+4lfFow2V5eXo4ckvwWvsfD85bKbxnirTh7SJnJ+Xy5Sqle1+83SAfsM8x1zsvLyhHb2bl0acMrfEqBswBIecQGjOozyGcJ3c0y9/wALLaNNmqnpzLNBd8Tlqc7f6cl5eVq1/glKWwK7rRTpU55GpjY6zgn/AOIHutbCx1hzzIYwSeUk4aBGdyJjkvLylHqxYv4/79k1KiC8VHTpe5rWcpcMcsYA9MKxXTKT6Omo4BtQaA48pyD5ggLK8lkvR0pNlNfwRra2l5LRTo/Eq57xIaXEN6HvNaD1cmPZ2lW0AhjG63RJHyUmg6omSdXyyTMNdyK8vKkHyhFv2LKT43/Q44dUOkt0ul5aMgTpHe2Bgciek+Ce2sNgAz5ecfzyXl5Jjk3Nr6Qrk0n/AGR9orP4jmDGQTpMQTgnl0HhukN1ww9w1HAVc/5YHdbnDIy0wY1RywvLybyF8tGLIttmLmKYy54BAhrNbtIaADI2bnfqhrhprNDAZ1OIwCNRIEYO5g8uqyvKUNv+xOJ5tGnQwXCpUPzuHygZYWg7OOTJOMY6oW3vHtf3st1AGBEdR5wZnmDPVeXkJPYr7G9ag0kBzAWkzMSBAAJPTrKDcxrXbnW505yG6+YI/wBQzO0Ly8pQ6s5m1pc99xP9paZzmM59UzuqTWuDWzJG+I1kAxPMwD4ZHkvLy5Aj0Am7FN0ZDW5EQC0jY9TucdQvVajS9xBDQcQNtpI25umMbALy8i36OZmnEanuJgNa2DAeWxOPDHsk12Q97nOOSZ6Y5fSFleQjti2f/9k=')
}
Or uploading the background image to any image hosting service and reference the url.

Create shortcut icon for locally stored web app for Firefox Android

I have created a local web app for Android that I want to use with Firefox. My problem is that I'm not able to get the desktop shortcut to have the app icon, and even on the tabs in FF, a white S on a green background is displayed (it's the same icon used for the shortcut).
Chrome is able to display the icon but due to various reasons (http vs https restrictions, inability to access external SD card storage, inability to create desktop shortcut for local web apps...) I have to use Firefox.
I have used the content generated with https://realfavicongenerator.net to no avail. Websites, though, do display their icons both in tabs and when a shortcut is created on the desktop, so FF is not broken on the device.
I have read through some of the questions here on SO (this and this) as well as the FAQ on realfavicongenerator.net but nothing points specifically to locally stored web apps and FF.

Error 404 - Not Found displays when clicking pdf link in android devices

I'm currently working on a web page that opens a pdf file in a new tab using an anchor tag.
When viewed using android default browser, devices like (note 4 and tab 4) it displays 404 Not Found Error, but this works fine when using iOS, PC and Mac
<a href="/sample_file.pdf" target="_blank"/>click here</a>
NOTE: reference file for the pdf is relative since this will vary per environment.

How to install my .xpi on firefox android

I work on a firefox addon using JPM.
I want to install it on my android phone, i've run "jpm xpi" and copy xpi on my sdcard. When i browse to file://path/to/my/xpi in android firefox nothing happen.
Same issue if i upload xpi on my server and browse to url.
i've tested with google play firefox up to date version and nighty.
where is my mistake?
Neither ES File Explorer nor X-plore worked for me (as per Trasd's comment). I saw the three Firefox's, but none of them triggered to install the XPI.
The solution for me was creating an installer HTML file in the same directory as the .xpi files, like the following.
install.html:
<html><body>
ABP
FVD
<!-- replace the above with the names of your add-ons in the same directory -->
</body></html>
Then, you can either:
Enter the path to this install file directly in Firefox, e.g. file:///storage/sdcard0/MyXPIFiles/install.html
Or, navigate to the file in your File Manager and open it in Firefox when prompted.
In Firefox viewing the install.html file you created, click on each link on the page, and you should see a prompt, "Firefox prevented this add-on from installing on your device." Just click "Allow", and it should install.
EDIT: Apologies, I see you said that navigating to a URL did not work for you. But if no one minds, I'll leave my answer here, cause it's the only one that worked for me, and maybe others too.
Create github repository for your addon. Then get this extension:
https://addons.mozilla.org/en-US/firefox/addon/github-extension-installer/
Then go to your github repository with firefox on android, then make it display "desktop version of website" from firefox menu icon at top right, then click "add to firefox".
This is by far the easiest way to get addon from your computer onto android.
This is a problem because of the different Versions. I had the same problem as you. I tried to install the xpi manually. The trick is to install versions that are older. So currently Firefox v43 does not work. But v38 or v39 for Example works without any problem.
v42 for Example does not work. v41 works. It seems like they changed something here. Because the Explorer also offers 3 Options to Start Firefox with v42, but only 2 with v41.
Create a html file with this code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Load files</title>
<style>
div#links a {
display: block;
}
</style>
</head>
<body>
<input type="file" onchange="add(this)"/>
<div id="links"></div>
<script>
function add(obj) {
var val = obj.value;
addLink(val);
}
function addLink(dir){
var links = document.getElementById('links');
var a = document.createElement('a');
a.href = dir;
a.text = dir;
links.appendChild(a);
}
</script>
</body>
</html>
Then copy the xpi files into the same folder, you can load them dynamically and then click on corresponding link.
You can create and install Firefox extensions locally on your Android device!
I'm creating and installing simple Firefox extensions using nothing but my Android itself, instead of hooking it to (or programming on) my PC. To install extensions without involving a USB connection:
If you're working with an existing addon from you PC, get the xpi onto your Android device (email it to yourself if you have no other method).
Using Root Explorer (even though I'm not rooted on this tablet) or Explorer, the free version (sorry, they won't let me put more than 2 links), long-press on the xpi file and choose Open With.
Choose the Apps tab (3rd one) and scroll down until you see Firefox (there are 3 Firefoxes in the list - these are Intents, I think).
Choose the second Firefox in the list.
If you selected the correct Firefox in the list, you will see a "Tab saved in Firefox" toast - DO NOT TAP IT! If not, try the procedure again, but select a different Firefox in Root Explorer's Open With App list.
After the toast, if Firefox displayed an icon on your Notification Bar, activate it. This will bring up Firefox with a new tab where you have to give your approval to install the extension. If you don't have a Notification Bar icon, just open Firefox.
Like most things, this is much simpler to do than to explain.
Please note, I am using Firefox for Android 42.0.1. I also use the Console 1.1.1 (by DigDug) add-on for simple debugging. I had to download the Console extension from its Github site and install it using this method because I couldn't get it to install through Firefox's regular method, nor could I get "Githib Extension Installer" to work on my system. I am using a Samsung Galaxy TabPRO SM-T900 12.2" with Android 5.1.1.
Good luck!

Open a html file from within an Android App

I am almost complete building a stocktaking app for work, but there is one thing stumping me at the moment. Firstly, I am a .net developer and so have had no previous Java experience prior to this app, so everything has been learnt on the fly.
Ok, so I have put together a "help" page for the users. Its in HTML. I have created a folder on my nexus 7 and named it saregohelp (the app name is Sarego). I have placed the html file inside and its named "help.html"
Here is my current link.
"file://Internal storage/saregohelp/help"
I can get the button to link to a website, but the tablets wont have web access so the html file needs to be local.
Any ideas?
Thank you!
You can put the html file in assets.

Categories

Resources