Vuforia Basics + Creating a multiple image target Android AR 1/2

Prerequisite

  1. A Vuforia Developer account. Register here
  2. A few images. You can download some from https://pixabay.com/
  3. Unity with Mobile Development and Vuforia installed. Here’s how to install it

Adding Image Targets to Vuforia Developer Portal

Login to Vuforia Developer Portal

Create a development key for your app

You only need one development key for one app. Regardless how many markers you will use inside the app.

Click Get Development Key

Type in the name of your app, agree with the terms and condition, and press Confirm

Done on this part. Our newly created Development License Key will appear in the License Manager

Create a target database

First, you need to create a target database to store all your Image Targets

Click on Target Manager

The Target Manager appears, click Add Database

A create database window appears. Type in your database name, and make sure the type selected is Device. Click Create.

Our database now appears inside target manager. We are done creating the database.

Accessing the Database

Click on the database name to access it

_______________ Repeat for each image target from here ______________________

Add Image Target to the Database

Our database’s window appears. Click Add Target

Add Target Window appears.

Make sure the Target Type is Single Image

Click Browse, select your image and click Open

Type in 1 as the Width

Press Add

Your Image Target will now appear in the Database.

Now, repeat these steps to Add Image Target to the Database. I have put in a note from where to start repeating the steps till the end.

_______________ Repeat for each image target till here __________________

Once done adding all your images, your database will look something like this.

Downloading the image database

Click Download Database

Download Database window appears. Select Unity Editor and click Download

Wait a while for the database to compile

Once the download is done you will get a .unitypackage file like this

This is the end of Part 1. In Part 2, we will start to setup Unity and Vuforia. See you in the next tutorial.

How To Install Unity with Mobile (iOS and Android) Build Support and Vuforia

Download and install Unity Hub

Go to unity3d.com/get-unit/download

You will see two options. One is to install Unity only, second is to use Unity Hub. Download and install Unity Hub

Why Unity Hub?

Unity Hub allows you to manage and install addons and plugins easier. It will also help maintain multple versions of Unity. Why? Later on in your development life you will realise that unfortunately different people uses different versions of Unity for development. With the hub you can install their versions too, and access their project without screwing up your own project that uses your version of Unity

Installing the latest Unity in Unity Hub

Start up Unity Hub, you will see something like this. Press Add

Add Unity Version window appears, select the latest release of Unity and click Next

You will be asked which components to install. Scroll down and select Vuforia Augmented Reality Support

Then, make sure the options other options shown below are selected. Then, click Next

Unity will begin downloading and installing. Once done, it will look like this picture below.

That’s all on how to install Unity for Mobile Development with Vuforia Support

Publishing Your Android App to Play Store – XZIMG Augmented Vision Tutorial 5 of 7

Filling in App Content settings

Click on App Content

App Content window appears. Click Start

The first question is Target Age. Select your Target Age Group and click Next

The next question is whether the app could unintentionally appeal to children. you may select Yes or No. If Yes a ‘Not designed for children’ label may be shown next to your app on Google Play. In this example, I chose No.

Select your answer and click Next

A summary will appear, read it and if it is correct, click Submit

Success. Now a green checkmark appears beside App Content

Publishing Your Android App to Play Store – XZIMG Augmented Vision Tutorial 4 of 7

Setting the Pricing and Distribution

Click on Pricing and Distribution

Pricing and Distribution window appears. Firstly, select whether the application Free or Paid. In this example, for simplicity I will choose FREE

Under Countries, select the countries that you want the app to be available.

Scroll down further, there is a question on whether your app contain ads, in this example, I will select No

Under Consent, you need to agree to follow Content guidelines and US export laws. Then, click Save Draft

We are done with setting Pricing and Distribution a green checkmark will appear beside Pricing and Distribution

In the next tutorial, we will fill in our App Content section. See you in the next tutorial

Publishing Your Android App to Play Store – XZIMG Augmented Vision Tutorial 3 of 7

Setting the Content Rating

Click Content Rating

The content rating window appears, click Continue

The content rating Questionaire appears. Firstly, lets fill in our email address and confirm it.

Next we will select our app category. Based on your app type, you will have to answer different set of questionaire. In this example, I will click Reference but yours maybe different.

You will be asked a lot of Yes and No questions, answer all of them and press Save Questionnaire

If there are no errors, the Calculate Rating button will become blue. Click Calculate Rating

Yeay! we now have generated the Content Ratings. Click Apply Rating

Our ratings are now applied. You will see a green checkmark at Content Rating. Next, we will set Pricing and Distribution

See you in the next tutorial

Vuforia: Playing Sound when image detected and stop sound when image lost. The simplest way (2021 Updated)

Prerequisite

  1. A sound, you can find some free sounds from here http://soundbible.com/

Lets Start!

Drag and Drop the sound to your ImageTarget

Playing sound on Image Detected

While your ImageTarget is selected, on the Inspector window drag and drop AudioSource to the On Target Found() Object slot

Click the function selector and select AudioSource > Play()

Stopping sound on image lost

While your ImageTarget is selected, on the Inspector window drag and drop AudioSource to the On Target Lost() Object slot

Click the function selector and select AudioSource > Stop()

Final check

Default Trackable Event Handler should now look like this

Done, lets test it!

When image is detected, you sound will play and when image is lost, the sound will stop.

I have multiple Image Targets and sound to implement. How?

Its okay you now know all you need to know to do this. All you have to do is repeat these steps from “Let’s Start” to the end for each of your Image Target.

That’s all, happy creating

Publishing Your Android App to Play Store – XZIMG Augmented Vision Tutorial 2 of 7

Registering For A Google Play Developer Account

Note: You would need to pay a 25$ registration fee in the payment step

Go to https://play.google.com/apps/publish/signup/ and sign in with your Google Account. If you don’t have Google Account, you need to create a new one.

An Agreement Page appears. Agree with the agreement and click Continue To Payment

A payment window appears. Complete the details and press Buy

Finally, after the payment, fill in the Developer Profile form and click Complete Registration

You will then be able to access the Google Play Console. This means your registration is now complete. You would notice though that there will not any app registered unlike my account.

Publishing our app to Google Play Console

Click Create Application

A window appears. Fill in the title of your application and press Create

Uploading the App Bundle (.aab)

Click App Releases

For the purpose of simplicity we will skip beta testing and assume that our program is already the Production version of things. Wooooow. Under Production Track, click Manage

Click Create Release

You will be asked to let Google manage and protect your app signing key, press Continue

Click Browse Files

A file window opens, select our .aab and click Open

Once upload is done, the Android App Bundle will be shown together with its version code and size.

Scroll down to What’s new in this release? Then type a simple description of the changes you made to the app. Since this is the initial release, lets type in “This is the initial release of the application” and press Save

We are not done yet, don’t click Review. Next, we will set a Content Rating

See you in the next part of the tutorial

Publishing Your Android App to Play Store – XZIMG Augmented Vision Tutorial 1 of 7

Introduction

In the previous tutorial post, I have taught you how to publish a test app to Android. In this tutorial we will cover the topic that is a must for developer creating apps for Android, which is Publishing your Android App to Play Store.

  • This tutorial will be broken down to 7 parts. They are:
    • 1 : Getting your app ready and publishing it as Android App Bundle (.aab)
    • 2: Registering Google Play Console account and uploading the aab
    • 3: Setting the Content Rating
    • 4: Setting the Pricing and Distribution
    • 5: Setting App Content description
    • 6: Setting Store Listing
    • 7: Final Steps and Publish!

Prerequisite

You need a few things in order to put your app to the Play Store. If you are not a graphics guy, you would need to ask a friend with such knowledge to help with the graphics part.

  • A privacy policy for your app. You can get one from https://www.websitepolicies.com/. Websitepolicies.com will provide you a public link to your policy. This is what you will need later.
  • Graphics for Play Store
    • 2 Screenshot of your application (Don’t know how to screenshot? Learn Here)
      • JPEG or 24-bit PNG (no alpha)
      • Minimum dimension: 320 px
      • Maximum dimension: 3840 px
    • 1 High Resolution Icon for your apps
      • 32-bit PNG (with alpha)
      • Dimensions: 512 px by 512 px
      • Maximum file size: 1024 KB
    • 1 Feature Image
      • JPEG or 24-bit PNG (no alpha)
      • Dimensions: 1024px by 500px
  • Descriptions for your App
    • 1 Title (The name of your app)
    • 1 short description of your app (80 characters max)
    • 1 long description of your app
  • Note: All your descriptions must not contain:
    • User testimonials
    • Excessive details
      • OK : “This is an AR app on cats, for cat lovers”
      • Don’t: “this is an AR app on cats, brown cats, blue cats, silver cats, cat food , cat drinks, cats getting drunk in a bar and starting a fight, and many other cats”
    • Misleading references to other apps or products
    • Repetitive, excessive, irrelevant keywords, keyword spamming
  • Avoid including these:
    • Sexually suggestive images
    • Profanity and vulgarity
    • Graphic violence
    • Depictions of illegal drug use

Preparing for our App for deployment

Go to File > Build Settings > Player Settings

Change the App icon

Drag and drop your created app icon into Assets folder in Unity

Drag and Drop the icon to the Default Icon in the Project Settings

Creating a Keystore

Under Publishing Settings, Click Keystore Manager

In the Keystore Manager, Click the Keystore menu and select Create New > Anywhere

A save file window appears, save this keystore file somewhere safe.

Do not, i repeat do not lose this keystore file. Backup it multiple times! Without this keystore you will permanently unable to update your application. Both in Unity and in Play Store.

Next, we need to fill in the details as explained by the picture example below

Click Add Key

A keystore created confirmation window appears, click Yes

The key has now been set, under Project Key, click the Alias menu and select our newly created key value

Building our Google Play App Bundle

In the Build Settings window, select Build App Bundle (Google Play), then click Build

A save file window appears, select a folder to put the built file in. In my example, i put it in a new folder named AAB. Click Save

Once done, you will have an aab file in your folder

This is the end of Phase 1, in Phase 2, we will upload our app into the Play Store

How To Install Unity with Mobile (iOS and Android) Build Support

This is a general tutorial on how to install Unity with Android Build Support. This is intended for those following my AR tutorials, but this works just as well if you just want to install Unity.

Download and install Unity Hub

Go to unity3d.com/get-unit/download

You will see two options. One is to install Unity only, second is to use Unity Hub. Download and install Unity Hub

Why Unity Hub?

Unity Hub allows you to manage and install addons and plugins easier. It will also help maintain multple versions of Unity. Why? Later on in your development life you will realise that unfortunately different people uses different versions of Unity for development. With the hub you can install their versions too, and access their project without screwing up your own project that uses your version of Unity

Installing the latest Unity in Unity Hub

Start up Unity Hub, you will see something like this. Press Add

Add Unity Version window appears, select the latest release of Unity and click Next

You will be asked which components to install. Make sure the options shown below are selected. Then, click Next

Unity will begin downloading and installing. Once done, it will look like this picture below.

That’s all on how to install Unity for Mobile Development

Building a test build of our project on Android

Prerequisite

To follow this tutorial, you need to complete the previous tutorial on building our application on PC

Switch the Build Settings to Android

Go to File and select Build Settings

The Build Settings window appears, under Platform, select Android and click Switch Platform

Unity will start to switch the application to Android format

Once the switch is completed, under Platform the Unity icon will now appear at the Android instead of the PC

Customizing the Android player settings

Press Player Settings

Player Settings window will appear. Change Company Name, and Product Name to your own name

Check that App Orientation is Potrait

Press Resoultion and Presentation to expand its settings

Under Resolution and Presentation, make sure the Default Orientation is Potrait

Adjusting Other Settings

Press Other Settings to expand its settings

It will expand into a looong settings to something like this

Changing our Package Name

In the Package Name slot, change the Package Name to the format of com.yourcompanyname.product. For an example I used com.mycompanyyeah.test1.

Important Note! Pay Attention yeah:

  1. Your Company Name and Package Name, should be the same as previously entered at the Company Name and Package Name slot
  2. No spaces are allowed!

Set Scripting Backend to IL2CPP

Make sure the Scripting Backend is IL2CPP

Set Target Architecture

Check ARMv7 and ARM64. ARM64 is compulsory as now Play Store will only accept app that support ARM64. ARMv7 is selected so that we can support older devices.

Press Build Button to Build our apk

Select where to save the .apk

A window appears, lets put our apk to the desktop

The APK will start building

Our test APK will appear. Copy it to your Android Phone and install it

Don’t know how to install an APK? Click this link and read the tutorial here

Testing our AR on Android

Run our installed Test App and scan our Image Target. It should work now. Yeah!