Kotlin has a “Try Kotlin” page here ( https://try.kotlinlang.org/ ) where you can the language out in a browser. Android Studio 3 is the latest IDE from Google that allows you to develop apps in JAVA pr Kotlin for Android.

Learn Kotkin: Hello World Demo

Kotlin Hello World Code:

1

2

3

4

5

6

7

8

/**

* We declare a package-level function main which returns Unit and takes

* an Array of strings as a parameter. Note that semicolons are optional.

Goto the “SDK Manager” menu item under the “Tools” then “Android” menu.

You can Download additional Android SDK versions, updates and emulator environments. I would recommend you pre-download the Android 3.x to 8.x environments.

You can also download and create Emulated Android Devices in the Android Virtual Device (AVD) Manager menu.

You can choose an existing Android Device (emulated)

Create Your Own Virtual Device

You can also create your own Android virtual device (Emulated) for testing.

I have a physical Huawei Mate 9 device (for physical testing), I will set up a similar virtual device (but stick with 2GB ram instead of 4GB as my development Mac only has 8GB total ram).

You can choose an emulators device skin if you so desire. Many phone skins can be found online (e.g here, here and here). Samsung Developer page has a skins page here. Managing AVD user guide here: https://developer.android.com/studio/run/managing-avds.html. I don’t use emulator device skins as this uses much-needed memory and screen real estate.

When you are done configuring your virtual device image you may be prompted to download missing images (e.g in my case I need to download API 27/ Android 7.1.1).

Physical Device Setup (Enable Developer Mode)

You should always code on physical devices where possible (emulators are ok but have a handful of physical devices on hand to test on). I find the emulator crashes a lot on me.

5. Click “Next“. 6.You will need to choose the minimum API and Android version to support. If you choose a new API you may limit the potential users that can run your app and if choose an old API you will limit the potential features. In my case, I will choose 7.0 for my test project (but will choose 4.1 in public apps). Click “Help me choose” to see the percentage of users and features in each API version.

7. Clik “Next”

8. Choose “Empty Activity” and click “Next“.

9. Take note of Activity name of “MainActivity” and Layout Name of “activity_main” and click “Finish“.

Now that you have a new project you can start Emulatorkator (Tools, Android, AVD Manager then press Play next to your emulator of choice).

The official documentation on changing activity screens can be found here.

1. Rename the button from above from”Button” to ‘Hello World” 2. Add a new button can call it “buttonnextscreen” (set constraints if you wish to match the hello world button left and width).

3. Now you can add and a new target activity screen ( e.g Open your project in the treeview (1), select “New” (2), select “Activity” (3) and then choose the activity type you want (e.g “Empty Activity” (2) ).

5. In “MainActivity.kx” I edited the following (time to use Anko Intents and not just Anko toast)

1

2

//import org.jetbrains.anko.toast

import org.jetbrains.anko.*

I also wired up the new “Next Activity” Button

1

2

3

buttonnextscreen.setOnClickListener{

startActivity(intentFor<NextActivity>().singleTop())

}

Now you have wired up a button to change Activity Screens. The Android back button will fire the previous screen so there is no need to wire up a returning button (like on iOS).

This is the Next Activity screen that was called from a button (exciting eh).

Set and Read Textbox

After adding a textbox and button this is how I set and red text in a textbox control.

1

2

3

4

textbox.setText("Sample Text")

buttongettext.setOnClickListener{

toast(textbox.text.toString())

}

Create, Set and Read Local Class

I added a button (ID) called “buttoncreateclass” and setup a “setOnClickListener” (in onCreate) to create a class, fill it then output the data from the class to three textboxes (“textfirstname”, “textsurname” and “textage”)

Don’t forget to download updates (and enable auto updates) in the Android Studio IDE. At the start of this draft blog post, I installed Android Studio 3.0 (Four hours later a large 1.3 GB sized update was available), I had to download many smaller updates too.

This is a frequent update that would not go away for me.

Copying the app to an Android Device.

Once you have enabled debug mode you can copy apps to and from the physical device. You can build an APK by going to the “Build” then “Build APK’s” menu and build the file to your project folder (e.g “/Users/simon/AndroidStudioProjects/MyKotlinTestApp001/app/build/outputs/apk/debug/app-debug.apk“). You can then copy this file to your Android device (via the Android File Transfer app) and you can now run the app anytime you want away from your Mac.

Also before you copy and unsigned apps to your test device tyoiu will need to enable developer mode then enable the running of apps from “unknown sources“.

If you have any security apps instaled like Sophos you will be told that yiour app has a low rating.

Coming from developing iOS and desktop apps I decided on researching the current state of Android Security. I would strongly suggest you watch this video from Marcos Placona ( https://twitter.com/marcos_placona Developer Evangelist @ Twilio).

Adobe Experience Design (Beta) is now Adobe XD CC. You can now design, prototype, and share amazing user experiences for websites, mobile apps, and more — all in the same app. Adobe XD CC is similar to Balsamic Mockup software.

Adobe XD Intro

Here is a great video demoing Adobe XD.

Install Adobe XD

If you don’t already have Adobe CC installed you can download a trial here. If you are wanting to install on Windows you will need Windows 10 (Anniversary Edition). Adobe has minimum system requirements listed here.

Start a Project

After you start an iOS project you will be looking for controls to add to your prototype. Adobe XD CC offers where you can download UI Kits direct from vendors (a shame when you are used to XCode or Visual Studio having controls pre loaded).

Installing the Apple UI Design Resources

You will need to download the Apple UI Design resources for Design XD from the Apple site (use the menu in the screenshot below or click here), they do not come with Adobe XD CC.

Here is more information on using Adobe XD CC UI Kits.

Download the iOS 11 UI resources for Adobe XD CC from the Apple site.

You can now extract the iOS resource files from Apple for use in Adobe XD projects. When iOS 12 and Android 9 comes out you can download new UI Kits.

Once you extract the files from the zip file, run the ./iOS-11-AdobeXD/Fonts/San Francisco Pro.pkg file to install iOS 11 font on yoir system.

I could not find a way to install the UI Kits permanently into Adobe XD CC (Searching revealed you need to open templates (as a separate process or open file in Adobe XD (double-click on the file)) and paste elements into your project). This seems clunky.

Why use Adobe XD

You can use Adobe XD to prototype interfaces around the common activities a person may perform while using the apps you are prototyping. You can design an app’s onboarding, intro or user screens before actually developing the app.

Let’s create an iOS project. Start a new iPhone 6/7 Project AND open up a UI template file in a second Adobe XD program (e.g ./iOS-11-AdobeXD/UI Elements + Design Templates + Guides/UIElements+DesignTemplates+Guides.xd).

Now you can drag and drop elements from the UI template (from Apple) into an XD CC app prototype project

TIP: Apple has a great site explaining how you can design and deliver apps (open the Apple Human Interfaces – iOS Design Themes page here). Apple also has assets and guidelines available for marketing your apps here.

To make buttons interactive you will need to click the Prototype tab and then drag the blue tabs to the right of interactive elements to the target screens.

You can then press the play button to preview the app prototype simulated in software.

Export

You can now save and export your prototype app project to PNG, PDF, Web or other formats to others to send for reviewing.

Adobe XD is big on saving to the Adobe Cloud allowing others to see changes in real time. If you have linked assets in in your prototype project (say Photoshop files) anyone viewing an XD prototype on the Adobe Cloud can automatically see changes in real time (see then Adobe XD intro video above).

Running Prototypes on Real Devices

I was able to install Adobe XD app onto iOS, log in with my Adobe ID and the prototype popped up when I connected my iOS device to my Mac. More info here.

I was able to install the Android Adobe XD app and also sync a prototype app (Android was a bit slower to find the project but still the same process as iOS).

Today I was asked: Should I learn to code in Swift and what can I build? Swift 1.0 (http://www.swift.org) was launched in 2014 by Apple and it is a multi-platform programming language for iOS, macOS and Linux (but not Windows). Swift has gone through rapid changes recently and Swift 4.0 is the latest stable version. Swift updates can break a number of previous swift coding standards set in Swift 1.x, 2.x and 3.x so don’t get comfortable.

Advertisement:

Should a beginner learn Swift? Yes if you only want to develop apps for iOS and macOS and ignore Windows and Android platforms. Apple has released a learn to code in Swift app that will make learning swift much easier http://www.apple.com/swift/playgrounds/

Previously apple recommended developers use the Objective C language to code and compile apps for iOS and macOS. Objective C has been in production since 1983 and is very complex (loads of squiggles, square brackets and legacy classes).

Most smartphones and tablets run Android, not because they are better but because they are cheaper (that’s my opinion). A top of the line iPhone 6S+ costs $1500 where a reasonable Android phone will set you back about $130 to $400. I personally think Apple devices are faster, better and more secure but if you are developing you need to publish apps on android also. Apple devices are supported for a lot longer than Android devices ( Android support lifetime v Apple iOS ). Even the 5-year-old iPad 2 is getting the iOS 10 software update in September 2016. In 2017 iOS 11 does not run on an iPad 2.

Jumping right into Swift, Java, Objective C or Lua may not be a good idea if a plain old website will do. It depends on what you want to develop before you start coding. All developers should be able to knock up a website and database before jumping into making mobile apps. PHP ( http://www.php.net ) and MySQL ( http://www.mysql.com ) are good options for beginners making websites.

Development platforms like the Corona SDK http://www.coronalabs.com are a great option for beginners as it is easy to pick up and is super fast and supports eye-popping OpenGL animations and apps along with business apps. Corona allows you to code in a programming language called Lua ( https://www.coronalabs.com/learn-lua ) and compiles your app to the iOS/Android/macOS or Windows desktops. How cool is that.

Corona wraps a common interface (API https://docs.coronalabs.com/API/index.html) over each platforms API so your code calls the corona API and when you compile your app the platforms native API methods are called.

Ok, you have an Apple or Android device and want to develop mobile/tablet apps. The first thing you will need is an Apple computer, Apple Developer Subscriptions to develop Apple apps and a Google developer subscription for Android along with some software. You can develop on Windows but it requires emulating the Mac OSX and it is not recommended. I started developing on a $699 Mac Mini computer running the Apple OSX Operating system.

This guide covers Apple app development steps now, I will be adding Android and Windows Phone building steps soon..

Before you begin I will assume..

you have an Apple computer (running the latest system version of Apple’s operating system).

Apple have very robust security around apps and distribution. On Windows desktops you can make a program, upload it and have very little restrictions on putting malicious code in your app. Apple on the other hand do not allow you to put an app on your iPhone that you develop yourself unless you go through many hoops to first link your machine to a development account, application and development account/team. Follow the steps below to setup a brand new development machine to develop and distribute apps to a number of test devices locally.

1.07 Open XCode and go to XCode menu, Preferences and Accounts and click the + and Add Apple ID.

1.08 Sign in with your Apple developer account.

1.09 You will notice one or more Team names (depending on your account), Select the first team account in the bottom right list and click View Details.

1.10 Clicking Create on each of the Signing Identities will run a series of scripts to setup encryption keys and sync them with Apple.

1.11 Click Create next to all of the items except Developer ID Application and Developer ID Installer is what we need to make mobile and mac desktop apps. Developer ID signing identities are required for apps that are to be published outside of the Apple Desktop Gatekeeper protections.

1.12 OK, what happened above? Xcode created a bunch of certificates that are linked to your machine, apple servers and your development account. The certificates will last for 1 year only; you will need to refresh them in 11 months time. You can view these certificates by opening the Apple Keychain Access program.

Certificates found under the My Certificates group.

1.13 There are more certificates found under the Certificates group.

1.14 Although not mandatory I would highlight the new certificates and back them up. Select the certificates (shift click) and go to the Keychain Access File menu then click Export Items.

1.17 Now put these files somewhere safe away from your main development machine just incase you need to reactivate the certificates on a different machine

1.18 Now we can log back into https://developer.apple.com and open Certificates, Identifiers and Profiles and click on All under Certificates. You will see the certificates that XCode created for you.

1.19 But first we need to add some real test devices (iPhone’s and iPad’s) to the list of approved devices). Open the Devices area of your developer portal.

1.20 Every Apple device has a unique UDID inside it and we need to find it and add it to the list of known/approved devices we want to test apps on. We can only add 100 devices a year so don’t go nuts adding devices of mates.

To add your first test device plug it into iTunes and open the devices page and mouse click on the serial number.

1.21 When you see the UDID appear press CMD+C to copy the UDID to the clipboard.

1.22 Now go back to the Apple Developer Portal, open Certificates, Identifiers and Profiles, open Devices select iPhone (or your device type) and click the + and enter your device description and UDID. Be descriptive “Simon’s iPhone 6 Plus” and not just “iPhone”.

1.24 Now we can create an Application ID. Open Identifiers then click App IDs.

1.25 Your first App certificate should be a Wildcard App certificate. A wildcard certificate allows you to build many different test apps using the one certificate (the downside is a wildcard app cannot receive push notifications and some other functions). A wildcard allows you to quickly mock up a new app and build it in seconds.

Enter “App Wildcard” in the name, select Wildcard App ID radio button, and “com.yourcompany.*” (change your company name to your company name) in the Wildcard App ID.

Corona comes with loads of demo projects and you can open a project and view it in the simulator and or build it straight away,

1.41 I opened the Button Events demo and instantly went to Corona’s File, Build then iOS menu. Select a certificate that you want to use to build the app. A device can have hundreds of apps on it that were built with the Wildcard certificate or one app per dedicated app certificate.

1.42 Corona saves an app file on the desktop (if that is where you saved to). Open Xcode and click Window then Devices menu

1.43 Plug in your device and it should appear in Xcode’s list of devices. Simply drag the app to your device to upload it to your device.

1.44 You can see the compiled app on the desktop and the uploaded app on the device.

1.55 You can see the simulated app on the desktop and the real app on the device. Congratulations.

2. Android device setup.

2.01 You will need to install the Apple Java Runtime to be able to build Android apps on Corona.

2.02 Optional: Install the Android Developer Studio ( also requires JDK7). The full blown Android Developer Studio allows you to run older versions of Android in simulators.

2.02.01 Open the Android Developer Studio app.

2.02.02 Click Next.

2.02.03 If you do not have JSK installed goto the next step to download it.

You may have troubles actually getting files onto your Android 4.x or 5.x devices as some distributions of Android block USB mode. You may need to enable running of apps from unknown sources (Settings -> Security).

Open the Terminal

Type “cd /Users/USERNAME/Library/Android/sdk/platform-tools”

Type “./adb devices”

2.02.16 How to copy new apps to the device via Command Line (if you do not want to use vendor software to transfer files)