Category Archives: Android Programming

How to Install Intel HAXM in a Machine with Hyper-V

Problem:

Intel HAXM helps speeding up Android emulators. However it cannot work in parallel with Hyper-V.

You want to install Intel HAXM without removing Hyper-V.

Solution:

Use the steps below to temporarily turn Hyper-V off to install Intel HAXM and launch Android Studio emulators.

  1. Open a Command Prompt or PowerShell as Admin
  2. Execute the command below to turn Hyper-V off
bcdedit /set hypervisorlaunchtype off

3. Restart your computer.

4. Install Intel HAXM

sdk

\extras\intel\Hardware_Accelerated_Execution_Manager\intelhaxm-android.exe
where

sdk

 is the location of Android SDK.

5. Verify Intel HAXM installation

sc query intelhaxm

To turn Hyper-V on again, use the steps below:

  1. Open a Command Prompt or PowerShell as Admin
  2. Execute the command below to turn Hyper-V off
bcdedit /set hypervisorlaunchtype auto start

3. Restart your computer.

 

How to completely uninstall Android Studio in macOS?

Problem:

You have an issue with Android Studio and want to reinstall it. In order to reinstall a fresh instance you need to uninstall the current version first.

Solution:

Execute these commands from the terminal:

rm -Rf /Applications/Android\ Studio.app
rm -Rf ~/Library/Preferences/AndroidStudio*
rm ~/Library/Preferences/com.google.android.studio.plist
rm -Rf ~/Library/Application\ Support/AndroidStudio*
rm -Rf ~/Library/Logs/AndroidStudio*
rm -Rf ~/Library/Caches/AndroidStudio*
rm -Rf ~/.AndroidStudio*

if you would like to delete all projects:

rm -Rf ~/AndroidStudioProjects

to remove gradle related files (caches & wrapper)

rm -Rf ~/.gradle

use the below command to delete all Android Virtual Devices(AVDs) and *.keystore. note: this folder is used by others Android IDE as well, so if you still using other IDE you may not want to delete this folder)

rm -Rf ~/.android

to delete Android SDK tools

rm -Rf ~/Library/Android*

Source: http://stackoverflow.com

Topic 9 – Introduction to Mobile Application Development

Why do I need to learn about mobile application development?

Desktop applications are very useful but their deployment and updating are daunting. Web applications overcome many limitations but you still need a workstation to work with it. This is often a PC or MAC that is too large and heavy to bring on-the-go.

Nowadays most of us always bring a mobile device with us everywhere. It’s very convenient if we could use our daily software inside our mobile devices. In order to  leverage our mobile devices we need to develop software for them.
Therefore you need to learn mobile programming.

What can I do after finishing learning mobile programming?

You can create applications like WhatsApp, Instagram or games like Temple Run, Angry Birds, Fruit Ninjia.

How interesting! What should I do now?

Mobile programming requires a lot of reading. You have to master at least a programming language and a mobile platform. Currently, there are 2 major platforms for mobile development: Android and iOS. There are 3 options for developing a mobile application:
– native Android application or
– native iOS application or
– hybrid mobile application.

The first option for learning mobile programming is Android programming.
If you are not familiar with Kotlin language, please read this Josh Skeen and David Greenhalgh (2018). Kotlin Programming – The Big Nerd Ranch Guide. Pearson Education book first.

After that please read this Bill Phillips et al. (2019). Android Programming – The Big Nerd Ranch Guide. Big Nerd Ranch Guides book.

After that please read
– this Cay S. Horstmann (2019). Core Java. Volume I – Fundamentals. Pearson book, and
– this Cay S. Horstmann (2019). Core Java. Volume II – Advanced Features. Pearson book.

The second option for learning mobile application development is iOS programming.
Please read
– this Mikey Ward (2020). Swift Programming – The Big Nerd Ranch Guide. Big Nerd Ranch book or
– this Matt Neuburg (2021). iOS 14 Programming Fundamentals with Swift. O’Reilly Media book first.

After that please read
– this Christian Keur and Aaron Hillegass (2020). iOS Programming – The Big Nerd Ranch Guide. Big Nerd Ranch book or
– this Jonathon Manning et al. (2018). Learning Swift – Building Apps for macOS, iOS, and Beyond. O’Reilly Media book.

A complementary part of this option is Objective-C. Please read
– this Stephan G. Kochan (2014). Programming in Objective-C. 6th Edition. Addison-Wesley book or
– this Neil Smyth (2012). Objective-C 2.0 Essentials book.

The third option for developing mobile applications is

(i) to leverage C# language and the Xamarin framework; please read this Charles Petzold (2016). Creating Mobile Apps with Xamarin.Forms book; or

(ii) to leverage HTML/CSS/Javascript language and the Ionic framework; please read this Jeremy Wilken (2015). Ionic in Action: Hybrid Mobile Apps with Ionic and AngularJS book; or

(iii) to leverage HTML/CSS/Javascript language and the React Native framework; please read this Alex Banks and Eve Porcello (2020). Learning React Modern Patterns for Developing React Apps. O’Reilly book; then read this Bonnie Eisenman (2016). Learning React Native: Building Native Mobile Apps with JavaScript book; or

(iv) to leverage Dart language and the Flutter framework; please read this Priyanka Tyagi (2021). Pragmatic Flutter. CRC Press book.

Mobile is a great environment for games because of its mobility. If you are interested in developing games for Android please read this  Jayme Schroeder and Brian Broyles (2013). AndEngine for Android Game Development Cookbook book.

If you already have a background of C or C++ and want to develop games for both Android and iOS then please read
– this Roger Engelbert (2015). Cocos2d-x by Example: Beginner’s Guide book or
– this Raydelto Hernandez (2015). Building Android Games with Cocos2d-x book.

It seems that there are a lot of topics to learn. I am totally new to mobile programming. What are the only essential knowledge should I learn in order to reduce my learning time?

You could focus on these topics first?

– How to install necessary tools and create a Hello World application?

– What is the physical structure of a project and how to build it using both IDE and command line?

– How to deploy an application to Play Store or App Store?

– How to create UIs, transfer data between UIs, compose new UI using existing UIs using SDK features or frameworks?

– How to use built-in or 3rd party libraries to interact with camera, microphone, media player, GPS device, local files, local databases, external databases and external services.

– How to call native code libraries to improve performance or access low-level features.

Terminology Review:

  • Android.
  • iOS.
  • Native Apps.
  • Hybrid Apps.
  • Build Tools.
  • Views.
  • Controls.
  • Layouts.
  • Game Programming.
  • Game Development.
  • Native Development Kit.
  • Google Play Console.
  • App Store Connect.

After finishing learning about mobile application development please click Topic 10 – Software Requirements to continue.