0

I've installed phonegap, and got the basic hello world new project app open in visual studio. I have deployed it to a mobile emulator. I want to deploy the same app to my android phone. I can't find any instructions anywhere of how to do this. Does anyone know how?

I'm trying to learn how to write a phone app I can deploy to all the different types of device, from a single maintainable codebase.

NibblyPig
  • 51,118
  • 72
  • 200
  • 356
  • possible duplicate http://stackoverflow.com/questions/3414424/how-to-deploy-android-application-to-a-device – Ravi Kadaboina Apr 14 '12 at 23:02
  • interesting, that question mentions an apk file, but I don't have one of those. I think that question deals with deploying to an actual physical device, whereas I am trying to produce output for another type of device. – NibblyPig Apr 14 '12 at 23:42

3 Answers3

3

I know this question is a bit old - but for anyone stumbling across it in the future...

With your application loaded In Visual Studio (I'm using VS 2013 Update 4), click on the following

Build > Configuration Manager

On the main solution project, set the Platform to Android - This should create a compiled APK in you build output folder (Solution\bin).

The easiest method I've found to install apps is using a manual method - coping it to the device and executing it from there.

To install the app on your Android device you will need to allow the device to install apps not found in the Google Play Store. Go to System Settings > Security > and select the "Unknown Sources" option. (The location of these settings might vary depending on device and Android Version)

You should then be able to copy the apk to the device, and navigate to the file in any File Manager type application. Once you tap on it it should start the installation process.

Note: you have to have installed the required Android SDK's and Java Runtime.

MarkP
  • 4,745
  • 3
  • 22
  • 18
0

For deployment to other devices you have to compile the wrapper App's in the IDEs for each platform. Essentially, you need the SDK for each platform and software that allows you to develop with that SDK. For example, to create the iOS wrapper App you need to use XCode. Specific details for each platform can be found here

Most of the work is done for you as you get the (mostly) ready-to-go wrapper app source code for each platform in the PhoneGap download.

Alternatively, you can use PhoneGap Build to just upload your assets (index.html, js, css, etc) and get the mobile ready apps compiled for you. Great for simple apps, not so good if your app uses some of the more advanced features.

Josh Davenport-Smith
  • 5,456
  • 2
  • 29
  • 40
  • 1
    Use Phonegap Build if you can - so much easier to test as you can point your smartphone at the QR they give you, to install the app. – Magnus Smith Feb 05 '13 at 13:37
0

As far as I know, Phonegap provides a JavaScript API that is device independent and hooks into a device-specific native implementations on each platform. So if you create an app in Visual Studio you would be able to emulate it on a Windows Phone.

But if you need to do the same for android, you need to download eclipse and recreate the project but you will be able to use the same files like in your Hello world example it is just the index.html though the project structure will be different and you need to create different manifest files.

If you want to use only one IDE and emulate different devices at the same time consider using Rhomobile but it is based on Ruby programming language.

Ravi Kadaboina
  • 8,494
  • 3
  • 30
  • 42