Android Webview Videos or Youtube throws errors - android

I am using Android webview, its a simple browser app (my first app BTW:)). When I browse, everything looks fine. All the websites load correctly....
When I go to CNN.com or youtube.com, it loads correctly... Now comes the issue!
When I click on any video (any website), the video starts to play BUT, I see uncontrollable errors as below in logcat, until the app crashes or phone soft reboots. I say uncontrollable because, it shows every second and once it reaches about 1500 errors, app crashes....
mOnSeekCompleteListener is null. Failed to send MEDIA_SEEK_COMPLETE message.
mOnVideoSizeChangedListener is null. Failed to send MEDIA_SET_VIDEO_SIZE message.
mOnBufferingUpdateListener is null. Failed to send MEDIA_BUFFERING_UPDATE message.
the last error throws about 1500 times till the app crash.
Any advice or help please?
Thanks!

May be you shold try to set WebChromeClient to your WebView? Simple code line: webView.setWebChromeClient(new WebChromeClient);

Related

Is it possible to get extra info from "unfortunately app has stopped working" error?

In my app when some services of it are running it suddenly displays that message on some occasions, but most of the time they work properly, when I've tested them I haven't had any problem.
I'd like to know if its possible to associate the event that causes that message to appear, with giving some extra information or at the very least writing a log that at least shows which class and what line of code causes the error.
From there I could investigate with greater ease what makes that message to appear, as right now I've no clue.
I'd like to know if its possible to associate the event that causes that message to appear, with giving some extra information or at the very least writing a log that at least shows which class and what line of code causes the error.
Every time that dialog appears, a Java stack trace is written to LogCat automatically. You can use Android Studio or other development tools to examine LogCat.

aprirtc call_crossing_detected error when calling from android to android

My ionic angularjs corodova app works great when receiving calls from the demo web page on chrome. When I try to initiate a call to the demo site or another device, whether using demo API key or real api key, i get
call_crossing_detected
What does this mean, and how do you fix it?
More details on symptoms. When this occurs, no video comes up and the initiating device shows the error and the call button remains. But the receiving device switches to the hangup button, which then works. And if you speak into either device the receiving device receives the audio, but nothing on the initiating device
"call_crossing_detected" reason appears on hangup event when a call is already established between the two users and you are trying to establish a new one.
So I think you may have an issue on the first call hangup.
I have resolved this issue. It was caused by apiRTC.init executing more than once.

ParseInstaller.getCurrentInstallation().saveInBackground() is freezing my application

I am finding that about 1/5 of my tests are freezing, and after some searching for the problem I have narrowed it down to the line:
ParseInstallation.getCurrentInstallation().saveInBackground();
I am using Parse 1.5.1, and an Android 4.4.2 device. My application class looks like:
public class InitApplication extends Application {
#Override
public void onCreate() {
super.onCreate();
Parse.initialize(this, "my_App_ID", "my_Client_Key");
PushService.setDefaultPushCallback(this, MainActivity.class);
System.out.println("execution DOES reach here");
ParseInstallation.getCurrentInstallation().saveInBackground();
System.out.println("execution DOES NOT reach here");
}
}
The behaviour on my device is that I will first see a blank white screen for about 5 seconds, and then the screen goes black. I am not sure how long the screen stays black, as I usually force close. I've let it sit for about 10 minutes once with no change. I am unable to press the back button and any touch on the screen does nothing. I am forced to use my home button, then force the application to close. Upon reopening the application, it behaves and functions normally.
Further research led me to find this post: https://www.parse.com/questions/android-saveinbackground-lock-the-main-thread
But still, I have been unable to find a solution. One suggestion in the above post is to simply move the location of this code. I have tried this to some point after my main activity's onCreate() method (not to be confused with the application's onCreate() method). Behaviour appeared to be normal up until I got to the point where the getCurrentInstallation.saveInBackground() code is called, where my application froze and failed to respond until I forced it closed.
Are there any solutions to this problem?
I encountered the same problem as well using Parse SDK 1.5.1.
And I just downloaded the latest SDK 1.6.0 and problem solved.
Link to download the latest SDK.
You can track reported issue here:
Parse installation save causing app freeze
I already provided (confidentially) thread dump traces from my app. However at time of writing this post there is no useful feedback from Parse guys.
My humble opinion after looking into traces is a deadlock causing this issue after some trouble with server interaction. But it's just guessing.
Link updated
I do have the same issue and more.
The blank or black screen however happen not to all my test phones. It happens only to one of them (Android 2.3).
SaveEventually also does not work to the problematic phone above (all the other phones I have are working fine). It does not send data through successfully to the server. So I suspect that phone configuration of saving data on the phone itself before passing to the server when network is back on may be the issue.

Chromecast Receiver URL on Wordpress Site?

I'm trying to get the Sample Media Player App working, and have run into a problem. I have whitelisted my two URLs, and have gotten the app to run on my Android device without any issues.
My problem starts when actually attempting to cast the sample media. My Chromecast correctly displays as an option, however choosing it from the list does not yield any results on the Chromecast, itself (although it appears that my Android device connects without any issues). Could this be caused by my whitelisted URL not ending in ".html"? Here (link removed) is my page, for what it's worth.
Any help would be greatly appreciated.
Please check if the answer in this question (Chrome-cast Sample App doesn't work) can solve your problem.
Basically you need to set AppID in your receiver.html as well.
I think the problem is in MediaRouteHelper.registerMinimalMediaRouteProvider(mCastContext, this);
try to cheak its value, wheter it is returning true or false
if its returning false then it will not run properly

Android - Get Webview Media Player instance

I have a problem. When I play HTML 5 video object in my webview (<video>), the LogCat returns several error messages like this one:
E/MediaPlayer(17981): mOnBufferingUpdateListener is null.
Failed to send MEDIA_BUFFERING_UPDATE message.
I understand that several listeners are not implemented yet but I am not able to get the player instance.
EDIT
I am on ICS (4.0.3) and I have already tried this solution :
WebView and HTML5 <video>

Categories

Resources