Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| docs:3400_how_to:1000_mobile_applications [2022/08/21 12:10] – removed - external edit (Unknown date) 127.0.0.1 | docs:3400_how_to:1000_mobile_applications [2026/02/16 23:50] (current) – aware_support3 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Mobile Applications ====== | ||
| + | ===== How To... ===== | ||
| + | < | ||
| + | <panel type=" | ||
| + | Starting from version 7.0 all features available for desktop applications are available for mobile applications as well and the other way around. However, because real estate on mobile platforms is severely limited you may want to create a special version for mobile phones and/or tablets that will use slightly different features compared to the desktop application. | ||
| + | |||
| + | To create a mobile version of your application, | ||
| + | </ | ||
| + | |||
| + | <panel type=" | ||
| + | This feature is very often used in mobile applications. To create a thumbnail view use a custom presentation of query results. See the “[[docs: | ||
| + | |||
| + | If you use the “custom template” you will be able to use a “scroll view”, which is very popular for mobile applications – it displays one image at a time and users can swipe to the next or previous image.</ | ||
| + | <panel type=" | ||
| + | Use regular grids (Queries with standard presentation). If your query uses inline editing or filtering make sure you tick the “Mobile rendering” option for the query (available through the More button)</ | ||
| + | |||
| + | <panel type=" | ||
| + | Usually for a mobile application running on a phone you would define two menus – the top toolbar and the slide-out menu (of course, both are optional). Defining the toolbar is simple – you just define a menu of the Toolbar type in the Top Bar frame of your visual perspective. Most likely you will place at least two buttons on this toolbar – the button that slides out the main menu and the button that implements the “Go back” functionality. | ||
| + | |||
| + | To define the “Back button” just define an operation of the “Go Back” type and add it to the toolbar. To define a button that slides out the main menu define this menu for the left or right frames first (the menu must be of the Plain List type). Then define the operation of the “Slide-In Left Frame or “Slide-In Right Frame” types and add this operation to your toolbar. | ||
| + | |||
| + | You will probably have some real estate left on the toolbar. You can use this real estate for context operations – for example, to display Previous/ | ||
| + | </ | ||
| + | |||
| + | <panel type=" | ||
| + | Use regular forms for business objects. Some of the features of business object forms that you may find useful on mobile devices are listed below: | ||
| + | |||
| + | - Specify label with as percentage rather than absolute value | ||
| + | - Display Yes/No attributes as “on/off switches” | ||
| + | - Use native browser controls for dates and times – some mobile browsers have very rich and good looking mobile-specific in-built controls for entering dates and timestamps. You can use them in your forms instead of the more desktop oriented // | ||
| + | - Mobile style tabs – if the form has several form sections the tabs are displayed. You can select the “mobile style tabs” option to display tabs using mobile-friendly style – with larger font and top icon alignment. The option is available in the Navigation dialog of the Form Editor | ||
| + | - Mobile style of the form caption – most of the time you won’t display the default panel header for your mobile forms, because it uses too much real estate. You will either display no header at all or you will display a caption of the form in the middle of the screen. Selecting the “mobile style header” option in the Panel Header dialog will achieve that | ||
| + | |||
| + | </ | ||
| + | |||
| + | <panel type=" | ||
| + | A popular feature on mobile devices is to show one image at a time with the user being able to swipe back and forth to display the next or previous image. To implement this feature use [[docs: | ||
| + | |||
| + | <panel type=" | ||
| + | One approach is to define an attribute of the Picture type for one of your forms. // | ||
| + | |||
| + | Another approach is to use the '' | ||
| + | |||
| + | <code aim> | ||
| + | |||
| + | <callout type=" | ||
| + | </ | ||
| + | |||
| + | <panel type=" | ||
| + | |||
| + | The quickest way is to define an attribute of the Picture type in some object and then define a special form with one form section and one cell showing the Picture attribute. For more details see the [[docs: | ||
| + | |||
| + | <panel type=" | ||
| + | Just define an attribute of the Document type to store your PDF document. // | ||
| + | |||
| + | <panel type=" | ||
| + | It may be necessary for your application to determine the location of the current user – for example, if it needs to calculate users or places of interest closest to the current user. | ||
| + | |||
| + | The location of the current user can be determined by using the '' | ||
| + | |||
| + | <code aim> | ||
| + | MOBILE GET LOCATION INTO MGeoLocation | ||
| + | DISPLAY MESSAGE ' | ||
| + | |||
| + | You can use this instance of the '' | ||
| + | |||
| + | You can also record changes to the user location. This can be done by using the '' | ||
| + | |||
| + | <code aim> | ||
| + | |||
| + | Tracking changes can be stopped using the '' | ||
| + | |||
| + | <code aim> | ||
| + | |||
| + | Note that all geo location actions can be used in both browser-based mobile and non-mobile applications as well as in native mobile applications. | ||
| + | </ | ||
| + | |||
| + | <panel type=" | ||
| + | |||
| + | This is explained in the “[[docs: | ||
| + | |||
| + | See [[docs: | ||
| + | |||
| + | </ | ||
| + | |||
| + | <panel type=" | ||
| + | |||
| + | On mobile phones a user may want to login only the first time he/she accesses an application and then the application should remember the user credentials, | ||
| + | |||
| + | [[http:// | ||
| + | |||
| + | To force the browser to display a login form after the user has already been remembered add the “auto_login=false” to the URL: | ||
| + | |||
| + | [[http:// | ||
| + | |||
| + | <panel type=" | ||
| + | |||
| + | Sending push notifications to mobile phones is only supported for native mobile applications. If you want to send push notifications to mobile phones in your native mobile applications there are several major steps involved. Most of them need only to be done once. | ||
| + | |||
| + | - Setup Apple and Google pre-requisites (for iOS and Android phones) – this should only be done once. | ||
| + | - Enter these pre-requisites into AwareIM (also done once only) | ||
| + | - Configure push notification rules in AwareIM to receive or send push notifications | ||
| + | |||
| + | ===== Step 1 ===== | ||
| + | To enable mobile push notifications, | ||
| + | |||
| + | - Go to Firebase Developers Console (https:// | ||
| + | - Add an Android application for this project (when creating a zip file for the native application make sure that the package name corresponds to the package name of the Android application). | ||
| + | - Go to the " | ||
| + | - Record the project id on the same screen | ||
| + | - Go to the Cloud Messaging tab and generate a private key for the application. Save this key in a secure location on your machine. | ||
| + | - Enter the location of the '' | ||
| + | - Add an iOS application to the project. Make sure that the bundle ID of the application matches the package name of the Android application | ||
| + | - Enroll into the Apple Development program (if not enrolled already) and log into the Apple Developer Portal. Go to the Certificates and Identifiers page. Create a key for push notifications (make sure Push Notifications is selected when creating the key). | ||
| + | - Download the key and keep it in a safe location | ||
| + | - Import this key into the iOS application in Firebase (in the Cloud Messaging tab). When importing the key specify the ID of the key that you can find on the Certificates page in Apple Developer and the Apple team ID that you can see in the top right corner of the Certificates page. | ||
| + | - In the Firebase console under the '' | ||
| + | |||
| + | ===== Step 2. Enter iOS and Android pre-requisites in AwareIM ===== | ||
| + | In the Configuration Tool, double click on the Business Space Version you want to change and click on '' | ||
| + | |||
| + | ===== Step 3. Configure push notification rules in your application ===== | ||
| + | 1. Subscribe to a topic to receive a push notification | ||
| + | If you want to subscribe to a topic you need to setup management of the predefined '' | ||
| + | < | ||
| + | FIND CMTopic WHERE CMTopic.Name=' | ||
| + | MOBILE SUBSCRIBE TO CMTopic | ||
| + | </ | ||
| + | |||
| + | This process should be activated on a mobile phone of the user. When the user logs into the mobile native application that has push notifications enabled for the first time, an instance of the '' | ||
| + | |||
| + | 2. Send a notification to a phone | ||
| + | In order to send a notification to a phone you need to define a process that will use the '' | ||
| + | <code aim> | ||
| + | CREATE MobilePushNotification WITH MobilePushNotification.Body=' | ||
| + | MOBILE PUSH MobilePushNotification TO MobilePhone </ | ||
| + | where MobilePhone is process input | ||
| + | </ | ||
| + | |||
| + | <panel type=" | ||
| + | |||
| + | Cordova plugins are components that provide access to some built-in features of mobile phones, (such as camera or contacts), for which there is no Javascript access. When components are integrated into the system these features become available through some special Javascript functions that the plugin makes available to the developer. Cordova plugins can only be used in native mobile applications. | ||
| + | |||
| + | AwareIM integrates some Cordova plugins out-of- the-box and provides rule actions that activate them (for example, '' | ||
| + | |||
| + | Still there is a way to do this by adding some custom Javascript to your application. This is described in detail in the [[docs: | ||
| + | </ | ||
| + | |||
| + | </ | ||