Mobile Development

From Sinfronteras
Revision as of 13:22, 23 December 2019 by Adelo Vieira (talk | contribs) (Ionic and Capacitor)
Jump to: navigation, search

Device Considerations


Platform

Will you be developing for multiple platforms?

  • Android
  • iOS
  • Windows 10 Mobile
  • Blackberry 10
  • Firefox OS
  • Sailfish OS
  • Tizen
  • Ubuntu Touch
  • CynaogenOS



Hardware

  • Depending on the device, the specifications of hardware can be very different
  • Some devices may not have certain components
  • Vintage of components, such as processors and busses will make a difference to the chosen route



Language

  • What programming languages are supported natively by the device?
  • What language suits what you want to do best?
  • Do you need a combination of languages for collaborative tasks?



Form factor

  • Most platforms/OSes run on multiple devices, some more than others
  • Can your application be utilised on all form factors regardless of screen/size?



Native vs Hybrid Frameworks


Native Frameworks

Native application frameworks allow developers to access the native platform/OS API directly through code and develop their applications directly to the platform standards and practices


  • Pros:
  • Without other intermediate layers, this provides the best application per device in terms of performance
  • There is no third-party dependence on access to updates and bug fixes


  • Cons:
  • As a native application is written and compiled for a specific platform/OS, deployment on another platform typically requires the maintenance of a totally separate project for each of the supported platforms.
  • How the application is distributed can be different for each platform, requiring the maintenance of a separate distribution channel per platform


Hybrid Frameworks

Web-based frameworks are essentially tools/processes/procedures that allow us to write an application as a website rather than using any native code (e.g. PhoneGap/Cordova)


  • Pros:
  • Anyone with basic web-development skills (HTML, CSS, JS) can write a decent application.
  • There are several frameworks to choose from.
  • It is possible to wrap the content in an application or just access it with the built-in browser.
  • Applications can be accessible across multiple platforms.


  • Cons:
  • Going through so many higher-level languages and interpreters makes run-time much slower than a native application
  • Each platform has a unique style and mode of operation. This gets lost in a web-based application or, at least, requires a lot of work to make it seem intuitive for each platform.



Android Studio

https://developer.android.com/studio

Java version for Android Studio/Android SDK: https://android.tutorials24x7.com/blog/how-to-install-android-sdk-tools-on-ubuntu

Note: Before I installed Android Studio, there were already in my home directory these two folders: .android .AndroidStudio3.5 I don't know why because I haven't installed Android Studio before. It is possible that they were added when I try to build my ionic project using Capacitor, which requires Android Studio I think so, but I'm not sure about it.


To install Android studio just go to the official web site, download the package. After unzipping, you will have this folder:

android-studio 

that already contain the bin files that can be just executed to open Android Studio. I have created a directory (./androidStudio) in my home and placed the above directory into it:

./androidStudio/android-studio

Then, we just need to execute the following file to open Android Studio:

./androidStudio/android-studio/studio.sh

The first time we execute studi.sh, we need to follow the setup wizard to configure, among other things, android SDK.

I have configured this path for android SDK: ~./androidStudio/.androidSDK

When I finished the setup wizard I got a message saying that my computer support hardware acceleration for the Android Emulator. To install and configure it you can follow:

Then, we just need to add the paths to our ~/.bashrc: