diff --git a/Gruntfile.js b/Gruntfile.js index 160db85d5..1092b3de2 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -65,6 +65,9 @@ module.exports = function(grunt) { run_android: { command: 'cordova run android --device', }, + run_android_emulator: { + command: 'cordova run android --emulator', + }, sign_android: { // When the build log outputs "Built the following apk(s):", it seems to need the filename to start with "android-release". // It looks like it simply lists all apk files starting with "android-release" @@ -370,6 +373,7 @@ module.exports = function(grunt) { // Build android grunt.registerTask('start-android', ['build-android-debug', 'exec:run_android']); grunt.registerTask('build-android-debug', ['exec:build_android_debug']); + grunt.registerTask('start-android-emulator', ['build-android-debug', 'exec:run_android_emulator']); grunt.registerTask('build-android-release', ['prod', 'exec:build_android_release', 'sign-android']); grunt.registerTask('sign-android', ['exec:sign_android']); diff --git a/app-template/package-template.json b/app-template/package-template.json index 200c269f6..11b15bfcd 100644 --- a/app-template/package-template.json +++ b/app-template/package-template.json @@ -126,6 +126,7 @@ "start": "npm run build:www && ionic serve --nolivereload --nogulp -s --address 0.0.0.0", "start:chrome": "npm run build:www && ionic serve --nolivereload --nogulp -s --address 0.0.0.0 --browser \"google chrome\"", "start:android": "grunt start-android", + "start:android-emulator": "grunt start-android", "start:android-log": "grunt start-android && npm run log:android", "start:ios": "grunt start-ios", "start:windows": "npm run build:www && npm run build:windows",