Overview

Objectives

  • create a simple "Hello world" app using FeedHenry App Studio from a git repository

Prerequisites

  • FeedHenry App Studio account. You can sign up for free if you don't have one yet.
  • git installed on your computer
  • a github account

Tutorial

Step 1 : Create a "Hello World" app in github

  • Login to your github account, and create a new repository. During the creation process, github will show you some command to initialize the repository. run those commands to create your local repository and add the github repository as your remote repository.
  • Next, run the following command to create app folders and add a "index.html" file and push it to the remote repository:
mkdir -p client/default
echo "<h1>Hello World</h1>" > client/default/index.html
git add .
git commit -m "add index.html file"
git push origin master
  • Go back to your github page and refresh the page of the repository, you should see the newly created files there.
  • Copy the "Git Read-Only" url for later use.

Step 2: Create a "Hello World" app in the App Studio

  • After logging in to the studio, select the "Apps" tab.
  • On the "My Apps" page, select "Create An App". You will be presented with a wizard to guide you through the process. Select "Create an App from a Git repository":

  • Then you will be asked to give the details of the app. Let's set the name of app to "Hello World", set the description to "my first git app", paste the git url copied from last step to the "Git URL" field and "master" for the "Git Branch" field.
  • Your app is being created. Once it's finished, you will have the option to build the app.
  • You will be brought to the app detail view. From there you can manage the app, editor the app and see the app preview.

Step 3: Build the app for Android

Now we can build the app for Android. Normally this means you have to go to the Android developer website and download the Android SDK and run some commands manually to build it. However, this is not the case for FeedHenry. You don't need to do all of these at all.

  • On the same page in the studio as in last step, select "Manage" option on the left.
  • In the sub list, you will see a "Build" option. Select it
  • You will notice the editor area has been replaced with some mobile platform icons. Click on the "Android" platform.
  • You can then build for either "Debug" or "Release" version of the app. For now, we will build for "Debug". Click on the green "Build Now" button. You will find the button for building "Release" app is red. This means you can't build for "Release" yet because you havn't upload the necessary building resources. If you want to know why you need to upload building resources and how to do it, you can find more details in App Building Resources section.
  • Next, you can select which Android SDK version the app should be built for. Let's choose "2.2" for this app. Then "Next"
  • Now your app is building. You will see some logging information about the build process. Once the build is finished, the browser should start to download the built binary file (.apk) file immediately. (Depends on your browser, you may be prompted for the location to save the file).

Step 4: Install the app on the device

There are several ways to install the app on your Android devices, you can see Deploying Apps to Android section for more details.

In this tutorial, we will use Dropbox.

  • Copy the downloaded .apk file to your Dropbox.
  • On your device, open the Dropbox app, you should see the file. (If you can't find it, refresh the Dropbox app.)
  • Click on it, Dropbox will download it for you. Once it's finished, you will be asked to confirm the app installation. Click on "Install".
  • The installation will be finished within a few seconds. Once finished, click on "Open".
  • You should see the app running on your device and see the "Hello World" text as you see in the app preview.

What's next

  • You can also do these using our Command Line Inteface(CLI) tool FHC
  • Learn more advanced skills and development tips in Training Labs
  • Found more details abou the studio and how to build an app in References
  • Checkout our API