A sample application demonstrating use of push notifications in Android applications.
https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/notifications/
- Import the project to Android Studio.
- From a Command-line window, navigate to the project's root folder and run the command:
mfpdev app register
. - In the MobileFirst console:
- Under Applications → PushNotificationsAndroid → Security → Map scope elements to security checks, add a mapping for
push.mobileclient
. - Under Applications → PushNotificationsAndroid → Push → Push Settings, add Google Clout Messaging (GMC) Server API Key and Sender ID.
- Under Applications → PushNotificationsAndroid → Security → Map scope elements to security checks, add a mapping for
- Run the app by clicking the Run button.
- Tag notification
- Use the MobileFirst Operations Console → [your application] → Push → Send Push tab.
- Authenticated notification:
- Deploy the UserLogin sample Security Check.
- In MobileFirst Operations Console → [your application] → Security tab, map the push.mobileclient scope to the UserLogin Security Check.
- Follow the instructions for REST APIs to send the notification.
Notes:
- The GCM Server Key and senderId values must be configured via the MobileFirst Operations Console.
IBM MobileFirst Platform Foundation 8.0
Copyright 2015 IBM Corp.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at att http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.