Category Archives: Android

Ionic – How to do Check All with Ion-Checkbox

This blog represents code sample to achieve “Check all” or “Select all” using ION-Checkbox. AngularJS/Ionic Controller Code to Check All Say, you have a list of contacts (name) with check boxes. What you want is to achieve “check all” when you check one checkbox. $scope.allcontacts is a temporary object to capture the checkbox checked value. $scope.allcontacts = {}; $scope.allcontacts.checked = false; $scope.checkAll = function() { if ($scope.allcontacts.checked) { $scope.allcontacts.checked = true; } else { $scope.allcontacts.checked = false; } for (var i=0; i < $scope.contacts.length; i++) { $scope.contacts[i].checked = $scope.allcontacts.checked; }; }; HTML Code including Ion-Checkbox to Achieve “Check All” <ion-list> <ion-checkbox class=”item-checkbox-right” ng-model=”allcontacts.checked” ng-checked=”allcontacts.checked” ng-click=”checkAll()”> All Contacts </ion-checkbox> <ion-checkbox ng-repeat=”contact …

Continue reading

Posted in Android, AngularJS, Javascript, Mobility, Web. Tagged with , .

Android – ADB Shell Batch Scripting – Automate SQLite Database Copy

This is a quick blog to represent tips on how one could run multiple adb shell commands as part of one windows batch script or automate SQLite database copy to local filesystem. Say, you have got to copy the SQLite database from within your app to your local filesystem. The commands could be found on one of my earlier blog: http://vitalflux.com/ionic-how-to-copy-sqlite-database/ Copy following commands in a text file, say, commands.txt run-as package-name-of-the-app chmod 666 databases/database_name exit cp /data/data/package-name-of-app/databases/database_name /sdcard/ run-as package-name-of-the-app chmod 600 databases/database_name exit exit Write following set of commands in another batch script (.bat file) and name it as, say, adb.bat. del database_name cmd /c adb shell < commands.txt cmd …

Continue reading

Posted in Android, Mobility. Tagged with .

Ionic – How to Access or Browse SQLite Database

The blog represents instructions on how could you access or browse SQLite database embedded in your android app. The way that works for me is to copy the database on to my system and access the same. Make sure you connected your mobile phone to your laptop/desktop. Check with command “adb devices” to see that your device (phone) is listed. Following commands can be used to get the Cordova SQLite database on your hard-disk filesystem: adb shell run-as package-name-of-the-app chmod 666 databases/database_name exit cp /data/data/package-name-of-app/databases/database_name /sdcard/ run-as package-name-of-the-app chmod 600 databases/database_name exit; exit Once you are on system command prompt, execute following command to copy the database file to current directory …

Continue reading

Posted in Android, Mobility. Tagged with , .

5 Steps to Release Your Ionic App to Google Playstore

This article represents tips/steps and code sample which can be used to release your ionic app on Google playstore. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Create Release Build Following command can be used to create release build for Android. This will generate a release build based on the settings in your config.xml. For every new release, you may want to change the version in config.xml file. cordova build –release android By executing above command in the home directory, one could find generated apk file with name such as android-release-unsigned.apk in the path platforms/android/build/outputs/apk. Create One-time Private …

Continue reading

Posted in Android, Mobility. Tagged with , , .

Android Development & How to Setup Mobile Device

The article presents quick tip on how to have your android app (developed using Android IDEs such as Eclipse or Titanium-based IDE) installed on your mobile device and have them tested right from your mobile device rather than from emulator.   While trying to get this done with both Samsung and Motorola mobile handset, I failed on following front when I was working with Titanium IDE:   Titanium IDE was unable to detect android device. All that I did was connect my mobile device and laptop with a cable and, expected magic to happen.   After doing a little research, I figured out what needs to be done on both …

Continue reading

Posted in Android, Mobility. Tagged with .

Cordova Hello World with AngularJS & Bootstrap

The article presents a quick code sample to get started with Cordova or PhoneGap and AngularJS and Bootstrap CSS framework.Interesting thing to note is that the development can be be same as if you are developing an AngularJS & Bootstrap Web app. This is inline with PhoneGap or Cordova being used to create a Hybrid mobile app. Following are simple steps to get started: Create a HelloWorld app with Cordova or Phonegap. Take a look at our previous article on how to get started with Cordova Hello World app. Once setup, what you have got is www/index.html where you could put your Bootstrap CSS path and AngularJS path. As like …

Continue reading

Posted in Android, Mobility. Tagged with , , .

Cordova Hello World with Android & Eclipse IDE

This article is aimed to get you started with Cordova, an open-source mobile development framework, with Eclipse IDE and write your first Android app, Hello World. Read about what is Cordova, how & who should use it on this page. Following will be detailed in this article: Why Cordova? Setup Cordova with Android Create Cordova Hello World App with command-line interface (CLI) Setup Cordova Hello World App into Eclipse Why Cordova? Following are some of the reasons why you would want to use Apache Cordova mobile app development framework. Well, following can be same for other Mobile development framework such as Titanium. If you are a web developer and want …

Continue reading

Posted in Android, Mobility. Tagged with .

Tips to Quickly Get Started with Android Hello World!

android hello world

The article is written for those curious ones (Java developers at all level) who want to quickly get started with Android programming. This is what I did and got started with few hiccups (in relation with starting ADB server) to get the hello world done. Download right set of tool: Visited the android SDK download page where I got option to download appropriate libraries/tools based on whether I am using one of the existing supported IDE such as eclipse. Although, I am an experienced Java developer and use Eclipse, I rather went with downloading entire ADT bundle consisting of eclipse and SDK platform/tools. Choosing System Type: While I downloading I …

Continue reading

Posted in Android, Mobility. Tagged with .