Skip to content

skyworthvr/svr_plugin_android_interface

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

简介 Introduction

包含一些工具类,方便应用开发和使用 Skyworth VR 设备中特定的系统服务, 支持以下功能
Contains some helper classes to facilitate application development and using of specific system services in Skyworth VR devices, which support the following functions

  • ApkUtils
  • AppUtils
  • BatteryUtils
  • BluetoothUtils
  • BrightnessUtils
  • DeviceUtils
  • FotaUtils
  • ProximitySensorUtils
  • StorageUtils
  • TimeUtils
  • VolumeUtils
  • WifiUtils

用法示例 Sample

public class MainActivity extends AppCompatActivity {
    AndroidInterface androidInterface;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        androidInterface = AndroidInterface.getInstance();
        androidInterface.init(getApplication(), new AndroidInterface.InitListener() {
            @Override public void onInitialized() {
                // All interfaces must be called after successful initialization.
                L.d(TAG, "onInitialized");
            }

            @Override public void onReleased() {
                L.d(TAG, "onReleased");
            }

            @Override public void onInitError() {
                L.d(TAG, "onInitError");
            }
        });
        // All interfaces must be called after successful initialization.
        androidInterface.getWifiUtils().setListener2(new WifiUtils.WifiListener2() {

            @Override public void onOpened(boolean b) {

            }

            @Override public void onConnecting(int i, String s) {

            }

            @Override public void onSearchResult(ArrayList<WifiInfo> arrayList) {

            }

            @Override public void onRssiLevelChanegd(int i) {

            }
        });
    }

    @Override protected void onDestroy() {
        super.onDestroy();
        androidInterface.release();
    }
}

具体信息请阅读开发者文档
Please read the developer documentation for details

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages