mobile-toolkit移动应用开发服务端工具库
Java 的移动应用开发服务端工具库, 提供了Apple push,应用内支付校验, Amazon的aws的几个服务的调用.
在现在移动应用(ios,android)的开发过程中,经常会需要调用Apple 的push服务以及应用内支付校验的功能,现有的一些sdk使用起来都不是很方便, 所以这里包装了一个更加简单更加方便的java库. 例如apple 的push服务其实就是包装了 APNS .
Amazon的S3存储和Mail功能在开发海外的项目中也是经常使用到的云服务,Amazon的SDK本身已经很全面,这里也仅仅是包装简化其使用方式.
Enjoy it!
## feature 1. APNS Apple push notification service
//setup apns by your keystore, key password and production ,false will use sandbox env
ApnsTools apnsTools = new DefaultApnsTools("aps.p12", "password", false);
apnsTools.alert("message", "device token");
//async apns , should set async thread number
AsyncApnsTools asyncApnsTools = new DefaultAsyncApnsTools("aps.p12", "password", false, 12);
asyncApnsTools.alert("message", "device token");
// you can setup a monitor for async apns tool.such as log monitor for print push result log. 2 is the log interval. TimeUnit is second
AsyncNotificationMonitor monitor = new LogNotificationMonitor(2, asyncApnsTools);
Suggest config this in spring:
<bean id="apnsTools" class="mobi.app.toolkit.apple.impl.DefaultApnsTools">
<constructor-arg index="0" value="${aps.key}"/>
<constructor-arg index="1" value="${aps.password}"/>
<constructor-arg index="2" value="${aps.production}"/>
</bean>
<bean id="asyncApnsTools" class="mobi.app.toolkit.apple.impl.DefaultAsyncApnsTools">
<constructor-arg index="0" value="${aps.key}"/>
<constructor-arg index="1" value="${aps.password}"/>
<constructor-arg index="2" value="${aps.production}"/>
<constructor-arg index="3" value="${aps.threadNumber}"/>
</bean>
<bean id="logMonitor" class="mobi.app.toolkit.apple.impl.LogNotificationMonitor">
<constructor-arg index="0" value="2"/>
<constructor-arg index="1" ref="asyncApnsTools"/>
</bean>
2. IAP Apple in app pay
//Setup iap tools, false will use sandbox env
IapTools iapTools = new DefaultIapTools(false);
IapReceipt receipt = iapTools.validate("your pay receipt");
System.out.print(receipt.getStatus());
Suggest config this in spring:
<bean id="iapTools" class="mobi.app.toolkit.apple.impl.DefaultIapTools">
<constructor-arg value="${iap.production}"/>
</bean>
3. AWS S3 Amazon s3
AwsS3Tools s3Tools = new DefaultS3Tools("your accessKey", "your accessSecret");
String url = s3Tools.upload("bucket", "key", new byte[]{}, "image/png");
System.out.print(url);
Suggest config this in spring:
<bean id="amazonS3Client" class="mobi.app.toolkit.aws.impl.DefaultS3Tools">
<constructor-arg index="0" value="${s3.accessKey}"/>
<constructor-arg index="1" value="${s3.accessSecret}"/>
</bean>
4. AWS Mail Amazon mail
AwsMailTools mailTools = new DefaultMailTools("your accessKey", "your accessSecret", "your admin mail");
mailTools.sendMail("to address", "title", "body");
Suggest config this in spring:
<bean id="awsMailTools" class="mobi.app.toolkit.aws.impl.DefaultMailTools">
<constructor-arg index="0" value="${aws.accessKey}"/>
<constructor-arg index="1" value="${aws.accessSecret}"/>
<constructor-arg index="2" value="${aws.adminMail}"/>
</bean>
评论
GeocoderPHP 移动定位应用开发库
Geocoder是PHP开发库,帮助你构建移动定位应用,提供一个强大的地理编码操作的抽象层。<?php$geocoder = new \Geocoder\ProviderAggregator()
GeocoderPHP 移动定位应用开发库
0
UpdateHelperAndroid 应用开发库
UpdateHelper是一个为了简化AndroidApp的迭代升级开发的AndroidLibrary,任何一个项目只要引入这个library便集成了在线检查新版本的功能以及下载APK功能,仅需两行代
UpdateHelperAndroid 应用开发库
0
UpdateHelperAndroid 应用开发库
UpdateHelper 是一个为了简化Android App的迭代升级开发的Android Lib
UpdateHelperAndroid 应用开发库
0
HHJsLibJS应用工具库
HHJsLib是使用jQuery框架开发的应用工具库,So~使用了HHJsLib的地方,用户可以尽情的使用其它第三方同样基于jQuery开发的插件,像jQuery-UI、jQuery.lazyload
HHJsLibJS应用工具库
0
iMAG移动应用开发平台
iMAG是IntelligentMobileApplicationGateway(智能移动应用网关)的缩写,基于飞舸益动特有的移动中间件技术,作为移动设备和应用之间的一个中间层,它屏蔽了不同手机操作系
iMAG移动应用开发平台
0
Samurai-Native移动应用开发框架
Samurai-Native是一个基于浏览器内核通过HTML+CSS开发原生移动应用,目前支持iOS,很快会支持Android。示例代码:<html> <body>
Samurai-Native移动应用开发框架
0
MonkeyTalk移动应用测试工具
MonkeyTalk是世界上最强大的移动应用测试工具。MonkeyTalk自动为iOS和Android应用进行真实的,功能性交互测试。MonkeyTalk提供简单的"smoketests",复杂数据驱
MonkeyTalk移动应用测试工具
0