phoneGap console.log ubuntu - android

I'm new in phoneGap and have problem to debug my app, I know that exist a lot of post about this but really I don't have idea how make this work.
I have console.log("message") in severals part of my code; but how can see this message when run my app?
I use this command to run
phonegap build android
phonegap run android --target=G7T7N16A26000893 --debug
with this result
with this not terminal still open to see anything. Aditional I try with Chroome DevsTools; but look that is only for pages not for apps.

Thanks #Kerri Shotts you are rigth, with google in remote devices could see apps, full tutorial her

Related

How to set up an existing React-Native project from a new computer for the first time?

So I recently started working with my friend on his app project and I've had trouble building his react-native based project. It's both ios and android.
On android, I can get as far as building, but when I run the app shuts down instantly or shows a red screen with some firebase error.
On ios, I get a build error.
My question is: what do I need to install when I first pull the repo from github? I run '''yarn install''' straight away and run '''pod install''' from the ios folder but that isn't enough. Anything I should run for android more than the yarn install command I had already used?
Thanks!
It seems your development environment is not set up yet. Follow this link to set up your environment.

How to view SQLite data in ionicframework?

I am dealing with SQLite in my ionicframework project.
Every time I change the code in controller, I need to rerun the apps in my phone and see the console.log what was the output.
Anyone knows how to view SQLite in android / ios phone from PC?
It was so hard and takes so much time to make any changes in codes and
to rerun the project to see the result in console.log
Any helps will make my coding faster. Thanks for any helps.
You can use --livereload or -l in run command as mention in ionic cli docs
Run your app using this command
ionic run android -l
or
ionic run android --livereload

Ionic app works fine on browser but does not open in my phone

I know this question had been asked before. But all the solution is not worked for me. My ionic application is working well in browser ionic serve --lab. However, when I ionic platform add android and ionic build android. It displays a blank page in my phone. Can anyone help me please?
To see what it is happening you should:
Remote Debugging with Chrome Dev Tools
Check the Android log with adb with the command adb logcat and some filters:
adb logcat Cordova:* DroidGap:* CordovaLog:* *:S
adb logcat Cordova:* DroidGap:* CordovaLog:* *:S CordovaWebView:* Web Console:*
If you're just seeing a blank white screen on Android, it means that you have an error somewhere in the app. The best way to deal with this situation is to debug the application while using it on your phone. Chrome can help you do that.
What you can connect your phone to your PC, run ionic run android in your google chrome and go to the URL chrome://inspect/#devices There you can see your device and application logs to see the browser console. There you can identify the error because it is loaded on your phone.

nativescript livereload on device

i am using https://github.com/NathanWalker/angular2-seed-advanced which creates a running nativescript app.
now, i am a starter with nativescript and wanted to ask, how i can achieve a good development flow.
i am coming from ionic where i was able to see the console output on my development machine and was able to test my app live on a cable connected device. live reloading was running also.
so my questions:
can i run my app on a device without publishing it to the store
will i be able to see the console.log output somehow on my local dev machine with adb or a nativescript cli command?
is live reloading possible for developing nativescript apps?
Thank you in advance!
yes
yes
yes
tns livesync android --watch
You can install the app to your own Android / iOS real devices and/or the iOS simulator and Android emulators, all without sending it to any of the stores.
You can see the log fine, typically when you do a tns run [ios|android] the log is pipped back to your console. You can also run the standard adb logcat (android) or idevicesyslog (for iOS if installed)
Live reloading is possible, and works fairly well. You can use the tns run [android|ios] which is built into the tns command line.
The answer to all three questions is yes (as another answer point out). To add to answer of question 3,
As of nativescript version 2.5.0, tns run and tns livesync does the same thing, tns run has the ability to apply changes and sync it to a running app on device/emulator. The message on console clearly says tns livesync is being deprecated, so you should always look to use tns run
Here are the latest options(As of 2018-Jan) to run the app in live sync mode with a device when you are using NathanWalker -angular-seed-advanced.
iOS (device): npm run start.ios.device --debug
Android (device): npm run start.android.device --debug
--debug option will pull in more logs from the device(not just for your app, but also other activities)
Check the latest doc here for up-to date commands,
You can also use adb as explained here,

AngularJS, PhoneGap, ionic, grunt difference between web and mobile

Okay I am not sure what's going on...
I build a simple app using: "AngularJS, PhoneGap, ionic, grunt"...
After grunt:dist or grunt serve I see everything nicely working in the browser
BUT
when I try to run it with grunt ripple OR with grunt build + phonegap build android + phonegap run android I am able to see only the ionic header and no content... any idea what could be possible wrong? Because I have no idea what could causing it.
Is there something I need to take care when switching to mobile? or ?
The console is clean as well:
→ adb logcat | grep -i console
I/Web Console(28936): Falling back on PROMPT mode since _cordovaNative is missing.
Expected for Android 3.2 and lower only.:966
Ahhhhhhhhhhh found an answer!!!
As Eduardo mentioned there is a problem with the slash at the beginning of template path.
It should be:
templateUrl: "scripts/src/LandingPage/views/home.html",
Maybe someone will find it useful.
For more detailed explanation checkout Eduardo's answer.

Categories

Resources