openwhish app readme
来源:互联网 发布:东方永夜抄 mac 编辑:程序博客网 时间:2024/05/19 22:56
OpenWhisk
Bluemix Mobile Starter for OpenWhisk in Android Java
Table of Contents
- Summary
- Requirements
- Configuration
- Run
- License
Summary
The Bluemix Mobile Starter for OpenWhisk will showcase how you can invoke OpenWhisk actions from a Mobile App.
It contains a sample OpenWhisk action actions/pushAction.js
that will trigger a push notification from OpenWhisk and notifiy the Mobile App that invoked it.
Requirements
- Android Studio
- OpenWhisk namespace
- OpenWhisk Auth Header
Configuration
- Bluemix OpenWhisk
Setup the OpenWhisk.
For OpenWhisk setup, you need to get authentication from Bluemix OpenWhisk. Install OpenWhisk CLI and Auth.
After following the instructions to configure your openwhisk CLI, navigate to app\src\main\res\values\open_whisk_credentials.xml
and use the same values to set the namespace
and auth header
.
Create Whisk Action
If you plan on enabling push notifications in your Android app, you must follow the Firebase configuration settings. Mainly adding the 2 package names to your Firebase console and updating the google-play-services.json in your Android app. Start at “Complete the following steps using the Firebase Cloud Messaging (FCM) console.”
Once complete, use the following WSK CLI command to create your push action in OpenWhisk. Don’t worry about editing the js file, your push instance app secret has been populated automatically.
wsk action update pushAction actions/pushAction.js
To see the fully qualified name, run in the CLI:
wsk action get --summary pushAction
Qualified names are formatted by /namespace/package/action(or trigger)
name.
An example of a qualified name is tcheng@us.ibm.com_dev
, which means:
namespace = tcheng@us.ibm.com_devauthHeader = long string after -auth, formatted like openwhisk appid:auth password
Please set the namespace and auth header accordingly in the app\src\main\res\values\open_whisk_credentials.xml
(as mentioned above).
Run
After importing into Android Studio, build and run the generated mobile application. You will be greeted with a list of your personal namespace’s OpenWhisk actions. Select an action and see the response displayed in real time.
License
This package contains code licensed under the Apache License, Version 2.0 (the “License”). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 and may also view the License in the LICENSE file within this package.
- openwhish app readme
- VideoCenter App's README
- README
- Readme
- README
- README
- readme
- readme
- readme
- ReadMe
- ReadMe
- README
- README
- readme
- Readme
- README
- README
- README
- 软件架构选择与架构选择
- 【论文笔记】物体检测与分割系列 DeepMask
- 关于java中子父类赋值的问题
- 学习Qt状态机框架时遇到的一个bug
- spring boot配置dubbo(properties)
- openwhish app readme
- 有时候开发listView需要默认显示到最后一条数据
- USB3.0
- 算法的时间复杂度
- sed命令详解
- BP神经网络公式推导
- BZOJ4381: [POI2015]Odwiedziny 分块 长链剖分
- Java数据结构与算法---冒泡排序
- Android通过GET请求获取网页原代码(传智播客)