提交 98ea27a9 编写于 作者: T Takeya Yuki

Add Test APP

上级 a5b8bb8c
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
package jp.ruby.rubylibrary;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import java.nio.charset.Charset;
import yuki.resource.extended.StorageIOManager;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TextView tv=(TextView)findViewById(R.id.tv);
String s= null;
try {
StorageIOManager.WriteStringToFileSystem(getApplicationContext(),"/storage/emulated/0/1.txt","TEST IO");
s = StorageIOManager.ReadStringFromFileSystem(getApplicationContext(),"/system/bin/sh",true);
tv.setText(s);
} catch (Exception e) {
e.printStackTrace();
tv.setText(e.getLocalizedMessage());
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="jp.ruby.rubylibrary.MainActivity">
<TextView
android:id="@+id/tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
tools:layout_editor_absoluteX="3dp"
tools:layout_editor_absoluteY="2dp" />
</android.support.constraint.ConstraintLayout>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册