Tag Archives: ssl

Ten Tips For Building Stunning Professional Android Apps With Firemonkey

#1. Secure Your App’s Data Connections With SSL

If you are using the REST client or the TIdHTTP component in your mobile apps you should encrypt your connection with SSL to keep your user’s data secure. You can utilize services like CloudFlare and MaxCDN to simplify implementing SSL on your web servers. Or encrypt your data manually with these free components.

#2. Reduce Your Mobile App Data Usage With Data Compression

With mobile service providers charging by the gigabyte lowering data usage is important. If you are making any kind of HTTP connection to a web server from your Firemonkey apps you should enable GZIP compression on both your server and client. There is also an open source compression library for files available.

#3. Save A Shortcut To The Home Screen After Install

If you want users to be able to find your app again after they first install it you should add your icon to the user’s home screen. The user can remove it or it will automatically be removed if they uninstall your app.

#4. Create And Deploy Icons For Your App

You will need to create quite a few different icon sizes to deploy with your app and to upload to the app stores. Each of the four major app stores (Google, Apple, Amazon, and Samsung) have their own icon size requirements. There is a free utility available which makes this easier. A second free tool will help you make all the splash screen images you need.

#5. Handle App Activate And Deactivate System Events

Take action when the lifecycle of your app changes in events like FinishedLaunching, BecameActive, and EnteredBackground. Users multitask using Android these specific system events (and others) will be fired. You should add these events to your app and take action as needed. There is also a bonus component called TfgApplicationEvents which gives you OnIdle, OnOrientationChanged, and OnStateChanged.

#6. Keep The Focused Edit Field Visible Above The Virtual Keyboard

If the virtual keyboard pops up over your memo or edit control in the lower half of the device screen you will need to implement a solution to scroll the field into view. There is a demo included with the latest version of Delphi called ScrollableForm which demonstrates another way of doing it.

#7. Keep Your Mobile Apps Responsive With Native Progress Dialogs

While your app is doing work that the user must wait for you should display a native progress or activity dialog to keep the app responsive. Your app will do it’s work in the main app thread (or your own custom threads) and the native progress or activity dialogs will animate seamlessly in the foreground.

#8. Check Network Connectivity Before Trying To Connect

You should check if a user is connected to the internet before making any opening any connections that attempt to connect using the internet. This way you can notify the user if they do not have connectivity and your app can handle that accordingly.

#9. Handle The Android Hardware Buttons

Android devices have a back button which you should handle so your users will have an intuitive flow inside of your apps. On Android devices there is also the VK_MENU button which you can handle in the OnKeyDown and OnKeyUp events as well.

#10. Automatically Save Form State Between Sessions

A new event is available in Delphi XE7 called TForm.OnSaveState which gets called when your app is going to be hibernated by Android. There is a free class helper available that will loop through the controls on your from in the OnSaveState event and save them out to JSON. When you form is created you can load up the previous saved form state.

BONUS TIP: Google Cloud Messaging Push Notifications

If you want to keep connected to your users and increase retention you can use push notifications. On Android there is a push notification API from Google called Google Cloud Messaging. It is pretty closely tied to Google and you have to have API keys but keeping connected to your users is worth it. Push notifications are similar to an email newsletter. You can also do push notifications through the BaaS components via Parse and Kinvey.

DOUBLE BONUS TIP: Apply Premium Styles For A Professional Look

Delphi XE7 comes with 7 premium styles for Firemonkey that look fantastic. You can give your users the option to choose which style they want to use at runtime. The Jet style works particularly well in direct sunlight.

Finally, check out the older version of this post for Delphi XE5. Check out twelve tips for IOS. And find out tips for building games with Delphi Firemonkey.

Tags: , , , , , , , , , , , , , , , , , , , , , , , ,

Polish Your Firemonkey Apps For IOS With These Twelve Tips

#1. Monetize With In App Payments And/Or Ads Like Admob And Iads

There are a number of free and commercial components which handle in app payments and ads for you on IOS with Delphi XE5 Firemonkey. Check out DPF for IOS which has both in app payments and Iads components for free. The other components are from JVESoft and from Flash AV Software.

#2. Secure Your App’s Data Connections With SSL

Users are connecting from public hotspots these days and you need to secure your data connections to keep your user’s data safe from snooping. You can use the free OpenSSL components with Indy or there are two other commercial SSL components here and here.

#3. Encourage Users To Rate Your App

Usually only people who want to give your app a low rating end up on the App Store rating page and rate your app down. In order for you to encourage users who also really like you app to rate your app you can use a component like this or build your own using dialog boxes. DPF for IOS has a free component and JVESoft has a commercial rating component.

#4. Create And Deploy Icons For Your App

There are around 30 different icon sizes that you need to create to handle both Iphone and Ipad icons with your IOS app. There is a free utility which will take your logo and turn it into all off the icon sizes that you need.

#5. Use Premium Styles In Your App

Embarcadero provided some additional premium styles which you can download and use with your apps. There is a dark style and a light style for both IOS6 and IOS7. You can provide both to your users and they can choose for themselves which one they like on your app best.

#6. Handle App Activate And Deactivate Lifecycle Events

The lifecycle events are really important on IOS (much more so than on Android). There is no functionality to exit your app on IOS so you need to use those backgrounding lifecycle events to take care of saving your settings etc.

#7. Add Google Analytics To Your App

If you are building a professional commercial app you will want to collect usage data so that you can find out how your users are using your app and use that data to guide how you upgrade your app and add new features.

#8. Keep The Focused Edit Field Visible Above The Virtual Keyboard

When the virtual keyboard pops up it will by default cover the box that is being edited if it is below the bottom half of the screen. You can scroll your form or tabcontrol so that the field being edited stays visible. Make sure to implement a version of the code that handles multiline edit controls like TMemo as well.

#9. Setup Apple Push Notifications

If you are building a long term commercial app for IOS one way you will want to keep in touch with your users is through Push Notifications. It is always easier (and cheaper) to re-connect with existing users than it is to get new users. Push Notifications can help your achieve that.

#10. Use Threads To Keep Your App Responsive

There is a multithreaded progress dialog which is the main link of this tip but in addition to that there are two native progress dialogs for IOS here. And there is the anonymouse thread unit called AnonThread which comes in the samples section of Delphi XE5 Firemonkey. You can read this blog post on how to use it. Lastly you can use the ExecuteAsync function with TRESTRequest to do asynchronous REST calls.

#11. Handle Device Idle Time Out

If you are doing any kind of downloading using your app you will want to handle the idle time out of the device so that your app doesn’t dim out and go into the background when it is actually working. You can disable the idle time out, finish your downloading, and then re-enable the idle time out to conserve the user’s battery.

#12. Check Network Connectivity Before Trying To Connect

With mobile devices your app could lose connectivity at any time as the user travels around while using your app. You need to build that connectivity detection in your app from the start so if connectivity does drop you can handle it gracefully either by queuing up actions or sending your users notifications that they need connectivity to continue.

Tags: , , , , , , , , , , , , , , , , , , , , , ,