File tree Expand file tree Collapse file tree 1 file changed +27
-4
lines changed
android-sdk/storage-sample-app/src/main/java/cn/leancloud/sample/testcase Expand file tree Collapse file tree 1 file changed +27
-4
lines changed Original file line number Diff line number Diff line change 11package cn .leancloud .sample .testcase ;
22
33import cn .leancloud .LCException ;
4+ import cn .leancloud .LCQuery ;
45import cn .leancloud .LeanCloud ;
56import cn .leancloud .sample .DemoBaseActivity ;
67import cn .leancloud .sample .Student ;
78import cn .leancloud .core .AppConfiguration ;
9+ import cn .leancloud .types .LCDate ;
10+ import io .reactivex .Observer ;
11+ import io .reactivex .disposables .Disposable ;
812
913/**
1014 * Created by fengjunwen on 2018/5/10.
1115 */
1216
1317public class OtherDemoActivity extends DemoBaseActivity {
14- // public void testGetSereverDate() throws LCException {
15- // Date date = AVOSCloud.getServerDate();
16- // log("服务器时间:" + date);
17- // }
18+ public void testGetSereverDate () throws LCException {
19+ LeanCloud .getServerDateInBackground ().subscribe (new Observer <LCDate >() {
20+ @ Override
21+ public void onSubscribe (Disposable d ) {
22+
23+ }
24+
25+ @ Override
26+ public void onNext (LCDate lcDate ) {
27+ log ("服务器时间:" + lcDate );
28+ }
29+
30+ @ Override
31+ public void onError (Throwable e ) {
32+
33+ }
34+
35+ @ Override
36+ public void onComplete () {
37+
38+ }
39+ });
40+ }
1841
1942 public void testConfigNetworkTimeout () throws LCException {
2043 // 得放到 Application 里
You can’t perform that action at this time.
0 commit comments