Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MODE_WORLD_READABLE Deprecated #10

Open
idiomsd opened this issue Mar 21, 2013 · 3 comments
Open

MODE_WORLD_READABLE Deprecated #10

idiomsd opened this issue Mar 21, 2013 · 3 comments

Comments

@idiomsd
Copy link

idiomsd commented Mar 21, 2013

Thanks for working on this plugin, but I'm having trouble getting it to work. This is my first time fiddling with phonegap plugins so I could be spitting nonsense.

Anyway I get a "Error calling method on NPObject" on line 855 of cordova-2.5.0.js which is in the function androidExec().

Someone on the phonegap google groups said that NPObject errors can be Java errors that bubble up to the javascript that then doesn't know what to do with. So I looked in the VideoPlayer.java and Eclipse gave me a warning on line 112:

FileOutputStream out = this.cordova.getActivity().openFileOutput(fileTo, Context.MODE_WORLD_READABLE);

Googling that is where I found that the constant, MODE_WORLD_READABLE was deprecated in API Level 17.

Since videos are initially saved using this constant, could that be why I can't get the player running in my environment? Anything about that make sense or am I just complicating a simple issue?

@macdonst
Copy link
Owner

What SDK are you building with? What phone are you running on with it's Android version?

@brynbellomy
Copy link

I'm having the same issue here. Gonna be digging into it starting now and ending whenever it's solved, so if either of you are around and feel like joining forces, I'll have an eye on this thread.

Build targets -- 4.2 / Android 17 / corodova-2.5.0
Hardware -- Motorola Droid X, Android version 2.3.4, system version 4.5.1

@idiomsd
Copy link
Author

idiomsd commented Mar 21, 2013

Right now I'm using an emulator for development and testing:
Galaxy Nexus, Android 4.2.2 - API Level 17
cordova-2.5.0

I actually went with this youtube api plugin, since the app was only going to be playing youtube videos anyway.
https://github.com/remcob00/cordova-phonegap_youtube_player_api_android

That worked for me, though I'm definitely curious about a solution so I can keep this plugin in the bank for future projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants