-
Notifications
You must be signed in to change notification settings - Fork 104
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
SetConfig issue #3
Comments
Is there anything else within the logcat? I would expect to see further information in the logcat or within the data (which seems to be missing). Within the logcat, look for either: "Processing config JSON from background service failed" |
Thank you for the quick response! 02-14 16:17:00.279: D/ServiceDetails(19062): setConfiguration failed |
Could you provide the contents of the setConfig() from your service class (equivalent of MyService.java)? I suspect it is throwing an error while processing your config which is not being handled locally (with setConfig) thus is being returned to the plugin as a RemoteException. |
java side:
|
I'd suspect that your getting an exception in there. First I'd comment out the entire contents of the setConfig to confirm it is causing the exception. Assuming it is; Add a Log.d on the JSONException block. Also add try/ catch round your subscribe/ unsubscribe. Basically saturate the method with Log.d to narrow down what is throwing the exception |
OK. private void notifyUserService() {
This caused the error: 02-15 00:03:59.209: D/ServiceDetails(12580): setConfiguration failed |
You could really do with getting the actual exception. If you wrap you notifications function with a try/ catch then log.d the exception message and stack trade that will help identify why your code is failing. |
I fixed it! |
Good to here. |
I try to call the setConfiguration method.
I receive the following error when
console.log("Error: " + data.ErrorMessage)
02-14 12:31:21.519: I/chromium(19014): [INFO:CONSOLE(50)] "Error: undefined", source: file:///android_asset/www/js/service.js (50)
02-14 12:31:21.529: I/chromium(19014): [INFO:CONSOLE(51)] "
console.log(JSON.stringify(data));
{"TimerMilliseconds":60000,"LatestResult":{},"Configuration":{},"ErrorCode":-99,"Success":false,"RegisteredForBootStart":false,"TimerEnabled":false,"ServiceRunning":true}", source: file:///android_asset/www/js/service.js (51)
Can you tell me what is the reason for the error?
The text was updated successfully, but these errors were encountered: