Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

> 'meteor run android' runs app and launches android emulator but I cannot find or run the application inside the emulator

To get started wtih android development, I am using the example application 'todos' from percolate studio From Ubuntu 14.04 console running in VMWare Workstation 10, I can successfully run the todos application

gbdmeteor@ubuntu:~/todophone/todos$ meteor run android
Starting android emulator                                                  
[[[[[ ~/todophone/todos ]]]]]   

=> Started proxy.               
=> Started MongoDB.                                                        
=> Started Cordova (android).                                   
=> Started your app.                                                       

=> App running at: http://localhost:3000/

this launches android emulator but I cannot find/run the target application (todos) in the emulator. What am I missing?

like image 391
gbdMeteor Avatar asked Oct 23 '14 16:10

gbdMeteor


2 Answers

  1. Using http://localhost:3000 does not work because localhost only means something in the context of the host OS. Open Android's browser and go to my host computer's IP address: 192.168.56.130:3000 Then the meteor app comes up, just like in browser.

  2. If I quit meteor app (ctl-c from commandline) and leave the android emulator running, and then I 'meteor run android' from the commandline again... Meteor successfully loads, installs icon and launches the application!!

Now I must load the app to real android device and see if camera works.

like image 109
gbdMeteor Avatar answered Nov 10 '22 23:11

gbdMeteor


This worked for me:

$ export BIND_IP=[YOUR LOCAL IP, ie. 192.168.1.x]
$ meteor run android

If it's not already done, do not forget to install the API 22 in Android Studio beforehand.

like image 45
Erdal G. Avatar answered Nov 10 '22 22:11

Erdal G.