Skip to content

OddCommon/uptate-file-status

 
 

Repository files navigation

UpdateFile Instructions

JAR file, demo apk are in /resource.
Note: Regarding JAR file creation and usage, please refer to the Guideline

Introduction

This JAR file is used to send broadcast to Android media lib. After that, user can see the newly created files directly on Pico device or PC. Without this JAR file, user needs to reboot the Pico device to newly created files.

Class Name

com.pico.updatefilestatus.UpdateFileClass

Permission

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

Interface

void updateFileStatus(String filePath)

Sample Code

string filePath = "/storage/emulated/0/Download/update.txt";
AndroidJavaObject updateFileManager = new AndroidJavaObject("com.pico.updatefilestatus.UpdateFileClass");
AndroidJavaObject ActivityContext = new AndroidJavaClass("com.unity3d.player.UnityPlayer").GetStatic<AndroidJavaObject>("currentActivity");

updateFileManager.Call("updateFileStatus", ActivityContext, filePath);

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%