Difference between revisions of "Mobile Development"

From Sinfronteras
Jump to: navigation, search
(Cordova/PhoneGap)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
 +
<br />
 
==Device Considerations==
 
==Device Considerations==
  
Line 31: Line 33:
  
 
<br />
 
<br />
 
 
===Form factor===
 
===Form factor===
 
* Most platforms/OSes run on multiple devices, some more than others
 
* Most platforms/OSes run on multiple devices, some more than others
Line 38: Line 39:
  
 
<br />
 
<br />
 
 
==Native vs Hybrid Frameworks==
 
==Native vs Hybrid Frameworks==
  
  
 
<br />
 
<br />
===Native Application 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
 
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
  
Line 58: Line 58:
  
 
<br />
 
<br />
 +
====[[Mobile_Development#Android Studio|Android Studio]]====
  
 +
 +
<br />
 
===Hybrid Frameworks===
 
===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)
 
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)
Line 73: Line 76:
 
:* Going through so many higher-level languages and interpreters makes run-time much slower than a native application
 
:* 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.
 
:* 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.
 +
 +
 +
<br />
 +
====React Native====
 +
 +
 +
<br />
 +
====[[Cordova - PhoneGap]]====
 +
 +
 +
<br />
 +
====[[Ionic and Capacitor]]====
 +
 +
 +
<br />
 +
==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 <code>Capacitor</code>, 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 <code>studi.sh</code>, we need to follow the setup wizard to configure, among other things, <code>android SDK</code>.
 +
 +
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:
 +
* https://developer.android.com/studio/run/emulator-acceleration?utm_source=android-studio#vm-linux
 +
* https://help.ubuntu.com/community/KVM/Installation
 +
 +
Then, we just need to add the paths to our ~/.bashrc:
  
  
 
<br />
 
<br />

Latest revision as of 15:30, 21 June 2020


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: