This fragment is not valid code:
ops i pasted it in hurry but this is still not working
can you please let me know how to debug and ho did you know about js error we cant access console in phone gap mobile app so how to know about error
i am using phonegap desktop app in computer and phonegap mobile app for testing it
ho did you know about js error
Well, since that code fragment was short, I just read it and saw the mistake. No debugging required.
can you please let me know how to debug
Most importantly though, you should not assume certain root causes (like in this thread's title: you assume that 'a plugin is not working'), but rather check the status of your script at every branch (call of a function, if/while/case conditions).
but plugins will not work in browser and also it give error bcz i am using camera plugin is it any way to test its plugins in browser
You should not want to test the internals of plugins. They are created and maintained by a third party and you should consider them black boxes.
Instead, you should test your input for the black box, as in:
- does my script flow reach the call of the plugin's interface at all?
- are plugin relevant objects instantiated?
- what parameters/values do I pass to the plugin's interface?
- does the plugin return any output? If so, is it as expected and if not, does it return any error message (or does it invoke a callback function)?
solved this thanks for help