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

App Crash #21

Open
rcurvello opened this issue Dec 30, 2015 · 0 comments
Open

App Crash #21

rcurvello opened this issue Dec 30, 2015 · 0 comments

Comments

@rcurvello
Copy link

I create a Test App and a fix the problem in all packages with suffix .R and .BuildConfig but when a build my app and install in my device always crash.... I use this code:

This is my js/app.js

function onLoad() {
document.addEventListener("deviceready", onDeviceReady, false);
}

function onDeviceReady() {

window.audioplayer.playfile(successCallback, failureCallback, "http://www.podtrac.com/pts/redirect.mp3/audio.wnyc.org/moneytalking/moneytalking20141031pod.mp3", {
    "title": "Test Radio",
    "artist": "You Know",
    "image": {
        "url": "http://www.jesusfreakhideout.com/cdreviews/covers/seasonone.jpg"
    },
    "imageThumbnail": {
        "url": "https://media2.wnyc.org/i/60/60/l/80/1/governor_andrew_cuomo.jpg"
    }
}, 0, {});
window.audioplayer.configure(successCallback, failureCallback);

}
// callback method
var successCallback = function(result) {
console.log('audio callback ' + JSON.stringify(result));
if (result.type === 'progress') {
console.log('progress/duration/available - ' + result.progress + '/' + result.duration + '/' + result.available); // available not currently supported
} else if (result.type === 'state') {
console.log('status - ' + result.state + '/' + result.description);
} else if (result.type === 'error') {
console.log('error - ' + result.reason);
} else if (result.type === 'current') {
console.log('current audio ' + JSON.stringify(result.audio));
} else if (result.type === 'next') {
console.log('skip to next audio track'); // typically fired by remote control/lock screen controls
} else if (result.type === 'previous') {
console.log('skip to previous track'); // typically fired by remote/control/lock screen controls
} else {
console.log('AudioCallback unhandled type (' + result.type + ')');
}
};
var failureCallback = function() {
var elText;
elText = "Audio player failed";
if (window.lang === "fa") {
elText = "Reprodução falhou";
}
return console.log(elText);
};

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

1 participant