Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Contributor
Posts: 28
Registered: ‎11-17-2015

Getting Started of Mobile SDK needs an slight update.

Hi, 

in the getting started guide of Mobile SDK( http://community.hexagongeospatial.com/t5/Developers-Knowledge-Base/Getting-Started/ta-p/18) in the sectio for running the app, when the Android device is attached to the computer, after running grunt android, the APK is created, so one can copy across the .apk file to the device over USB and install the app manually from the place it was copied. instead running the grunt runandroid, actually runs the emulator on the computer instead?

 

Or am I missing something here?

 

Vishnu

Highlighted
Technical Evangelist
Posts: 184
Registered: ‎07-30-2015

Re: Getting Started of Mobile SDK needs an slight update.

Hi,

 

  • grunt android - Create mobile project, add android platform and build
  • grunt runandroid - Build and run android application on device

In order to create an android project, build and run using the to above commands is probably the easiest option.

Running grunt android and copying the apk manually is of course another correct option.

 

The thing you're missing is that if the device is correctly connected to a computer, runandroid will run the app on a device.

 

In your case it isn't and it's running the app on an emulator.

 

In order to check it you should use "adb devices" command. If it's ok, you will see an id of your device on device list.

Depending on your installation you may already have it in the PATH and simply running it from command line would work. If not you should find it in the Android SDK directory, e.g: D:\dev\tools\android-sdk-windows\platform-tools\adb.exe

 

In order to fix it, I'd recommend using google first as there are plenty of articles about making adb devices work.

 

 

Highlighted
Contributor
Posts: 28
Registered: ‎11-17-2015

Re: Getting Started of Mobile SDK needs an slight update.

Thanks Lukas, I was about to mention about the phone not being detected via USB because of the drivers issue. And you have exactly mentioned about it in your reply. Some of the Android phones donot get detected so easily so for those it's easier to install manually. Phones like Xiaomi n other custom UK ones.
Vishnu