Android :: WebView Unable To Open Some Local Urls?
Nov 10, 2009
I have a WebView that I'm using to open some files stored in the assets/ directory of my project. It works fine for most of the files, but there's one in particular (and I'm sure others I haven't found) that it just will not open.Code...
View 4 Replies
Nov 16, 2009
If a page has a URL or a phone number on it that isn't a link is there any way to have WebView recognize it and automatically turn it into a link like you can with TextViews?
With a TextView you would simply set the android:autoLink to the desired settings:
<TextView
android:autoLink="web|phone"
... />
but I can't find any equivalent for WebView.
View 2 Replies
View Related
Nov 6, 2010
I am hoping to create my own protocol handler for urls in a webview. I have tried two approaches already. The first was to attempt something similar to the approach defined here to create a customer protocol handler. http://java.sun.com/developer /onlineTraining/ protocol handlers / This works in a command-line Java program if I correctly set the system property java.protocol.handler.pkgs, but it does not work in Android, probably because I cannot figure out where to define this system property. Defining the system property in the code does not work. I assume this is because it needs to be loaded when the application first starts. I have also attempted to use URL.setURLStreamHandlerFactory. This works for creating URL objects within the code, but it does not seem to be associated with the WebView. Any ideas on how to get this working?
View 6 Replies
View Related
Dec 11, 2012
I have a file from a free Android app that holds a list of URLs in a separate file that the app reads. I wanted to get the list of URLs, but I don't know how to open the file.URL....Trying in wordpad or such just shows it's all encrypted in some manner.
View 1 Replies
View Related
Aug 5, 2010
Can anybody tell how to run the local webapplication using android webview. I want to run my own webpages in android using web view.
View 2 Replies
View Related
Oct 12, 2009
I am trying to create a hybrid Android app which pulls HTML content from a web server and renders it in a WebView. However, I also want the external HTML to be able to reference images that are packaged within the android app. I realize that currently it is not possible to do something like <img src="file:///my_image.jpg" /> in the HTML. I have seen discussions of using the ContentProvider to create name spaces in the html, however all of these examples seem to assume that the actual html page is also on the device and tend to use WebView.loadData(). So, is there someway that it is possible to do this? The main goal is to package all the application images/css in the android app, but put the bulk of the application on an external server that returns the actual markup.
View 2 Replies
View Related
Feb 28, 2009
I thought it might be interesting to some developers. Here's a complete working example of ContentProvider for this purpose: http://blog.tourizo.com/2009/02/how-to-display-local-file-in-android. I also found a topic here: http://groups.google.com/group/android-developers/browse_thread/threa. Looks like the topic was closed and I couldn't reply there, so I created new one.
View 2 Replies
View Related
Apr 15, 2010
I am developing a small application in Android. I come across a problem, and not sure whether it is possible in Android platform. I have some local html files. There is an Activity contains a webview, which is used to display these local html files. In some cases, I want to display a picture selected from phone into one of these local html files. Is it possible? Has anyone resolved such problem? I appreciate any of your replies.
View 2 Replies
View Related
Nov 2, 2010
How do I open a a local html-page (named, for instance "test.html") in a WebView? where should i keep this keep html page with images in project and how to use Webview.loadUrl(String url)?
View 4 Replies
View Related
May 27, 2009
when I load external web page, image or javascript file from local webpage. I can't see external image and can't load javascript or webpage. But I can only see local image. Why I can't load external javascript, webpage or image? Here is the HTML source. (of course, I filled right [daum open API key])
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta
http-equiv ="Content-Type" content="text/html;
charset=UTF-8"> <title>Daum 지도 API</title>
<script type="text/javascript"
src="http://apis.daum.net/maps/maps.js?
apikey=[daum open API key]" charset="utf-8"></script> </head> <body>
<div id="map" style="width:600px;
height:400px;
" style="border:1px solid #000">
</div> <img src="http://4.bp.blogspot.com/_2-7AdSkZA7I/RlCnDhD3ZfI/ AAAAAAAAE9U/LEHMtyVLdY8/s400/CutyTale10.jpg">
<img src="file:///android_asset/coffeebean.jpg">
<script type="text/javascript">
var map = new DMap("map", {point:new DLatLng(37.48879895934866, 127.03130020103005), level:2} );
</script> <iframe src="http://www.daum.com" width="300" height="150"></iframe> </body> </html>
and I use this Activity source
package bo.my.android.test;
import android.app.Activity;
import android.os.Bundle; import android.webkit.WebView;
public class OpenAPITest extends Activity {
WebView webView;
/** Called when the activity is first created. */
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.main);
webView = (WebView) findViewById(R.id.webView1);
webView.setWebViewClient(new DaumMapClient());
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("file:///android_asset/daummap.html");
//webView.loadUrl("http://www.daum.net");
} }
View 3 Replies
View Related
Feb 18, 2009
I'm thinking of using WebView as a container for "Form" based JavaScript+DHTML applications. This is simple fill-out-forms like you have on the web, but now on mobile like for note taking, order taking, and the like.This is to allow web developers to build the bulk of the application - Javascript will perform validation, computations, etc.On the Java side, I only need to implement database CRUD operations, and a ListView to scroll over the forms.To minimize the learning curve on the JavaScript side, I've been thinking on how to emulate AJAX calls so that the web developers don't need to learn new methods to call on the JavaScript-Java bridge. Of course this isn't possible using XMLHttpRequest, so I'm thinking of adapting JQuery or other Javascript libraries for this purpose.
View 3 Replies
View Related
Sep 9, 2010
I guess webview is the best solution to play a local swf-file (flash). I just get cryptic character in the emulator with this html code in webview.
HTML 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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Flash</title>
</head>
[URL]
How can i play a local swf-file when the user click on some kind of link, java or html?
View 10 Replies
View Related
Nov 8, 2010
I don't want to store said file on the sdcard in this case. The file also cannot be storage directly in the apps local files directory. It needs to be in a subdirectory, so it cannot write the file using openFileOutput() and MODE_WORLD_READABLE.
The app may download files small files like pdfs and store them locally in a subdirectory. I would like to be able to have the user open these files if they have an app that can open them.
For example here is an intent for sending a pdf:
CODE:..............
path being something like: /data/data/packagename/files/subdir/example.pdf
That intent will open a pdf viewer, but the viewer is unable to open the file. I assume this is a permissions issue. I tried Mark Murphy's suggestion here: http://groups.google.com/group/android-developers/browse_thread/thread/4e55d869213483a9/b7270078ac1a2744?lnk=raot of using Runtime.getRuntime().exec("chmod 755 " + fileName); but it didn't make any difference. He also suggested a Content Provider but I would like to avoid it if I can because it seems like a lot just to get this file over to another app.
If the content provider is the only option, do I have to save the file to the content provider or can I just use the content provider as a pass through to get it to the other app when I need to?
View 2 Replies
View Related
Feb 3, 2012
When trying to play a local mp3 file included in the APK, nothing happens. However, if I pull an mp3 from the web it works.
e.g.
< a u d i o src="[URL]..." > WORKS
< a u d i o src="01.mp3" > DOES NOT WORK
I tried looking through logs for clues and found this line. I'm not sure if it's relevant or not.
PlayerDriver::isProtectedFile(file:///android_asset/www/01.mp3)
I'm new to Android development, so I can only guess that the file is somehow inaccessible for streaming.
I'd love to get this figured out though. Having to pull the files remotely every time is not a desirable solution.
Some additional info. Either solution works when tested in the browser. The local file problem only arises when I convert it to an app. I'm using PhoneGap build to create the APK.
View 3 Replies
View Related
Feb 4, 2009
I am trying to open a website using WebView. I am behind a proxy, but have already configured the settings database with the proxy values. When i try to open any internal website like a Tomcat running on my desktop, it opens up properly. The problem comes up when i try to open any external website like www.yahoo.com. The screen goes white for sometime and then I get message "Web Page not available". Also, the native Android browser is able to open all websites sucessfully. This seems to be an issue because of proxy, but I am not able to find any solution. Please help me as Ihave been stuck on this for quite some time now.
View 4 Replies
View Related
May 24, 2010
I just tried to open a flash site in a WebView, the site gives me an error that flash isn't installed. Is the flash player not accessible from the WebView widget?
View 6 Replies
View Related
Sep 7, 2013
i just registered here to find out if opening a KML file on my SD card with Google maps in offline mode can work. I am looking for an solution quite a time, but only found this thread on stackover.
Quote:
To load kml into Google Maps on Android without writing an app, you can create a little html file somewhere with a geo-uri link to the kml file and then click on that link in any Android web browser.
For example: suppose your kml file is located in /sdcard/overlay.kml then you write a geo-uri link like this:
Quote:
<html>
<head><title>Example KML link page using a geo-uri</title></head>
<body>
<a href="geo:0,0?q=file:///sdcard/overlay.kml">overlay.kml</a>
</body>
</html>
Clicking on the link will launch Maps and then Maps will attempt to load and your kml.
Be warned however that the Android version of Maps does not appear to handle the same version/range of kml elements as the desktop version (or desktop Google Earth).
a other thread is about editing the manifest file to get maps to open local KML files
Quote:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="h**p://schemas.android.com/apk/res/android"
package="com.example.lyold"
[Code]....
Any way to open local KML files with google maps in offline mode ? I want to open kml ONLY in google maps, i know there are several apps out there that support kml files....
View 2 Replies
View Related
Nov 19, 2010
I have an app that loads a webview and all the clicks are kept within the app. What I would like to do is when a certain link, for example, http://www.google.com is clicked within the app it opens the default browser.
View 2 Replies
View Related
Apr 5, 2010
I use webview app to open a web page (url). This web page has a form with a select element to choose. I would like to tell to select a specific value without click the element.
View 2 Replies
View Related
Jul 3, 2009
I have tried to open the ebay.com in to the Android webview component but the on simulator it does not seems to work. can anyone let me know what I should do. I am utilizing the following code:
super.onCreate(savedInstanceState); setContentView(R.layout.payment);
String url2 = "http://www.ebay.com";
WebView webview = (WebView) findViewById(R.id.webview);
webview.getSettings().setJavaScriptEnabled(true); webview.loadUrl(url2);
View 2 Replies
View Related
May 13, 2009
No matter what I do I am unable to open a file, either in my app's data directory or on the sdcard and also in a folder on the sdcard. To test I placed a test.txt file in all three directories.When I do listfiles, I get the correct list of files set in an array. I've even tried getting the list and filtering out a specific file and try opening it that way and just trying the first item in the array. Is there some security that may be set that is making it so I cant open files? This is not the emulator, it is on a device.
View 2 Replies
View Related
Aug 21, 2010
According to my application i create the database with two tables. when i inserting the data in 1 table then it runs correctly after that when i save data in the second table then it gives the exception of illegal state exception (database cannot be open). Please give me the solution.
View 1 Replies
View Related
Nov 8, 2010
Recently I very often get error reports from users that upgrade their OS. > This includes at least 1.5, 1.6, 2.1 and custom ROMs. Anybody else seeing these? Any idea what to do about it?
View 3 Replies
View Related
Jul 29, 2010
On a few apps I have downloaded I am unable to actually open the app. The app does not show up in my apps list and when I open it in the marketplace it says it's installed but the "open" button is grayed out. Anyone know if I'm doing something wrong or if it's an app error? This has only happened on about 4 apps I've downloaded. The most recent one is BatterLife.
View 2 Replies
View Related
Nov 20, 2009
Running Eclipse on Ubuntu 9.10, connected real HTC Dream which works just fine on another (Windows) machine.
CODE:.....................
View 2 Replies
View Related
Sep 26, 2010
Did a fresh install of Eclipse, JDK and android-sdk.
I am currently receiving this error when creating a new project
[2010-09-26 16:07:56 - Test] ERROR: Unable to open class file C:workspaceTestgencomexample estR.java: No such file or directory
What's the reason for this and how I fix it?
Eclipse Helios 32 bit
java version "1.6.0_21"
Android sdk API 8
P.S. Im new to Android development.
EDIT: I tried most of you solutions, but nothing worked. So I started using my frineds install of Eclipse Ganymeade.
View 19 Replies
View Related
Oct 12, 2010
When I am trying to build my application as a part of image I am getting the following error :
E/dalvikvm( 1334): Can't open dex cache '/data/dalvik-cache/ system@a...@test.apk@classes.dex': No such file or directory I/dalvikvm( 1334): Unable to open or create cache for /system/app/ test.apk (/data/dalvik-cache/system@a...@test.apk@classes.dex) E/Util( 1334): Class Not Found : java.lang.ClassNotFoundException:
But when I push the apk manually to the device (into system/app), it works fine.
I am wondering why is it so as both ways the apk is present at system/ app only.
View 5 Replies
View Related
Nov 11, 2010
I published an application that stores data in a local database.
Now I have to publish an update to this application to fix some little bugs, but I am afraid that downloading and installing the update will delate the local database associated with the previous version.
I would like to know how the update system works. Will installing an update completely delete all the apk, files, databases associeted with the previous version?
If so, how can I avoid this in my code?
View 2 Replies
View Related
Mar 27, 2009
I am having problem using webview in my application. When ever the webviewclient and webview is trying to load, it will throw me and uncaugh exception. Code...
View 2 Replies
View Related
Jun 9, 2009
I have written a small example which plays youtube videos. the code is: startActivity(youtubeIntent = new Intent(Intent.ACTION_VIEW,Uri.parse (youtubeUrl))); but I got the alert as "sorry, this video is not available". how to play youtube videos in android device by programming?
View 2 Replies
View Related