使用SAP云平台Android SDK创建Mobile应用
【摘要】 既然是安卓开发,首先我们要下载Android Studio.接着是从SAP官网下载SAP Cloud Platform的Android开发SDK:https://developers.sap.com/trials-downloads.htmlhttps://developers.sap.com/topics/cloud-platform-sdk-for-android.htmlAndroid...
既然是安卓开发,首先我们要下载Android Studio.
接着是从SAP官网下载SAP Cloud Platform的Android开发SDK:
https://developers.sap.com/trials-downloads.html
https://developers.sap.com/topics/cloud-platform-sdk-for-android.html
Android SDK安装完毕后,使用项目创建向导新建一个项目:
使用SAP Cloud Platform mobile service上已经创建好的应用:com.sap.wizapp:
这个com.sap.wizapp的配置在SAP Cloud Platform的mobile services页面里打开如下:
com.sap.edm.sampleservice.v2这个Destination提供了测试数据,包含product categories, product, supplier, customer和sales order等等。
完成项目创建向导。
SAP Cloud Platform Android SDK会自动给我们创建一个模板应用:
点击Run按钮启动应用:
选择在模拟器上运行:
点击Get Started,进入用户登录页面:
输入SAP Cloud Platform的用户名和密码:
创建本地Passcode:
之后看到destination指向的OData服务的entity:
选择Products,能看到产品列表:
选中某个产品,进入其明细页面。
登录SAP Cloud Platform Mobile Services management cockpit:
在Mobile Application列表里,选择之前创建好的Wiz App:
打开User Registration标签页:
指定需要推送到移动应用上的Notification文本:
之前使用SAP Cloud Platform Android SDK创建的Android应用,就收到了这条Notification:
如果我们测试的应用当前处于后台运行状态,则来自SAP Cloud Platform的Notification推送到达移动设备后,表现形式如下:
点击手机上这条推送消息列表,就能将收到推送消息的应用转换到前台运行状态(foreground mode):
SAP Cloud Platform提供的这种通知服务,是采用AlertDialog实现的。
【声明】本内容来自华为云开发者社区博主,不代表华为云及华为云开发者社区的观点和立场。转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息,否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)