Android :: Why Does Phone WebView Display A Black Screen
Dec 30, 2009
I've been banging my head against a wall this afternoon trying to get a WebView to work. Below is the code in the main class:
public class fkyougoogle extends Activity {
/** Called when the activity is first created. */
WebView webview;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
webview = (WebView) findViewById(R.id.webview);
webview.getSettings().setJavaScriptEnabled(true);
// WORKS
//webview.loadUrl("http://www.google.com");
// DOESN'T WORK
//webview.loadUrl("http://www.theregister.co.uk");
//webview.loadData("<html><body>hello</body></html>", "text/html", "utf-8");
//webview.loadDataWithBaseURL("fake://", "<html><body>hello</body></html>", "text/html", "utf-8", "http://www.theregister.co.uk/");}}
This is Google's "Hello, Webview" example. If I use a WebView and try to access www.google.com then it works fine. If I try to access any other site then it fails including loadData and it just displays a black screen in the emulator. In the end I would like to read from a local file.
is included under the manifest tag and the XML schema is the same as the Hello Webview example.
Am I missing something obvious here?
View 2 Replies
Nov 10, 2009
Ive noticed when I put the Droid to my ear to make a phone call... the screen goes black... then it takes a couple seconds when i pull it away for the screen to re-appear.... How do I stop that from happening?
View 2 Replies
View Related
May 3, 2009
Can anyone confirm the fact that webview is broken in the 1.5 sdk? Either that, or update the code page on the google developer side as neither that code nor any other (including my previously working webview code) is showing anything but a blank black screen.
View 19 Replies
View Related
Feb 2, 2010
I have a listview that when you click on an item it will take you to a WebView that displays some static formatted text associated with that list entry.
I had it all working with a TextView but I wanted to be able to use HTML formatting for the text and figured the WebView was the way to go. Right now it is just supposed to display a generic link for testing purposes but when the viewContent intent starts it just goes to a black screen. I can go back and pick another entry and it also just shows the black screen.
I'm not sure what code you are going to want to see so here's the viewSection class file and the viewsection.xml layout.
viewSection.java:
CODE:..............
viewsection.xml:
CODE:..................
View 1 Replies
View Related
Oct 5, 2010
I tried WebView.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN); but view crashed in 1.6 OS. I calculate scale(webview.capturePicture()) but I cannot set it after page loaded. Is it any working solution for fitting webview content to display (1.6 OS)?
View 2 Replies
View Related
Mar 17, 2014
My phone (xtouch x508) isn't showing any display (even tried restarting, put it under sunlight) but I can receive sms and call, touch works too in lock and unlock. (I can see No logo at start, no display at all). However, Backlight is working. I can see light.
PS. It also happened a month ago and after 3 days display came itself. But now it's been more than a week and no sign of display. PPS. I also changed the battery but the problem persists.
View 1 Replies
View Related
Nov 23, 2010
The display area of my SGS has been reduced there is now a black line (approximatively 1 millimeter thick) around the display now anything that should be displayed has been centered (a kind of)i have noticed that after press-holding the HOME BUTTON (to get to the task manager).even when the phone that black border is still there and it look like the screen has been pushed down the display is not now at the same level as the top-cover (or screen cover).I have used the factory reset but nothing has changed.My phone look horrible now.
View 1 Replies
View Related
Mar 18, 2014
4.7 "Android 4.0.4 MTK6577 1.2GHz 3G Smartphone Android Phone com Wi-Fi, GPS, Bluetooth, Capacitive Touch Model: 9930
Yesterday, i decided to factory reset my phone to wipe all data and i done that this way: Settings - Backup and Reset - Factory Reset. After this, my phone reboot and now the operative system does not launch. The screen lights on but doesn't do nothing, neather the logo appears. I've tried to pull out the battery, full charged it and some other things and remains the same.
I've tried to go to Recovery mode but i don't know how to access it in this chinese phone. I've tried Vol Down + Power Button, Vol Up + Power Button, Home + Power Button...doesn't do nothing, only black light screen.
View 1 Replies
View Related
Oct 17, 2010
HTC Evo was working fine, started noticing screen flickering but phone continued to work fine. Updated to froyo 2.2 and did sprint updates, phone still worked fine, then next day in the middle of playing with phone screen flickered and went black. Tried removing battery and rebooting several times but no luck. Left battery out overnight and tried again in the morning white htc screen appeared and then flickered out to black. did a hard reset, with the screen still black and still nothing. I've gone back to my phone after it has set for hours untouched and press the power button I can see the lock screen but it too goes away after a second or two. Phone is functioning lights at the bottom of the phone are lit and respond when I press them just no visible image. I don't have the insurance so I'll have to pay for all the fixes myself and I've had it since August so there is no returning it to the store. I've searched the web and I haven't seen a solution to what the problem could be is it the LCD screen or the motherboard. I'm ordering another screen but I'd hate to find out it is something else.
View 1 Replies
View Related
Jan 10, 2010
I'm trying without success to shape a simple screen composed of a webview and a closebutton on the bottom. When i run it i see the button close at bottom but when the loadURL of the webview is done the webview takes all the screen size and hide the close button.
View 7 Replies
View Related
Jun 8, 2010
Several times now my Desire's screen has just stayed black when pressing the power key to unlock it. It's like it's in a deep sleep with no way to wake it. If you call it the screen will not light up but the phone will either ring with no way of answering it or just flash the missed call light. The call can still be silenced or rejected with the buttons.
So my question is this a hardware or software issue? I'm inclined to think software because pulling the battery then rebooting solves it, until it happens again, sometimes the same day others a few days later. I always switch the phone off at night to give it a fresh start each day. I do not use any task killers or obscure apps. Phone has minimal virgin mobile UK branding on it, and running firmware 1.15.405.4 with no option to update to the newly released version.
View 21 Replies
View Related
Jul 6, 2010
The other day I was sending a text message on my phone and after I exited out of Handcent, my home screen was completely black. I thought this might be a fluke so I powered it off and back on and it still came up black. The lock screen will show, but when I unlock the screen, it was showing nothing but black. I was using Lock 2.0 for lock screen and helix for my home. Finally, we were able to get it back working, but I can't for the life of me tell you what we did to get it working again. Has this happened to anyone else? Anyone know what could have caused it and how to prevent it in the future?
View 4 Replies
View Related
Oct 18, 2010
I have a problem with the new HTC Desire HD.
When I make a call the screen goes blank, but I cannot get it back again, even if I press the button on the top of the phone. None of the other touch button function either meaning the only way to finish a call is to pull the battery out!
View 10 Replies
View Related
Sep 16, 2010
I can able to display pdf file (download to the device and using package manager dispaly it).
The above things are working fine if the url ends with .pdf extension. But it is not working if the pdf url ends with doc+2+pdf.
How to display pdf file (pdf url ends wih doc+2+pdf)
View 3 Replies
View Related
Apr 16, 2010
I want to display pdf contents on webview.
Here is my code:
CODE:....................
I am getting a blank screen. I have set internet permission also.
View 2 Replies
View Related
Jun 15, 2010
I've noticed when I make a phone calls, the screen shortly times out and goes black, its really annoying, I often have to shake my phone to see anything, any way to permanently keep the screen on?
View 7 Replies
View Related
Jul 12, 2013
i tried flashing and rooting using this thread: URL....but all went wrong when i flashed the kernel using flash mode. Im using a sony ericsson live with walkman. Using falshtool 0.9.11.0 all was fined. it displayed flashing done.
then i followed the steps then tried to root it. but couldn't as it in the command prompt it kept waiting for my device and sometimes displayed daemon tools load successfully. my phone screen remained black and was not responding.when i connect it to my pc it seemed it is not recognized but makes the sound when something is connected to the pc. i am unable to use my phone.i think there is the problem with the adb.i just dont get it well. i cant updat the sm bus driver..when i try to reflash it and re plug via cable it display:
12/043/2013 13:43:18 - INFO - <- This level is successfully initialized
12/043/2013 13:43:18 - INFO - Flashtool Version 0.9.11.0 built on 2013-06-04 22:50:00
12/043/2013 13:43:19 - INFO - Device disconnected
12/044/2013 13:44:06 - INFO - Device connected with USB debugging off
12/044/2013 13:44:06 - INFO - For 2011 devices line, be sure you are not in MTP mode
View 1 Replies
View Related
Jul 13, 2010
When I started to display an image from the SDCARD in WebView, I got errors like:
" Not allowed to load local resource: file://".
I�ve found a solution for this, and you don�t even have to care about ContentProviders�
Here�s an example:
/* Using WebView to display the full-screen image */
WebView full = (WebView)findViewById(R.id.webview);
/* Set up the Zoom controls */
FrameLayout mContentView = (FrameLayout) get Window().
getDecorView().findViewById(android.R.id.content);
final View zoom = this.full.getZoomControls();
mContentView.addView(zoom, ZOOM_PARAMS);
zoom.setVisibility(View.VISIBLE);
/* Create a new Html that contains the full-screen image */
String html = new String();
html = ("<html><center><img src=""+fileName+""></html>" );
/* Finally, display the content using WebView */
full.loadDataWithBaseURL("file:///sdcard/data/data/com.youproject.example "utf-8",
""); Hope you found it useful, let me know how it works for you!
View 1 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
Sep 13, 2010
I'm receiving XML which contains elements of HTML and I want to display these to the users. Therefore, I have to set the content programmatically, rather than extract the strings from an android xml resource. I'm using a WebView to display the content, rather than TextView, as it handles some of the HTML markup - bold text for example, and links. However WebView does appear to be rather limited.
View 8 Replies
View Related
Nov 5, 2009
I have a webview I'd like to display as a dialog. I'd like the webview to fill the entire screen, except for a button below it that I'd like to stay at the bottom of the dialog regardless of how much content is in the webview. Currently my webview fills up the dialog just enough to push the button off the screen. I'm sure this is something pretty easy but for the life of me, I haven't been able to find the magical combination of layouts, views and attribute values to get it to play nice. Just to be clear, I've gotten it so the button floats over the webview but I'd like the webview to stop just above the button and scroll, if that makes sense.
CODE:..............................
View 2 Replies
View Related
Oct 23, 2010
I want to recover my phone to the original nandroid before i first ever started to root ect. So i tried to go into the recovery menu and when i did it ended up with a black screen, with a cartoon htc hero on it that had a red warning sign next to it.
View 1 Replies
View Related
Dec 28, 2009
Are any of you having trouble with this? The sensor doesn't seem to be working the way it should. I have a problem accessing the keyboard during calls to automated services and sometimes the screen won't stay lit long enough for me to end my calls.
Aside from that, my Droid keeps freezing up today. I haven't had any trouble with that before. I've got a week to go before I pass my 30 day trial. I'm not sure what to do. This phone has to be mailed in as I got it online. If there's a way to fix these problems, I'd rather not send it in and wait 3 weeks to receive a new one.
View 11 Replies
View Related
May 3, 2010
I recently tried flashing Demagless 2.0.8 and now my phone is stuck on the HTC Black logo screen while the phone is starting up I have done a clean wipe and reflashed demageless 2.0.7.2 and also fresh 2d but now I get the same problem previously I've had fresh 2d installed and worked perfectly fine. I can still access my root but no matter what rom I flash it won't start up.
View 5 Replies
View Related
Jun 3, 2010
When I try to run the app Neocore my moment screen gets all black and white and the only thing that shows up are squares, I can't even see a picture of any kind. I don't know what else to do and also when I run the game raging thunder I get maybe 5 fps to the game. Can someone explain to me what is going on? Is it possible that my hardware on the phone is defective or maybe the update I got from samsung for the 2.1 is not gonna work with it?
View 1 Replies
View Related
Mar 20, 2014
Screen is completely black though I can hear texts coming in. Phone is a Prism II.
View 1 Replies
View Related
May 18, 2013
I bought a cheap (all I could afford) jelly bean Chinese Star N9776 phone 6" and on the whole have to report its great for the money. The only problem is that when I make a call or receive a call the ALS_PS sensor I think turns the screen off and it will not come back on until the call ends.
I have searched for answers and have found that this is a common problem. One thread suggested that if you enter the boot menu with the volume and power key you can sellect an option to disable this feature. However the menu is in Chinese !!
View 5 Replies
View Related
May 13, 2009
I am trying to add a webview in my app to display a web page. However, every time I click link on the web page, Browser will be launched to display content in that link. I understand it is something about intent but I am still wondering is there any simpler method to ask webview to display link content within its View ?
View 2 Replies
View Related
Mar 12, 2010
I am getting some HTML text from a remote server which I am displaying inside a WebView. I need to format the text display and set a font size and color for the WebView. The only way I can think of is: pre-pending the HTML string received with a tag and specify the font information there. What is the correct way to do this?
View 1 Replies
View Related