Test from device


#1

Hello,

I have an Ionci/Cordova app, which I want to test on my android phone.
The app and the server runs on my local pc.
When I enter the ip of my pc on the mobile browser, nothing happens.
Should I have change the firewall settings?


#2

Hi, you should push your app to the Ionic dashboard.
https://apps.ionic.io

Then you can download Ionic view or legacy view from the store and fillin your appID or login with your account to debug your app on your mobile device.


#3

Is it possible to test it without pushing on the Ionic dashboard?


#4

You need to build your app to run on device.
ionic cordova run android
Make sure that you have the corresponding platform added to your project.
I wouldn’t go with the Ionic view for testing during dev


#5

You can also connect your device to your computer by cable.
Then you can run this command to make it work on your device.

First
adb devices
Check if the device is listed, so yes go on

Then
cordova run android.


#6

I tried it with ionic cordova run android.
I got no errors, but this
You have been opted out of telemetry. To change this, run: cordova telemetry on.
Running command: “XXX\nodejs\node.exe” XXX\myapp\hooks\after_prepare\010_add_platform
_class.js XXX\myapp
add to body class: platform-android


#7

You runned the command?

cordova telemetry on

#8

yeah I acitvate it, got other errors, which I gradually remove.
But when it works can I test the app the ip from the mobile device?


#9

No you cant test the IP from the mobile device.
You only can run the app directly while debugging on the device and do all actions that you got in the app.

You cant go to your browser and visit the URL. That is not possible.


#10

ok thanks.
Is it possible to call methods from real server which is behind a corporate proxy from the local environment?