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

How to use #2

Open
nodu opened this issue Dec 19, 2013 · 7 comments
Open

How to use #2

nodu opened this issue Dec 19, 2013 · 7 comments

Comments

@nodu
Copy link

nodu commented Dec 19, 2013

Hi! Thanks for writing this plugin for cordova. Could you please update the readme.md with better instructions on how to use? Do I need to insert the code at the bottom into a script tag?

@fiscal-cliff
Copy link
Owner

Yes. As I mentioned in the readme, you can insert the code into a script tag. I just don't understand what were you concerned about?

@nodu
Copy link
Author

nodu commented Dec 21, 2013

Cannot seem to get it to work. I've included your code in a script and
tried to utilize it. it just crashes the app when I run it on android.
On Dec 19, 2013 10:15 PM, "Evgeniy L" [email protected] wrote:

Yes. As I mentioned in the readme, you can insert the code into a script
tag. I just don't understand what were you concerned about?


Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-30931150
.

@fiscal-cliff
Copy link
Owner

Could you attach crash dump please. It would appear that adding WRITE_SETTINGS permission can solve this issue.

@nodu
Copy link
Author

nodu commented Dec 22, 2013

Mind explaining where to find the crash dump/log files?

@fiscal-cliff
Copy link
Owner

In case of Android, it can be "adb logcat".

@nodu
Copy link
Author

nodu commented Dec 27, 2013

Thank you, I don't see anything meaningful in the logs perhaps you do?

I/ActivityManager( 383): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.ionicframework.starter/.StarterApp bnds=[200,585][360,785]} from pid 657
D/dalvikvm( 383): GC_FOR_ALLOC freed 2124K, 18% free 28648K/34884K, paused 130ms, total 131ms
I/CordovaLog( 6165): Changing log level to DEBUG(3)
I/CordovaLog( 6165): Found start page location: index.html
D/Whitelist( 6165): Unlimited access to network resources
D/CordovaActivity( 6165): CordovaActivity.onCreate()
D/CordovaWebView( 6165): CordovaWebView is running on device made by: samsung
D/JsMessageQueue( 6165): Set native->JS mode to 2
D/CordovaActivity( 6165): CordovaActivity.init()
D/CordovaWebView( 6165): >>> loadUrl(file:///android_asset/www/index.html)
D/PluginManager( 6165): init()
D/CordovaWebView( 6165): >>> loadUrlNow()
I/CordovaLog( 6165): Changing log level to DEBUG(3)
I/CordovaLog( 6165): Found start page location: index.html
D/Whitelist( 6165): Unlimited access to network resources
D/CordovaActivity( 6165): Resuming the App
D/CordovaActivity( 6165): CB-3064: The errorUrl is null
D/CordovaActivity( 6165): onMessage(onPageStarted,file:///android_asset/www/index.html)
D/SoftKeyboardDetect( 6165): Ignore this event
I/ActivityManager( 383): Displayed com.ionicframework.starter/.StarterApp: +146ms
D/SoftKeyboardDetect( 6165): Ignore this event
I/ActivityManager( 383): Process com.google.android.gm (pid 6545) has died.
D/CordovaActivity( 6165): onMessage(spinner,stop)
D/dalvikvm( 6165): GC_CONCURRENT freed 78K, 2% free 9754K/9872K, paused 1ms+9ms, total 23ms
D/CordovaWebViewClient( 6165): onPageFinished(file:///android_asset/www/index.html#/home)
D/CordovaActivity( 6165): onMessage(onPageFinished,file:///android_asset/www/index.html#/home)
D/CordovaLog( 6165): file:///android_asset/www/js/controllers.js: Line 3 : STARTXXXXXXXXXXX
I/Web Console( 6165): STARTXXXXXXXXXXX at file:///android_asset/www/js/controllers.js:3
I/System.out( 6165): plugin has been started
I/System.out( 6165): All went fine.
D/CordovaLog( 6165): file:///android_asset/www/js/controllers.js: Line 6 : STOPXXXXXXXXXXX
I/Web Console( 6165): STOPXXXXXXXXXXX at file:///android_asset/www/js/controllers.js:6
I/System.out( 6165): plugin has been started
I/System.out( 6165): All went fine.
D/CordovaLog( 6165): file:///android_asset/www/js/controllers.js: Line 28 : STARTXXXXXXXXXXX
I/Web Console( 6165): STARTXXXXXXXXXXX at file:///android_asset/www/js/controllers.js:28
D/dalvikvm( 6165): GC_CONCURRENT freed 703K, 8% free 9511K/10280K, paused 3ms+6ms, total 38ms
D/CordovaLog( 6165): file:///android_asset/www/js/controllers.js: Line 31 : STOPXXXXXXXXXXX
I/Web Console( 6165): STOPXXXXXXXXXXX at file:///android_asset/www/js/controllers.js:31
W/InputMethodManagerService( 383): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4261dc08 attribute=null, token = android.os.BinderProxy@42c5bf78
D/CordovaLog( 6165): file:///android_asset/www/js/controllers.js: Line 28 : STARTXXXXXXXXXXX
I/Web Console( 6165): STARTXXXXXXXXXXX at file:///android_asset/www/js/controllers.js:28
I/System.out( 6165): plugin has been started
I/System.out( 6165): All went fine.
D/CordovaLog( 6165): file:///android_asset/www/js/controllers.js: Line 31 : STOPXXXXXXXXXXX
I/Web Console( 6165): STOPXXXXXXXXXXX at file:///android_asset/www/js/controllers.js:31
W/InputMethodManagerService( 383): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@42951208 attribute=null, token = android.os.BinderProxy@42c5bf78
D/dalvikvm( 627): GC_CONCURRENT freed 391K, 6% free 9394K/9928K, paused 13ms+2ms, total 60ms
D/dalvikvm( 1509): GC_CONCURRENT freed 466K, 6% free 9300K/9868K, paused 5ms+2ms, total 26ms
I/goggles ( 1509): k: Checking for images newer than 1388119723847
D/LightsService( 383): Excessive delay setting light: 67ms

@fiscal-cliff
Copy link
Owner

Hello and sorry for late reply. Ok, here is the sample project. It's simple, but it works fine on my i9300.
https://drive.google.com/file/d/0Bx3xmZPr9s7lbUFvQlgxNjRwY2s/edit?usp=sharing
You should be careful with framworks like angular. Their initialization should invoked in the onDeviceReady event handler.

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

2 participants