#Configuring ionic framework for android ##on 64 bit crunchbang, need to install jdk and 32 bit libraries for android:
-
sudo apt-get install ant openjdk-7-jdk lib32sdc++6 lib32z1 -
install 64 bit android-sdk-linux
-
cd ~/android-sdk-linux/tools -
./android update sdk --no-ui -
./android- add
tools,platform-tools,build-tools, EABI system images, etc
- add
-
./android avdand create an avd -
update PATH and environment variables
- add this to
~/.profile:
- add this to
if [ -d "$HOME/android-sdk-linux" ] ; then ANDROID_HOME="$HOME/android-sdk-linux/" ANDROID_PLATFORM_TOOLS="$HOME/android-sdk-linux/platform-tools/" ANDROID_TOOLS="$HOME/android-sdk-linux/tools/" PATH="$ANDROID_HOME:$ANDROID_TOOLS:$ANDROID_PLATFORM_TOOLS:$PATH:" fi
- `source ~/.profile`
- `sudo npm install -g bower ionic cordova'
- `ionic create myApp`
- `cd myApp`
- 'npm install && ionic platform add android`
- `ionic emulate android`
- Profit.
To hot update:
- `ionic build && adb install -r platforms/android/ant-build/AppName-debug.apk`
## To add [ngCordova](http://ngcordova.com)
`bower install --save ngCordova`
then add this line before including the corvoda script
```html
<script src="lib/ngCordova/dist/ng-cordova.js"></script>
<script src="cordova.js"></script>
To add firebase and [AngularFire](https://www.firebase.com/quickstart/angularjs.html]
add to index.html:
<!-- Firebase -->
<script src="https://cdn.firebase.com/js/client/1.0.17/firebase.js"></script>
<!-- AngularFire Library -->
<script src="https://cdn.firebase.com/libs/angularfire/0.7.1/angularfire.min.js"></script>add to js:
var myApp = angular.module("MyApp", ["firebase"]);
function MyController($scope, $firebase) {
var peopleRef = new Firebase("https://<my-firebase>.firebaseio.com/people");
// Automatically syncs everywhere in realtime
$scope.people = $firebase(peopleRef);
}