Mobile Services in Crosslight features powerful services such as capturing photo from camera, locating address with GPS, making call using the built-in telephony services, etc. These built-in services from Crosslight gives developers a significant advantage among other cross-platform frameworks as these services are built on the Android platform natively. Built with performance and optimization in mind, these services are developed from the ground up, making your applications capable of delivering greater and richer experiences to the user, all done with a single call right from the view model.
The mobile services are typically accessed from the shared application layer, which is the ViewModel. This allows you to streamline user interaction logic completely in a single ViewModel and reuse them amongst other platforms. As a result, the same ViewModel can be easily consumed in other platforms such as iOS or Windows Phone. For more information about programming with mobile services, see Working with Mobile Services.
The following illustration overviews the expected behaviors and results of the mobile services available in the Android platform.
Sending e-mails with photo attachments, sharing content to social network sites such as Facebook and Twitter, show sharing actions from the social service, showing directions between two places susing the map service, making phone calls with telephony services, scheduling notificatoin through the use of notification service are just some of the examples of the things you can do with mobile services.
Mobile Services Limitations on Android Platform
Despite the capabilities that Crosslight has made available with the use of mobile services, the Android platform imposes some limitations that are not available yet, mainly because APIs are not made available yet to the platform. The following lists the limitations of the mobile services of the Android platform.
Some hardware related features are not directly invokable using the Intent object, such as the device kind and flash mode, therefore user will have to readjust the camera when the camera intent is invoked.
Currently due to GApps intent limitation, you cannot open up Maps app and show directions between two places. User will be redirected to browser where the directions will be shown instead. This feature will be improved when the intent has supported the show directions feature. More info here: http://developer.android.com/guide/appendix/g-app-intents.html
The social service also imposes some restrictions on what you can share via the Intent object.
Sharing Content to Facebook
Facebook for Android does not allow predefined status messages as updates. However, you can provide several images at once to be posted on the user’s wall. Currently sharing content to Facebook is only supported through Facebook for Android.
Sharing Content to Twitter
Currently sharing content to Twitter is only supported through Twitter for Android. Twiter for Android does not allow posting multiple images at once.
APIs that are not available with the reachability services that comes with the Android Crosslight mobile services.
Hiding the Network Activity Indicator
Note that this method is not available in the Android platform as network activity indicator is always shown by default.