Skip to content

Commit 52beb83

Browse files
author
River
committed
Added getNetworkStatus
1 parent 07efbfc commit 52beb83

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

bin/jarlist.cache

Lines changed: 0 additions & 3 deletions
This file was deleted.
-69.5 KB
Binary file not shown.
-9.15 KB
Binary file not shown.

src/com/googlecode/android_scripting/facade/AndroidFacade.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
import com.googlecode.android_scripting.rpc.RpcOptional;
5454
import com.googlecode.android_scripting.rpc.RpcParameter;
5555
import com.hipipal.sl4alib.MNApp;
56+
import com.zuowuxuxi.util.NUtil;
5657

5758
import java.lang.reflect.Field;
5859
import java.lang.reflect.Modifier;
@@ -602,6 +603,12 @@ public void notify(@RpcParameter(name = "title", description = "title") String t
602603
mNotificationManager.notify(notificationId, notification);
603604
}
604605

606+
@Rpc(description = "Returns the status of network connection.")
607+
public boolean getNetworkStatus() {
608+
return NUtil.netCheckin(mService.getApplicationContext());
609+
}
610+
611+
605612
@Rpc(description = "Returns the intent that launched the script.")
606613
public Object getIntent() {
607614
return mIntent;

0 commit comments

Comments
 (0)