AppStudio 3: Giving your app a EULA

In some cases, you will need your customer to agree to an End User License Agreement (EULA) before using your app. AppStudio 3 makes this easy to do.

Put the text of your agreement into EULA in Project Properties. The text can be any length and be formatted as HTML.

When your app starts, it checks to see if there is a EULA. If there is and it has not been agreed to, the EULA is presented as the first screen the user sees:

EULA

The user has the choice of agreeing to the EULA or hitting the Home button to exit. If the user agrees, the EULA disappears and the app continues normally. Next time the app is started, it remembers that the EULA has been agreed to and does not put up the screen again.

It remembers whether the EULA has been agreed to by setting a entry in localStorage.

You can check the value if you need as follows:

if localStorage.EULA=False Then
  MsgBox "Please agree to EULA to unlock all features of this app.
End If

AppStudio 3: Orientation Control

There is no way to stop someone from rotating their device. The screen is refreshes and your app probably doesn’t fit anymore. There are several ways to deal with this:

  1. Calculate new sizes and positions for all the controls and move them around.
  2. Compile using PhoneGap, setting its orientation preference to not rotate your app.
  3. Take advantage of the opportunity to display something else – like a status report.
  4. Use the new Orientation control to ask your user to rotate back.

In this post, we’ll discuss the last option.
Continue reading “AppStudio 3: Orientation Control”

AppStudio 3: Moving, resizing and hiding controls

When planning for AppStudio 3, we realized we had to improve moving, resizing and hiding controls. There was little consistency: jQuery Mobile controls working differently than iWebKit, the names of the objects to be altered was inconsistent, jQeury Mobile 1.3 broke some stuff and certain operations that worked on Chrome and the desktop did not work at all on some versions of Mobile Safari.

Here’s what we did.
Continue reading “AppStudio 3: Moving, resizing and hiding controls”

Add cool stuff to AppStudio!

AppStudio comes with a lot of stuff built into it. But people are always inventing more: when we designed AppStudio, we made it extensible. Here is a general guide for adding cool features into AppStudio:

  1. JavaScript API: Look for a JavaScript API or library. If there is one, it will be fairly easy to use from AppStudio.
    http://blog.nsbasic.com/?p=703
  2. PhoneGap is used when the needed functionality is only in native code. Check first if there is an official PhoneGap plugin that does what you need. It’s good news if there is – you can use the relatively easy PhoneGap Build service from AppStudio’s Run menu.
    http://docs.phonegap.com/en/2.3.0/index.html
  3. Third party PhoneGap Plugin: These will work from AppStudio, but you will need to compile your app using the PhoneGap SDK. That means downloading and configuring the SDK for iOS and Android. Here are a couple of tech notes to get you started:
    iOS: http://wiki.nsbasic.com/Using_PhoneGap_to_create_an_iOS_App
    Android: http://wiki.nsbasic.com/Using_PhoneGap_to_create_an_Android_APK
  4. Write your own PhoneGap Plugin: If the above solutions don’t help, you’ll need to write your own plug in. You will need to use Java and the Android SDK for Android, Objective C and XCode for iOS.
    http://docs.phonegap.com/en/2.3.0/guide_plugin-development_index.md.html#Plugin%20Development%20Guide

Let us know if you find something cool that works with AppStudio!

PS. If you need help developing a PhoneGap plugin, let us know. We can create plugins on a contract basis.