

Public class ServerActivity extends Activity Now, I don’t know if this is standard practice for letting two phones communicate with one another, but it worked for me in a new application that I’ve been working on, and so here it is: The idea involves Socket Programming and basically letting one phone be the “server” and the other phone be the “client”. This post is for anyone who has wanted to create an application that could communicate with another phone running your same application. Here’s something new that I came across and thought might be useful. $ ionic cordova emulate ios -prod -release -buildConfig = build.Haven’t posted in a while. $ ionic cordova emulate ios -prod -release -developmentTeam = "ABCD" -codeSignIdentity = "iPhone Developer" -packageType = "app-store" $ ionic cordova emulate ios -livereload-url = $ ionic cordova emulate ios -prod -release $ ionic cordova emulate ios -livereload -external $ ionic cordova emulate ios -buildConfig = build.json

$ ionic cordova emulate android -prod -release -buildConfig = build.json $ ionic cordova emulate android -prod -release -versionCode = 55 $ ionic cordova emulate android -prod -release -minSdkVersion = 21 $ ionic cordova emulate android -prod -release -keystore = filename.keystore -alias = myalias $ ionic cordova emulate android -prod -release -gradleArg = -PcdvBuildMultipleApks = true $ ionic cordova emulate android -buildConfig = build.json To pass additional options to the dev server, consider using ionic serve separately and using the -livereload-url option. Just like with ionic cordova build, you can pass additional options to the Cordova CLI using the - separator. In some scenarios, you may need to host the dev server on an external address using the -external option. When using -livereload with hardware devices, remember that livereload needs an active connection between device and computer. You can list targets with -list.įor Android and iOS, you can setup Remote Debugging on your device with browser development tools using these docs. If you have multiple devices and emulators, you can target a specific one with the -target option. To use Cordova for this process instead, use the -no-native-run option. Finally, the native-run utility is used to run your app on a device. Then, cordova build is used to compile and prepare your app. This command will first use ionic build to build web assets (or ionic serve with the -livereload option). Optionally specify the -livereload option to use the dev server from ionic serve for livereload functionality. Build your app and deploy it to devices and emulators using this command.
