how to get apache log like debugging in Android logcat - java

I am currently using a webview to load a webpage which contains lots of javascript and having lots of trouble debugging what exactly gets loaded and when in the webview .
Then I saw this post where the op seems to be using apache log to monitor webpage load events in his webview.
Enhance webView performance (should be the same performance as native Web Browser)
Can I get a similar utility plugin or anything so that I can use it with logcat in ddms view.
If possible please provide some resource as to how to configure it for android.

I think the OP is using a remote access tool (ssh?) to connect to his server and is viewing the Apache log from there.
You could try subclassing WebView and providing your own implementations of onLoadResource, onPageFinished, and so on. That should give you some idea of if/when things are being loaded in the WebView.

Related

how can I make TV webapp using springboot with tizen?

I want to make a samsung smart tv app with tizen.
I've made an webpage using springboot.
I tried making the app using that webpage codes I made, but I've got to know Tizen doesn't support java but html, css,and javascript only.
So I used meta http-equip="refresh", and let index.html go to my webpage url,
but there were long loading time, and ugly ui for a waiting page..
also remote control's pointer was weird. (not focusing on a certain button, but there is a cursor)
is there no way to solve this problem?
I've tried to find a way but I couldn't. please help me...
It seems that you are making a redirect to your website (hosted in internet).
Maybe would be better starting reading the basic concepts about Samsung Smart TV apps here
If you try to open external content (hosted websites) into your app the TV will use its web browser to open it.

Screenshot Entire Environment from Browser

I have an internal web application and I want to be able to take a screenshot of the user's entire desktop environment through the app, not just the browser window. In my research, I've found that I could do this using a Java applet. However, Java applets are no longer supported in Chrome as of v45, and they tend to be slow and dated. I've explored the possibility of using flash or a browser extension, but it appears that I would only be able to capture the browser window through these means. I'd prefer not to use a native application, as the screen capture is to be a feature of the web app, so I'd like to keep them as tightly coupled as possible.
Specifically, are there any other methods that I am missing to achieve what I'd like to do? I've sort of resided myself to a java applet sans chrome support or a separate native app, but I've had trouble finding literature online about my use case (assumably due to the security concerns).

Is there a way to pre-cache a web page for viewing with an Android WebView?

I've read about the HTML5 cache manifest, and I've seen Android does support caching websites using the cache manifest. I want to use the cache manifest to download all the required resources for my website to preload it, and then open a WebView and display the remote website using the pre-cached resources. I want to pre-cache my remote page somehow, preferably without using a WebView for the caching process.
The problem with using a WebView for the pre-caching process is that loading the webpage using a WebView renders and executes the page instead of just downloading it.
I've read this: http://alex.tapmania.org/2010/11/html5-cache-android-webview.html, but having a WebView support caching is not what I want. I want the loading process to be instantaneous (assuming the cache manifest / etags of the remote website are the same as the cached version) right after I finish pre-caching the resources, instead of waiting for the WebView to load up and cache everything on the first access.
What is the correct way of pre-caching web pages for viewing later?
Thanks!
What you want to do requires implementing a mechanism for app cache, linked resources, cookies, and local database store for HTML5 apps that use database API, and that's an important part of what browsers do in these days. I don't recommend doing the caching by yourself, not only because it's so much work, but also because I can't recall any method in WebView and it's friends (WebViewClient, etc.) that accepts an outside cache.
But your problem has a very simpler solution: you can put a WebView in your view and set its visibility to gone. Then make it visible when it has finished loading the page. WebView also automatically keeps the cache for your app so that the next time it runs it loads the page more quickly.
For hiding your WebView and then automatically showing it you just have to override onPageFinished in WebViewClient.

phonegap 1.0 android facebook plugin login fail

i'm adding facebook post button to my app (phonegap 1.0), it seems that the only method to have this working is using the plugin here:
https://github.com/jos3000/phonegap-plugins/tree/master/Android/Facebook
But it's not working for me, first i saw in the log PluginManager not found, reading the docs it seems plugins are not being loaded like that anymore.
But the intent and dialog of facebook appear when calling
window.plugins.facebook.authorize(appID, function(res){...})
I can see the facebook page being loaded but just after it finished the page automatically goes back with no response.
Anyboy has used succesfully this plugin??. actually the whole phonegap-plugin system seems to be very buggy... but i can't change the framework right now all the rest of the app is working.
At the end i managed to have it working by changing the Facebook authentication option in the java file, not using single sign on.
By the way i do NOT recommend phonegap... it seems to me the library is still full of bugs
I've only ever had very minor issues working with PhoneGap and iOS. Most we were able to find quick workarounds to resolve.
The issue is Android itself. I'm trying to avoid supporting it until Google steps in and enforces standards on every phone device manufacturer. Otherwise, you're guaranteeing yourself a swiss cheese codebase to deal with workarounds on every single device out there.

Hacking RadioInfo.java to work

I have been looking at the android source and developing some apps. However for my next app, I need information about the cell phone. Similar to what you see when you go into "Field Test" mode. However I have not been successful to get RadioInfo.java to work. Is there a way to hack RadioInfo.java so that I can use it in my app OR is there a way to get the data that is displayed in "Field Test" Mode. I have looked at the telephony api include the telephony.internal but so far they do not provide as much grained information as I would want.
I have been asking around on the net but so far I can't find this information.
You will not get very far I am afraid as the underlying file is attempting to interact with the baseband chip through an internal api that you will not get access to for an application.

Categories