MobileFirst 6.3, or 7.0
I've reviewed the hybrid, and native tutorials on DevWorks, and wanted to get clarification on a few points integrating with BlueMix push service.
Considering a hybrid app (iOS, Android) developed with MFP studio is the hybrid app dependent on the MFP server to subscribe to the provider (BlueMix)?
If the hybrid app is dependent on MFP server to subscribe, will push notifications destined for the device have to be delivered through the MFP server via adapter, or will they be sent directly to the device?
In general I'm trying to understand the minimum role the MFP server can play in developing a hybrid application that will receive BlueMix push notifications.
Thanks
AFAIK, at this time, you cannot use a MFPF-based Hybrid app with the iOS 8-only push notification capabilities that originate from the Blumix Push service.
Also, MFPF adapters do not, at this time, work with Bluemix.
All in all, if you use MFPF, you use the unified push support as supplied and supported in MFPF. If you use Bluemix, that's a different approach to push.
Also, please add links to your questions next time - we shouldn't google/guess those...
Related
I am reading about and then trying to use IBM Bluemix. I have seen some confusing statement about MBaaS support on Bluemix. Some sites mention that Bluemix is a PaaS, and some places say it supports MBaaS. I have basic doubts: does IBM support MBaaS? If yes, where can I find the full MBaaS features list for IBM Bluemix? I couldn't find it in IBM site.
You're correct: Bluemix is a PaaS. However as you probably know and as you can see here:
Mobile backend as a service (MBaaS) enables you to quickly integrate
your mobile apps with data and functions in security-rich, backend,
cloud storage. MBaaS is usually delivered through a set of custom
software development kits (SDKs) and application programming
interfaces (APIs). MBaaS can offer you full data synchronization, user
management, push notifications, integration with social networking
services, and file-handling.
A PaaS provides SDKs and APIs and for this reason it can support MBaaS. In Bluemix the MBaaS capabilities are provided by the MobileFirst platform. It is designed for building and enhancing multiplatform, enterprise-grade apps that can be native or hybrid – for Android, iOS, and Windows. You can get started here.
Yes, Bluemix Mobile supports a Mobile Backend as a Service.
Here are the current services that we have that support the MBaaS pattern and a bit of information about them (and here's a quick graphical view and some links for how to get started):
Mobile Client Access
This service enables you to secure your Mobile Application. You can add Facebook, Google, or custom authentication to your application.
Push Notifications
You can add the Push Notifications service to send push notifications to your app on Android and iOS.
Mobile Analytics (Beta)
The Mobile Analytics service enables you to gather crash and usage knowlege about customers using your mobile app.
Cloudant NoSQL DB
The Cloudant service is the IBM NoSQL database to store your data.
Object Storage
The Object Storage service is an unstructured cloud data store where you can store things like images or files.
Mobile Foundation
The catalog also includes the Mobile Foundation service which you can use to create a test environment before deploying or purchasing the on-premise software. This service is another way for enabling a developer to create a mobile channel.
You may have a look at this :
http://www.ibm.com/mobilefirst/mobile-backend-as-a-service/mbaas.html
I'm working with Windows Azure Notification Hub and Android, testing the notifications push service through GCM. I'm using tags, pushing notifications from a Web application (back-end) integrated with Windows Azure.
The issue is: I don't know how to subscribe from an Android App to listen to those tags.
Create a Custom API with Azure Mobile Apps Server SDK. This should take the device registration Id and then do the registration with Notification Hubs. Azure Mobile Apps Server SDK wraps the Notification Hubs SDK for this purpose.
In your client, you can follow the appropriate Client SDK tutorial on push (Android is here), but use InvokeApi to invoke your custom API to do the registration instead of calling client.getPush().register().
Another good reference is the Android Client HOWTO Docs.
I am developing a native android app on MobileFirst platform. Does MobileFirst provide any code to connect to a web service instead of going through adapters? This is basically only for Native Android development and not for Hybrid app.
The MobileFirst SDK only provides what is required to work with features provided by MobileFirst, such as connecting to various backends using Adapters with the added benefit of the MobileFirst security framework, and other features.
If you have a need to connect to backends not via MobileFirst, use other common client-side utilities to achieve that.
I used the following code and it worked.
WLResourceRequest request = new WLResourceRequest("Actual server path here", GET);
request.addHeader(new BasicHeader("IfAnyHeader", "here"));
request.send(new ResponseListener());
If you are using native Android, you could use volley (or similar) to call external web services or REST apis.
http://developer.android.com/training/volley/index.html
Nothing to do with MobileFirst though, all totally standard Android native coding.
Can I consume a web service in a MobileFirst application without a MobileFirst server?
Yes, you can use your MobileFirst app without the need to connect to a MobileFirst server.
The drawback of not using the MobileFirst server is that you'll be loosing all of the features it provides like authentication, security, adapters, unified push notifications, direct update (for hybrid), remote disable, and other features.
If you want to make a request to any endpoint you can use WLResourceRequest (available from version 7.0 onwards) or any other native method to make HTTP requests.
Information on how to use WLResourceRequest
Android:
https://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.apiref.doc/html/refjava-worklight-android-native/html/com/worklight/wlclient/api/WLResourceRequest.html
Hybrid:
https://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.apiref.doc/html/refjavascript-client/html/WLResourceRequest.html?cp=SSHS8R_7.0.0%2F9-0-0-1-31
iOS: https://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.apiref.doc/html/refobjc-worklight-ios/html/interface_w_l_resource_request.html%23a004749b662c6f4a55a3b76e47f7e6062?lang=en
If the call is for example to an external resource you can use the same plain regular AJAX calls as you would anywhere else.
If the resource is protected by MobileFirst Platform, then you must use adapters. Adapters must go through the MobileFirst Server.
Use it like simple IDE to develop application(Native and hybrid).You can use client side API also that do not connect to the mobilefirst server.
You cannot use a mobile first app if you are using MF 7.0 or higher without a server, as soon as you launch the app it invokes an authorization request something like following:
<< domain >>/<< context >>/authorization/v1/clients/instance
Which connects to your workflight server and if it doesnt get response it will fail.
As far as invoking a web service is concerned that is just javascript if you are doing hybrid you can use AJAX as mentioned in another answer. If you are building native IOS or Android you can invoke http request using sdk libraries.
Cheers !
I have a pure native application and wanted to integrate with the worklight (using the Worklight Native SDK).
Which of the below features the native application can not use?
Unified SMS/Push Notifications
Remote Disable
Remote Notify
Adapters
Authentication framework
Direct Update
JSON Store
A Native application that uses the Worklight SDK does not support:
Direct Update
This feature is meant for updating web resources; this feature is currently supported only in Hybrid apps.
JSONStore
This feature is currently supported up to Worklight 6.1.0.x only in Hybrid apps (for the Android and iOS envrionments)