Web Apps

As the PhoneGap Developers App isn’t availible on iOS decided and was incompatible with the tablet I had due to it having the wrong version of android OS I decided to buy a new tablet that had the correct version of android. PhoneGap requires version 5.0 and above so I purchased a tablet that uses version 9.0 and the app was still incompatible with my device. I then decided to downlod the adk of PhoneGapDeveloper, which I was able to install and run but it did’t connect to the applications I was attempting to test on my deskop. This was frustrating, but I figured out after some research on message boards about the application that there is a long list of requirements for devices to be compatible with PhoneGap Developer.

API Levels Supported

  • 15+

Hardware Requirements

  • android.hardware.BLUETOOTH
  • android.hardware.CAMERA
  • android.hardware.LOCATION
  • android.hardware.location.GPS
  • android.hardware.location.NETWORK
  • android.hardware.MICROPHONE
  • android.hardware.screen.LANDSCAPE
  • android.hardware.sensor.ACCELEROMETER
  • android.hardware.sensor.COMPASS
  • android.hardware.TOUCHSCREEN
  • android.hardware.WIFI

Permissions Required

  • android.permission.ACCESS_COARSE_LOCATION
  • android.permission.ACCESS_FINE_LOCATION
  • android.permission.ACCESS_GPS
  • android.permission.ACCESS_LOCATION_EXTRA_COMMANDS
  • android.permission.ACCESS_NETWORK_STATE
  • android.permission.ACCESS_WIFI_STATE
  • android.permission.BLUETOOTH
  • android.permission.BLUETOOTH_ADMIN
  • android.permission.CAMERA
  • android.permission.GET_ACCOUNTS
  • android.permission.INTERNET
  • android.permission.MODIFY_AUDIO_SETTINGS
  • android.permission.READ_CONTACTS
  • android.permission.READ_EXTERNAL_STORAGE
  • android.permission.READ_PHONE_STATE
  • android.permission.RECORD_AUDIO
  • android.permission.RECORD_VIDEO
  • android.permission.VIBRATE
  • android.permission.WAKE_LOCK
  • android.permission.WRITE_CONTACTS
  • android.permission.WRITE_EXTERNAL_STORAGE
  • com.google.android.c2dm.permission.RECEIVE  (Pindoria, Suraj 2016)

I brought this issue to my coding lecturer and he suggested I develop the applications as a web application, which is what I would be doing with PhoneGap anyways. I could then test the application on the device using our college webserver (webdevcit.com). I can get javascript plugins that allow me to make the application full screen and allow me interactivity such as swiping (jquery gestures). I can still then transfer the app files into phonegap and export the application from there at the end of the project, I would just be cutting out the middleman during the development phase.

Making Web Applications Fullscreen

There are several easy ways to make a website fullscreen, you can request the browser to go full screen in response to a user gesture, you app download the website to the homepage, or you can auto hide the address bar. ( Making Fullscreen Experiences, 2019)

How I did this

  1. First I created a HTML and CSS file for the homepage
  2. I added this meta tag to the header of the HTML <link rel=”manifest” href=”/manifest.json”>
  3. I then created a JSON file containing this code
  4. I transferred all the files to the server and opened the web page in the browser. I then from the page settings added the website to the homepage
  5. I opened the application from my homescreen
  6. The Website is now Fullscreen

Drag and Drop Touch Events

On a mobile device there is not mouse, touch events must be used instead. There are plugins available for more complex gestures, but this is how I created a simple drag and drop touch event.

  1. Create HTML Element you want to move and give it an id
  2. Create an onload function, store the HTML element in a variable
  3. Add a touchmove event listener to this variable that triggers another function
  4. Prevent the default movements when the event is triggered
  5. Create a variable that stores the new touch location and use this to change the style of the HTML element.

Current Academic Paper

References

Pindoria, Suraj (2016, July 27) Current Software, Hardware, and Permissions Required.[online from comment] message posted to https://github.com/phonegap/phonegap-app-developer/issues/408#issuecomment-235703076

Making Full Screen Experiences, 2019 , Google Developer, viewed 11 March 2019, via https://developers.google.com/web/fundamentals/native-hardware/fullscreen/

Research on Application Development

My main responsibility for this project is the technical side of developing the application. I have decided to research all options available to us to ensure we choose the right option for our project. This post discusses both the research and the practical work I completed over the first three weeks of the Semester to help me properly understand our options with regards to application development. My work began with desk research and then began to evolve into getting hands on in an attempt to understand the tools that we have at our disposal.

Week One 28/01/2019

IOS Vs Android

This is a huge question that you have to considering when first developing an application and there are numerous factors to take into account. Demographically speaking iOS is a platform generally associated with more affluent users, it is the prominent platform in the US and it’s users and more inclined to spend money on applications. ( Teleman, Costi 2017 ) Android is the prominent platform in developing countries and amongst users who are spend money more consciously. Android is also much more prominent globally. (Katariya, Jayanti 2017)

“You have to consider the whole Android family-from low-range to mid- and high-range iterations when developing and designing your apps. ”

( Teleman, Costi 2017 ). Screen sizes and resolutions can be a difficult aspect of app development for Android because of the open nature system, many different brands and ranges of smartphones exist within the Android family as opposed to iOS which has a more standardised range of screen sizes and resolutions.

Development time is significantly shorter for iOS and hence it is much cheaper. iOS development requires a program called X Code which is only available on Mac. Android development can prove much more time consuming, it requires a program called Android Studio which uses Java and is available on Max, Windows and Linux. ( Teleman, Costi 2017 ).

It is generally agreed, from the resources I have read, that app development is easiIt is generally agreed, from the resources I have read, that app development is easier for IOS. Seeing as we have all got iphones and and ipad this would seem like the most sensible approach for us to take. App Development for IOS requires you to use the program Xcode and the scripting language SWIFT. The issue however lies within the fact that my laptop is a windows laptop, and as I am mainly in charge of the app development side of the project, this may cause an issue.

There are several solutions availible for this issue

  • Use the Macs availible to me in college to complete the coding needed.
  • You can pay for a service which allows you to remotely access a mac os from your PC and hence develop using said virtual OS. The fee for this service is 1 dollar an hour or 20 dollars a month. ”
    Before committing to buying a new Mac, you can actually “rent” one for development. You’ll remotely access the Mac and Xcode through your PC. “(Ching, Chris 2019)
  • We could also use a program like phone gap which allows you to use HTML, CSS and Javascript to develop an application that works on both IOS and Android

Week 2 04/02/2019

Phone Gap

The first option I have looked into using for developing our application is the adobe program PhoneGap. This program allows you to use basic principles of HTML, CSS and Javascript to create an application suitable for both iOS and Android.

I found this software extremely easy to use however I found a slight issue in the fact that the PhoneGap developers app was removed from the app store by apple recently and the issue hasn’t yet been resolved. As I only have an iOS mobile device currently at my disposal I couldn’t test the application on an actual device, only on my browser.

Below is the link to the extremely simple application I created using this software. I created this app to gauge which software will be the best for us to begin to develop our final application.

Pros

  • Applications can be exported to either iOS or Android
  • Relies on HTML, CSS and JavaScript which I already have knowledge of
  • Can use Cordova to access the functionality of the phone hardware
  • Fast and efficient testing using the PhoneGap Developers App

Cons

  • No UI widgets availible
  • PhoneGap developers app not availible on iOS

Phone Gap Test Application

Tutorials Watched

Week Three 11/01/2019

Android Studio

Now, although it is said that android development is slightly harder, it may be the solution to the issues with my laptop being a PC. Android development requires an application called Android Studio which can be used on Mac or PC. This would allow us to develop on any computer however we would have to display on an android device, which we are not currently in possession of. There are ways around that though such as using an android emulator or buying a cheap android device such as the lenovo 7″ tablet for around 50 euro.

I attempted to make a simple application in Android Studio Similar to the one I made in Phonegap However I really struggled with it. Android studio requires the programming language Java of which I don’t have any prior knowledge. to get a handle on Java I completed the code academy course on Java. I also found some manuals on learning Android Studio in the CIT library which would be useful if I were making a full application. I also watched some tutorials on Android Application Development.

Tutorials and Books Mentioned

The main issue I forsee with using Android Studio is the complexity of Learning Java from scratch and understanding it well enough to be able to develop a full application using it. I can follow the tutorials and books aforementioned however I am just copying what hey are doing in the tutorial and I have a very minimal understanding of how this works. This would become a big issue when I am trying to implement our own application as there will be no direct tutorial to follow. I am not confident in my ability to transfer my knowledge of Java from a tutorial and apply it to our own project.

Pros

  • Availible on Mac, Windows and Linux
  • Free Software, plenty of online learning resources
  • Would result in me havng a greater knowledge of Java

Cons

  • Would require me to learn a whole new scripting language from scratch
  • I have found Java very difficult up until this point and doubt my ability to transfer my learnings of onto our project
  • Development Process would probably be more time consuming as I can only use a certain amount of the base knowledge I have as a result of my studies
  • Development for One platform only

Xcode

Xcode development is much simpler and swift is an easier language to get an understanding of . The issue however is the fact that I could only develop for iOS by using a Mac or virtually renting one. As I will be putting a lot of work in both at home and in college into this project, it just doesn’t make sense for me to develop the application using a program I would essentially have to pay per hour of usage at home. So I basically have ruled out the use of Xcode for developing this application but it always there as a backup option it would just require me to use mainly the college computers.

Pros

  • Straightforward Software
  • Developing for a standardised screen size and resolution
  • UI Widgets Available

Cons

  • Can only develop on a Mac (either physical or Virtual)
  • Requires learning swift, which despite being easier than Java is still a new scripting language
  • Development for one Platform Only
  • Requires us to display on apple device (more pricey)

Conclusions

I have decided to move forward and get into prototyping using PhoneGap. The pros of using PhoneGap far outweigh the cons. It will allow me to expand on the skills I have been learning over the past four years, I am comfortable coding in the languages required for using PhoneGap, the software allows you to develop for both Android and iOS platforms and this will allow me to prototype and test efficiently. After speaking to my supervisor and conducting all the above research we decided that this is the most sensible approach going forward for our project and I am happy with this decision.

Bibliography

Jayanti Katariya (2017) Apple Vs Android – A comparative study 2017 [online] Available from URL : https://www.moontechnolabs.com/apple-vs-android-comparative-study-2017/ [ accessed 02/02/2019 13:50]

Teleman, Costi ( 2017), Android vs iOS App Development: A Comparison and Decision Guide [online], Available from URL : https://dzone.com/articles/android-vs-ios-app-development-a-comparison-and-de [accessed 02/02/2019, 14:45 ]

CHING, CHRIS (2019), XCODE FOR WINDOWS (12 WAYS TO BUILD IOS APPS ON PC) [ONLINE] AVAILABLE FROM URL : HTTPS://CODEWITHCHRIS.COM/XCODE-FOR-WINDOWS/ [ ACCESSED 04/02/2019,

18:30]

Academic Paper Current Progress