提交 6db3b489 authored 作者: 汪显鹏's avatar 汪显鹏

会议助手、语音助手 开发套件第一次提交

上级
# Created by .ignore support plugin (hsz.mobi)
/build/
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id=":app" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
<option name="GRADLE_PROJECT_PATH" value=":app" />
</configuration>
</facet>
<facet type="android" name="Android">
<configuration>
<option name="SELECTED_BUILD_VARIANT" value="debug" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
<afterSyncTasks>
<task>generateDebugSources</task>
</afterSyncTasks>
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res;file://$MODULE_DIR$/build/generated/res/resValues/debug" />
<option name="TEST_RES_FOLDERS_RELATIVE_PATH" value="" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
<output url="file://$MODULE_DIR$/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes" />
<output-test url="file://$MODULE_DIR$/build/intermediates/javac/debugUnitTest/compileDebugUnitTestJavaWithJavac/classes" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debug/compileDebugAidl/out" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debug/compileDebugRenderscript/out" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debugAndroidTest/compileDebugAndroidTestAidl/out" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debugAndroidTest/compileDebugAndroidTestRenderscript/out" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/test/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/generated/not_namespaced_r_class_sources" />
<excludeFolder url="file://$MODULE_DIR$/build/generated/source/r" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotation_processor_list" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/apk_list" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/build-info" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundle_manifest" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check_manifest_result" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/compatible_screen_manifest" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/duplicate_classes_check" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-runtime-classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-verifier" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-apk" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-resources" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant_app_manifest" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant_run_app_info_output_file" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant_run_merged_manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant_run_split_apk_resources" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javac" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifest-checker" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_jni_libs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_shaders" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/metadata_feature_manifest" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/prebuild" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/processed_res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/resources" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shader_assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/signing_config" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/split-apk" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/tmp" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/validate_signing_config" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 28 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Gradle: com.android.support:support-fragment:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:localbroadcastmanager:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:documentfile:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:animated-vector-drawable:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:slidingpanelayout:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:viewmodel:1.1.1@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:appcompat-v7:28.0.0@aar" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.android.support.test.espresso:espresso-idling-resource:3.0.2@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:loader:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.core:runtime:1.1.1@aar" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.android.support.test:runner:1.0.2@aar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:livedata-core:1.1.1@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:collections:28.0.0@jar" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.squareup:javawriter:2.1.1@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:cursoradapter:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:runtime:1.1.1@aar" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.android.support.test.espresso:espresso-core:3.0.2@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-compat:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-core-ui:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:asynclayoutinflater:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:print:28.0.0@aar" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.google.code.findbugs:jsr305:2.0.1@jar" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: javax.inject:javax.inject:1@jar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.core:common:1.1.1@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:versionedparcelable:28.0.0@aar" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: junit:junit:4.12@jar" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: org.hamcrest:hamcrest-core:1.3@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:viewpager:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-core-utils:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-vector-drawable:28.0.0@aar" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.android.support.test:monitor:1.0.2@aar" level="project" />
<orderEntry type="library" name="Gradle: __local_aars__:E.\AndroidSpace\Android2019\Wxp\AndroidRK3288\app\lib\smdt.jar:unspecified@jar" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: org.hamcrest:hamcrest-library:1.3@jar" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: org.hamcrest:hamcrest-integration:1.3@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-annotations:28.0.0@jar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:common:1.1.1@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:interpolator:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:livedata:1.1.1@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:drawerlayout:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:coordinatorlayout:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:customview:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:swiperefreshlayout:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-v4:28.0.0@aar" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: net.sf.kxml:kxml2:2.3.0@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-media-compat:28.0.0@aar" level="project" />
</component>
</module>
\ No newline at end of file
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.smdt.androidapi"
minSdkVersion 21
targetSdkVersion 28
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation files('lib/smdt.jar')
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
<?xml version="1.0" encoding="utf-8"?>
<lint>
</lint>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.smdt.androidapi"
android:versionCode="1"
android:versionName="1.0">
<!--android:sharedUserId="android.uid.system"-->
<!--android:sharedUserId="android.uid.system"-->
<uses-permission android:name="android.permission.READ_FRAME_BUFFER" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.REBOOT" />
<uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
<uses-permission android:name="android.permission.DEVICE_POWER" />
<uses-permission android:name="android.permission.SHUTDOWN" />
<uses-permission android:name="android.permission.READ_FRAME_BUFFER" />
<uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.SERIAL_PORT" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
<uses-permission android:name="android.permission.INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_MEDIA_STORAGE" />
<uses-permission android:name="android.permission.SET_TIME" />
<uses-permission android:name="android.permission.STATUS_BAR" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_CACHE_FILESYSTEM" />
<uses-permission android:name="android.permission.DELETE_CACHE_FILES" />
<uses-permission android:name="android.permission.MODIFY_SOUND_SETTINGS" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.RECOVERY" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" />
<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:sharedUserId="android.uid.system"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:windowSoftInputMode="stateHidden|stateAlwaysHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.smdt.androidapi.ScreenActivity" />
<activity android:name="com.smdt.androidapi.DevicesActivity" />
<activity android:name="com.smdt.androidapi.GpioActivity" />
<activity android:name="com.smdt.androidapi.WifiActivity" />
</application>
</manifest>
package com.smdt.androidapi;
import android.app.Activity;
import android.app.smdt.SmdtManager;
import android.os.Bundle;
import android.widget.TextView;
public class DevicesActivity extends Activity {
private TextView model,Android_version,running,inner,firware,kernel,version;
private SmdtManager smdt = null;
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.devices);
model = (TextView)findViewById(R.id.model);
Android_version = (TextView)findViewById(R.id.Android_version);
running = (TextView)findViewById(R.id.running);
inner = (TextView)findViewById(R.id.inner);
firware = (TextView)findViewById(R.id.firware);
kernel = (TextView)findViewById(R.id.kernel);
version = (TextView)findViewById(R.id.version);
smdt = SmdtManager.create(this);
model.setText("型号\n" + smdt.getAndroidModel());
Android_version.setText("Android版本\n" + smdt.getAndroidVersion());
running.setText("运行内存\n" + smdt.getRunningMemory());
inner.setText("内部存储\n" + smdt.getInternalStorageMemory());
firware.setText("固件版本\n" + smdt.getFirmwareVersion());
kernel.setText("内核版本\n" + smdt.getFormattedKernelVersion());
version.setText("版本号\n" + smdt.getAndroidDisplay());
}
}
package com.smdt.androidapi;
import android.app.Activity;
import android.app.smdt.SmdtManager;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class GpioActivity extends Activity implements OnClickListener{
private Button btn_readGpio,btn_writeGpio;
private EditText tv_gpioNum;
private EditText tv_gpioValue;
private SmdtManager smdtManager;
private int gpioNum = 0;
private boolean bGpioValue;
private int ret;
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.gpio);
tv_gpioNum = (EditText)findViewById(R.id.tv_gpioNum);
btn_readGpio = (Button)findViewById(R.id.btn_readGpio);
btn_writeGpio = (Button)findViewById(R.id.btn_writeGpio);
tv_gpioValue = (EditText)findViewById(R.id.tv_gpioValue);
btn_readGpio.setOnClickListener(this);
btn_writeGpio.setOnClickListener(this);
smdtManager = SmdtManager.create(this);
}
@Override
public void onClick(View v) {
switch(v.getId()){
case R.id.btn_readGpio:
if (tv_gpioNum.getText().toString().equals(""))
{
Toast.makeText(getApplicationContext(), "gpio number is null", Toast.LENGTH_SHORT).show();
return;
}
gpioNum = Integer.parseInt(tv_gpioNum.getText().toString());
if ((gpioNum < 1) || (gpioNum > 10))
{
Toast.makeText(getApplicationContext(), "gpio number is not 1~10", Toast.LENGTH_SHORT).show();
return;
}
//smdtManager.smdtReadExtrnalGpioValue(gpioNum);
Toast.makeText(getApplicationContext(), smdtManager.smdtReadExtrnalGpioValue(gpioNum) + "", Toast.LENGTH_SHORT).show();
break;
case R.id.btn_writeGpio:
if (tv_gpioNum.getText().toString().equals("") || tv_gpioValue.getText().toString().equals(""))
{
Toast.makeText(getApplicationContext(), "gpio number or value is null", Toast.LENGTH_SHORT).show();
return;
}
gpioNum = Integer.parseInt(tv_gpioNum.getText().toString());
if (gpioNum < 1 || gpioNum > 10)
{
Toast.makeText(getApplicationContext(), "gpio number is not 1~10", Toast.LENGTH_SHORT).show();
return;
}
bGpioValue = (Integer.parseInt(tv_gpioValue.getText().toString())==1)?true:false;
ret = smdtManager.smdtSetExtrnalGpioValue(gpioNum, bGpioValue);
Log.d("lzl", "=========smdtSetExtrnalGpioValue is return " + ret + "=============");
//Toast.makeText(getApplicationContext(), smdtManager.smdtSetExtrnalGpioValue(gpioNum, bGpioValue) + "", Toast.LENGTH_SHORT).show();
break;
default:
break;
}
}
}
package com.smdt.androidapi;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Instrumentation;
import android.app.Service;
import android.app.smdt.SmdtManager;
import android.content.Context;
import android.content.Intent;
import android.hardware.display.DisplayManager;
import android.media.AudioManager;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.os.Message;
import android.os.PowerManager;
import android.os.RecoverySystem;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.Display;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import android.os.Bundle;
import android.app.Activity;
import android.app.ActivityManager;
import android.app.ActivityManager.RunningAppProcessInfo;
import java.io.DataOutputStream;
import java.io.File;
import java.io.OutputStream;
import android.provider.Settings;
import android.provider.Settings.SettingNotFoundException;
import android.content.ContentResolver;
public class MainActivity extends Activity implements OnClickListener{
private SmdtManager smdt;
private AudioManager mAudioManager;
private Button button_close;
private Button btn_gpio;
private Button btn_devices;
private Button btn_uart;
private Button btn_io_closeback;
private Button button_reboot;
private Button btn_update,btn_wifi;
private Button button_get_nettype;
private Button btn_normal;
private Button button_settimebynetoff;
private Button button_takePictrue;
private Button btn_watchdog;
private Button btn_closedog;
private Button btn_feeddog;
private Button button_settime;
private Button btn_sd;
private Button btn_USB;
private Button btn_openUsb;
private Button btn_closeUsb;
private Button btn_getEth;
private Button button_settimebyNet;
private Button btn_volumeadd;
private Button btn_volumedec;
private Button btn_mute;
private Button button_silentInstall;
private Button btn_openback;
private Button btn_closeback;
private Button btn_getback;
private Button btn_set_power_off_on_time;
private Button btn_showstatus;
private Button btn_hidestatus;
private Button btn_one;
private Button btn_two;
private Button btn_three;
private Button btn_four;
private Button btn_setVolume;
private Button btn_getVolume;
private Button btn_getBright;
private Button btn_openlog;
private Button btn_closelog;
private Button btn_getMac;
private Button btn_setIP;
private Button btn_getIP;
private EditText et_year;
private EditText et_month;
private EditText et_day;
private EditText et_hour;
private EditText et_minute;
private EditText edit_hour;
private EditText edit_minute;
private EditText edit_values;
private EditText edit_setBright;
private EditText edit_enable;
private TextView editNetType;
private TextView textView;
private TextView txt_volume_show;
private TextView tv_bright;
private TextView tv_Mac;
private TextView tv_IP;
private EditText tv_setIP;
private TextView tv_usb;
private TextView tv_sd;
private TextView tv_eth;
private Spinner spin_dev;
private EditText tv_usbNum;
private Button btn_openEthPower;
private Button btn_closeEthPower;
private Button btn_screenWidth;
private Button btn_screenHeight;
private TextView tv_screenWidth;
private TextView tv_screenHeight;
private TextView tv_read_eeprom;
private EditText ed_usb_num;
private EditText et_eeprom_data;
private EditText et_deviceId;
private EditText et_areaId;
private EditText et_start_addr;
private EditText et_size;
private Button btn_write_eeprom;
private Button btn_read_eeprom;
private TextView tv_api_version;
private Button btn_get_api_version;
//3G
private Button btn_3G_open;
private Button btn_3G_close;
private Button btn_3G_reset;
//led
private Button btn_led_open;
private Button btn_led_close;
//mic
private Button btn_headsetmic_open;
private Button btn_headsetmic_close;
private Button btn_three_poweronoff;
//unmount
private Button btn_unmount;
private EditText et_unmount_path;
//screen_number
private Button btn_get_screen_number;
private TextView tv_screen_number;
//hdmi in
private Button btn_get_hdmiin_status;
private static final int ADJUST_MUTE = -100;
private static final int ADJUST_UNMUTE = 100;
private static final int ADJUST_LOWER = -1;
private static final int ADJUST_RAISE = 1;
private static final int ADJUST_SAME = 0;
private static final int FLAG_SHOW_UI = 1 << 0;
private static final int ADJUST_TOGGLE_MUTE = 101;
/** The audio stream for phone calls */
private static final int STREAM_VOICE_CALL = 0;
/** The audio stream for system sounds */
private static final int STREAM_SYSTEM = 1;
/** The audio stream for the phone ring */
private static final int STREAM_RING = 2;
/** The audio stream for music playback */
private static final int STREAM_MUSIC = 3;
/** The audio stream for alarms */
private static final int STREAM_ALARM = 4;
/** The audio stream for notifications */
private static final int STREAM_NOTIFICATION = 5;
/** @hide The audio stream for phone calls when connected to bluetooth */
private static final int STREAM_BLUETOOTH_SCO = 6;
/** @hide The audio stream for enforced system sounds in certain countries (e.g camera in Japan) */
private static final int STREAM_SYSTEM_ENFORCED = 7;
/** The audio stream for DTMF Tones */
private static final int STREAM_DTMF = 8;
/** @hide The audio stream for text to speech (TTS) */
private static final int STREAM_TTS = 9;
@SuppressLint("HandlerLeak")
Handler handler = new Handler(){
public void handleMessage(Message msg)
{
if(msg.what == 0x123)
{
Toast.makeText(MainActivity.this, "进入截图功能", Toast.LENGTH_SHORT).show();
}
}
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
smdt = SmdtManager.create(this);
mAudioManager = (AudioManager)getSystemService(Service.AUDIO_SERVICE);
button_close = (Button) findViewById(R.id.button_close);
button_reboot = (Button) findViewById(R.id.button_reboot);
button_get_nettype = (Button) findViewById(R.id.button_get_nettype);
button_takePictrue = (Button) findViewById(R.id.button_takepictrue);
button_settime = (Button) findViewById(R.id.button_settime);
button_settimebyNet = (Button) findViewById(R.id.button_settimebynet);
button_settimebynetoff = (Button) findViewById(R.id.button_settimebynetoff);
button_silentInstall = (Button) findViewById(R.id.button_silentInstall);
editNetType = (TextView) findViewById(R.id.edit_get_net_type);
textView = (TextView)findViewById(R.id.textView);
tv_Mac = (TextView)findViewById(R.id.tv_showMac);
tv_IP = (TextView)findViewById(R.id.tv_showIP);
tv_setIP = (EditText)findViewById(R.id.tv_setIP);
txt_volume_show = (TextView)findViewById(R.id.txt_volume_show);
tv_sd = (TextView)findViewById(R.id.tv_sd);
tv_usb = (TextView)findViewById(R.id.tv_USB);
tv_bright = (TextView)findViewById(R.id.tv_bright);
tv_eth = (TextView)findViewById(R.id.tv_eth);
btn_set_power_off_on_time = (Button)findViewById(R.id.set_power_off_on_time);
et_year = (EditText)findViewById(R.id.et_year);
et_month = (EditText)findViewById(R.id.et_month);
et_day = (EditText)findViewById(R.id.et_day);
et_hour = (EditText)findViewById(R.id.et_hour);
et_minute = (EditText)findViewById(R.id.et_minute);
edit_hour = (EditText)findViewById(R.id.edit_hour);
edit_minute = (EditText)findViewById(R.id.edit_minute);
edit_values = (EditText)findViewById(R.id.edit_values);
edit_setBright = (EditText)findViewById(R.id.edit_setBright);
edit_enable = (EditText)findViewById(R.id.edit_enable);
tv_usbNum = (EditText)findViewById(R.id.tv_usbNum);
btn_gpio = (Button)findViewById(R.id.btn_gpio);
btn_devices = (Button)findViewById(R.id.btn_devices);
btn_uart = (Button)findViewById(R.id.btn_uart);
btn_update = (Button)findViewById(R.id.btn_update);
btn_wifi = (Button)findViewById(R.id.btn_wifi);
btn_showstatus = (Button)findViewById(R.id.btn_showstatus);
btn_hidestatus = (Button)findViewById(R.id.btn_hidestatus);
btn_openback = (Button)findViewById(R.id.btn_openback);
btn_closeback = (Button)findViewById(R.id.btn_closeback);
btn_io_closeback = (Button)findViewById(R.id.btn_bright);
btn_volumeadd = (Button)findViewById(R.id.btn_volumeadd);
btn_volumedec = (Button)findViewById(R.id.btn_volumedec);
btn_mute = (Button)findViewById(R.id.btn_mute);
btn_normal = (Button)findViewById(R.id.btn_normal);
btn_one = (Button)findViewById(R.id.btn_one);
btn_two = (Button)findViewById(R.id.btn_two);
btn_three = (Button)findViewById(R.id.btn_three);
btn_four = (Button)findViewById(R.id.btn_four);
btn_setVolume = (Button)findViewById(R.id.btn_setVolume);
btn_getVolume = (Button)findViewById(R.id.btn_getVolume);
btn_getBright = (Button)findViewById(R.id.btn_getBright);
btn_openlog = (Button)findViewById(R.id.btn_openlog);
btn_closelog = (Button)findViewById(R.id.btn_closelog);
btn_getMac = (Button)findViewById(R.id.btn_getmac);
btn_setIP = (Button)findViewById(R.id.btn_setIP);
btn_getIP = (Button)findViewById(R.id.btn_getIP);
btn_USB = (Button)findViewById(R.id.btn_USB);
ed_usb_num = (EditText)findViewById(R.id.edit_usb_num);
btn_sd = (Button)findViewById(R.id.btn_sd);
btn_watchdog = (Button)findViewById(R.id.btn_watchdog);
btn_closedog = (Button)findViewById(R.id.btn_closedog);
btn_feeddog = (Button)findViewById(R.id.btn_feeddog);
btn_openUsb = (Button)findViewById(R.id.btn_openUSB);
btn_closeUsb = (Button)findViewById(R.id.btn_closeUSB);
btn_getEth = (Button)findViewById(R.id.btn_getEth);
btn_getback = (Button)findViewById(R.id.btn_getback);
btn_openEthPower = (Button)findViewById(R.id.btn_openEthPower);
btn_closeEthPower = (Button)findViewById(R.id.btn_closeEthPower);
tv_screenWidth = (TextView) findViewById(R.id.tv_screenWidth);
tv_screenHeight = (TextView)findViewById(R.id.tv_screenHeight);
btn_screenHeight = (Button) findViewById(R.id.btn_screenHeight);
btn_screenWidth = (Button) findViewById(R.id.btn_screenWidth);
//eeprom
btn_write_eeprom = (Button)findViewById(R.id.btn_write_eeprom);
btn_read_eeprom = (Button)findViewById(R.id.btn_read_eeprom);
tv_read_eeprom = (TextView) findViewById(R.id.tv_read_eeprom);
et_eeprom_data = (EditText)findViewById(R.id.et_eeprom_data);
et_deviceId = (EditText)findViewById(R.id.et_deviceId);
et_areaId = (EditText)findViewById(R.id.et_areaId);
et_start_addr = (EditText)findViewById(R.id.et_start_addr);
et_size = (EditText)findViewById(R.id.et_size);
//api version
tv_api_version = (TextView) findViewById(R.id.tv_api_version);
btn_get_api_version = (Button)findViewById(R.id.btn_get_api_version);
//3G
btn_3G_open = (Button)findViewById(R.id.btn_3G_open);
btn_3G_close = (Button)findViewById(R.id.btn_3G_close);
btn_3G_reset = (Button)findViewById(R.id.btn_3G_reset);
//led
btn_led_open = (Button)findViewById(R.id.btn_led_open);
btn_led_close = (Button)findViewById(R.id.btn_led_close);
btn_three_poweronoff = (Button)findViewById(R.id.button_three_poweronoff);
//mic
btn_headsetmic_open = (Button)findViewById(R.id.btn_headsetmic_open);
btn_headsetmic_close = (Button)findViewById(R.id.btn_headsetmic_close);
//unmount
btn_unmount = (Button)findViewById(R.id.btn_unmount);
et_unmount_path= (EditText)findViewById(R.id.et_unmount_path);
//screen_number
btn_get_screen_number = (Button)findViewById(R.id.btn_get_screen_number);
tv_screen_number= (TextView)findViewById(R.id.tv_screen_number1);
//hdmi in
btn_get_hdmiin_status = (Button)findViewById(R.id.btn_get_hdmiin_status);
btn_watchdog.setOnClickListener(this);
btn_closedog.setOnClickListener(this);
btn_feeddog.setOnClickListener(this);
btn_USB.setOnClickListener(this);
btn_sd.setOnClickListener(this);
button_close.setOnClickListener(this);
button_reboot.setOnClickListener(this);
button_get_nettype.setOnClickListener(this);
button_takePictrue.setOnClickListener(this);
button_settime.setOnClickListener(this);
button_settimebyNet.setOnClickListener(this);
button_settimebynetoff.setOnClickListener(this);
button_silentInstall.setOnClickListener(this);
btn_set_power_off_on_time.setOnClickListener(this);
btn_gpio.setOnClickListener(this);
btn_devices.setOnClickListener(this);
btn_uart.setOnClickListener(this);
btn_update.setOnClickListener(this);
btn_showstatus.setOnClickListener(this);
btn_hidestatus.setOnClickListener(this);
btn_openback.setOnClickListener(this);
btn_closeback.setOnClickListener(this);
btn_volumeadd.setOnClickListener(this);
btn_volumedec.setOnClickListener(this);
btn_mute.setOnClickListener(this);
btn_normal.setOnClickListener(this);
btn_wifi.setOnClickListener(this);
btn_one.setOnClickListener(this);
btn_two.setOnClickListener(this);
btn_three.setOnClickListener(this);
btn_four.setOnClickListener(this);
btn_io_closeback.setOnClickListener(this);
btn_setVolume.setOnClickListener(this);
btn_getVolume.setOnClickListener(this);
btn_getBright.setOnClickListener(this);
btn_openlog.setOnClickListener(this);
btn_closelog.setOnClickListener(this);
btn_getMac.setOnClickListener(this);
btn_setIP.setOnClickListener(this);
btn_getIP.setOnClickListener(this);
btn_openUsb.setOnClickListener(this);
btn_closeUsb.setOnClickListener(this);
btn_getEth.setOnClickListener(this);
btn_getback.setOnClickListener(this);
btn_openEthPower.setOnClickListener(this);
btn_closeEthPower.setOnClickListener(this);
btn_screenWidth.setOnClickListener(this);
btn_screenHeight.setOnClickListener(this);
btn_write_eeprom.setOnClickListener(this);
btn_read_eeprom.setOnClickListener(this);
btn_get_api_version.setOnClickListener(this);
//3G
btn_3G_open.setOnClickListener(this);
btn_3G_close.setOnClickListener(this);
btn_3G_reset.setOnClickListener(this);
//led
btn_led_open.setOnClickListener(this);
btn_led_close.setOnClickListener(this);
btn_three_poweronoff.setOnClickListener(this);
//led
btn_headsetmic_open.setOnClickListener(this);
btn_headsetmic_close.setOnClickListener(this);
//unmout
btn_unmount.setOnClickListener(this);
//screen_number
btn_get_screen_number.setOnClickListener(this);
//hdmi in
btn_get_hdmiin_status.setOnClickListener(this);
}
@Override
public void onClick(View v) {
switch(v.getId())
{
case R.id.button_close:
smdt.shutDown();
break;
case R.id.button_reboot:
smdt.smdtReboot("reboot");
break;
case R.id.button_three_poweronoff:
smdt.smdtSetPowerOnOff((char)0, (char)3, (char)0, (char)3, (char)3);
break;
case R.id.set_power_off_on_time:
String offTime = edit_hour.getText().toString();
String onTime = edit_minute.getText().toString();
String enable = edit_enable.getText().toString().trim();
if(!(offTime.equals("") && onTime.equals("") && enable.equals(""))){
smdt.smdtSetTimingSwitchMachine(offTime, onTime, enable);
}else{
Toast.makeText(getApplicationContext(), "please input shutdown time", Toast.LENGTH_SHORT).show();
}
break;
case R.id.button_get_nettype:
String netType = smdt.getCurrentNetType();
editNetType.setText(netType);
break;
case R.id.button_silentInstall:
Thread t = new Thread(){
@Override
public void run()
{
String path = Environment.getExternalStorageDirectory().getPath().toString() + File.separator + "Update.apk";
Log.d("lzl", "======button_silentInstall==========path:" + path);
if(!path.equals("")){
smdt.smdtSilentInstall(path, getApplicationContext());
Message msg = new Message();
msg.what = 0x123;
}else{
Toast.makeText(getApplicationContext(), "please choose install apk", Toast.LENGTH_SHORT).show();
}
}
};
t.start();
break;
case R.id.button_takepictrue:
Thread t2 = new Thread(){
@Override
public void run()
{
Intent intent = new Intent(MainActivity.this, ScreenActivity.class);
startActivity(intent);
Message msg = new Message();
msg.what = 0x123;
handler.sendEmptyMessage(msg.what);
}
};
t2.start();
break;
case R.id.btn_gpio:
Intent intent = new Intent(this, GpioActivity.class);
startActivity(intent);
break;
case R.id.btn_openlog:
smdt.smdtGetSystemLogcat("mnt/sdcard/");
break;
case R.id.btn_closelog:
smdt.getLogcatInterface().stopLogcatManager();
break;
case R.id.btn_devices:
Intent intent1 = new Intent(this, DevicesActivity.class);
startActivity(intent1);
break;
case R.id.btn_uart:
spin_dev = (Spinner)findViewById(R.id.spin_dev);
spin_dev.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
String str = arg0.getItemAtPosition(arg2).toString();
textView.setText(smdt.getUartPath(str));
}
@Override
public void onNothingSelected(AdapterView<?> arg0) { }
});
break;
case R.id.btn_update:
/*
String updateimg_path[] = {
"/mnt/internal_sd/update.zip",
"/mnt/external_sd/update.zip",
"/mnt/usb_storage/USB_DISK1/udisk2/update.zip",
"/mnt/usb_storage/USB_DISK1/udisk0/update.zip",
"/mnt/usb_storage/USB_DISK1/udisk1/update.zip",
"/mnt/usb_storage/USB_DISK2/udisk0/update.zip",
"/mnt/usb_storage/USB_DISK0/udisk0/update.zip"
};
for(int i=0; i<updateimg_path.length; i++)
{
File file = new File(updateimg_path[i]);
//Log.d("lzl", "============111==========sdPath:" + updateimg_path[i]);
if(file.exists()){
try {
Log.d("lzl", "======================sdPath:" + updateimg_path[i]);
smdt.smdtInstallPackage(getApplicationContext(), file);
} catch (IOException e) {
e.printStackTrace();
}
}else{
//Toast.makeText(getApplicationContext(), "please choose update.zip", Toast.LENGTH_SHORT).show();
}
}
*/
//String sdPath =Environment.getExternalStorageDirectory().getPath().toString() + File.separator + "update.zip";
try {
//Log.d("lzl", "=========start smdtRebootRecovery=============");
smdt.smdtRebootRecovery();
} catch (Exception e) {
e.printStackTrace();
}
break;
case R.id.button_settime:
String year = et_year.getText().toString();
String month = et_month.getText().toString();
String hourday = et_day.getText().toString();
String hour = et_hour.getText().toString();
String minute = et_minute.getText().toString();
if(!(year.equals("") && (month.equals("") && (hourday.equals("") && (hour.equals("") && (minute.equals(""))))))){
smdt.setTime(getApplicationContext(),Integer.valueOf(year), Integer.valueOf(month),
Integer.valueOf(hourday), Integer.valueOf(hour),
Integer.valueOf(minute));
}else{
Toast.makeText(getApplicationContext(), "please input time!", Toast.LENGTH_SHORT).show();
}
break;
case R.id.button_settimebynet:
smdt.setTimeFromNetwork(true, MainActivity.this);
break;
case R.id.button_settimebynetoff:
smdt.setTimeFromNetwork(false, MainActivity.this);
break;
case R.id.btn_wifi:
Intent intent2 = new Intent(this, WifiActivity.class);
startActivity(intent2);
break;
case R.id.btn_showstatus:
smdt.smdtSetStatusBar(getApplicationContext(), true);
break;
case R.id.btn_hidestatus:
smdt.smdtSetStatusBar(getApplicationContext(), false);
break;
case R.id.btn_one:
Handler mHandler = new Handler();
Runnable updateThread = new Runnable(){
public void run()
{
smdt.setRotation("0");
}
};
mHandler.postDelayed(updateThread, 200);
break;
case R.id.btn_two:
smdt.setRotation("90");
break;
case R.id.btn_three:
smdt.setRotation("180");
break;
case R.id.btn_four:
smdt.setRotation("270");
break;
case R.id.btn_openback:
smdt.smdtSetLcdBackLight(1);
break;
case R.id.btn_closeback:
smdt.smdtSetLcdBackLight(0);
break;
case R.id.btn_getback:
Toast.makeText(getApplicationContext(), "lcd backLight state:"+smdt.smdtGetLcdLightStatus(), Toast.LENGTH_SHORT).show();
break;
case R.id.btn_bright:
String bright = edit_setBright.getText().toString();
if(!bright.equals("")){
smdt.setBrightness(getContentResolver(), Integer.parseInt(bright));
}else{
Toast.makeText(getApplicationContext(), "please input bright value", Toast.LENGTH_SHORT).show();
}
break;
case R.id.btn_getBright:
tv_bright.setText(smdt.getScreenBrightness(getApplicationContext()) + "");
break;
case R.id.btn_volumeadd:
mAudioManager.adjustStreamVolume(STREAM_MUSIC,ADJUST_RAISE,FLAG_SHOW_UI);//澧炲姞闊抽噺
break;
case R.id.btn_volumedec:
mAudioManager.adjustStreamVolume(STREAM_MUSIC,ADJUST_LOWER,FLAG_SHOW_UI);//鍑忓皯闊抽噺 STREAM_RING STREAM_MUSIC STREAM_ALARM
break;
case R.id.btn_mute:
Log.d("lzl", "=smdt.getAndroidVersion():" + smdt.getAndroidVersion());
if(smdt.getAndroidVersion().equals("4.4.4") || smdt.getAndroidVersion().equals("4.2.2")){
smdt.setVolumeStates(2);
}else{
//mAudioManager.adjustStreamVolume(STREAM_MUSIC,ADJUST_MUTE,FLAG_SHOW_UI);
Thread browseThread = new Thread() {
public void run() {
exec_Cmd("input keyevent 164");
}
};
browseThread.start();
}
break;
case R.id.btn_normal:
if(smdt.getAndroidVersion().equals("4.4.4") || smdt.getAndroidVersion().equals("4.2.2")){
smdt.setVolumeStates(3);
}else {
//mAudioManager.adjustStreamVolume(STREAM_MUSIC,ADJUST_UNMUTE,FLAG_SHOW_UI); //KeyEvent.KEYCODE_VOLUME_MUTE
Thread browseThread = new Thread() {
public void run() {
exec_Cmd("input keyevent 164");
}
};
browseThread.start();
}
break;
case R.id.btn_setVolume:
String volume = edit_values.getText().toString();
if(!volume.equals("")){
smdt.smdtSetVolume(getApplicationContext(), Integer.parseInt(volume));
Toast.makeText(getApplicationContext(), smdt.smdtSetVolume(getApplicationContext(), Integer.parseInt(volume)) + "", Toast.LENGTH_SHORT).show();
}else{
Toast.makeText(getApplicationContext(), "please input volume", Toast.LENGTH_SHORT).show();
}
break;
case R.id.btn_getVolume:
txt_volume_show.setText(smdt.smdtGetVolume(getApplicationContext()) + "");
break;
case R.id.btn_getmac:
tv_Mac.setText(smdt.smdtGetEthMacAddress() + "");
break;
case R.id.btn_setIP:
String ip = tv_setIP.getText().toString();
if(!ip.equals("")){
smdt.smdtSetEthIPAddress(ip, "255.255.255.0", "192.9.50.1", "202.96.134.133");
}else{
Toast.makeText(getApplicationContext(), "please input ip", Toast.LENGTH_SHORT).show();
}
break;
case R.id.btn_getIP:
tv_IP.setText(smdt.smdtGetEthIPAddress() + "");
break;
case R.id.btn_USB:
if (ed_usb_num.getText().toString().equals(""))
{
Toast.makeText(getApplicationContext(), "please input usb number!", Toast.LENGTH_SHORT).show();
return;
}
tv_usb.setText(smdt.smdtGetUSBPath(getApplicationContext(), Integer.parseInt(ed_usb_num.getText().toString())));
break;
case R.id.btn_sd:
tv_sd.setText(smdt.smdtGetSDcardPath(getApplicationContext()));
break;
case R.id.btn_watchdog:
smdt.smdtWatchDogEnable((char)1);
break;
case R.id.btn_closedog:
smdt.smdtWatchDogEnable((char)0);
break;
case R.id.btn_feeddog:
smdt.smdtWatchDogFeed();
break;
case R.id.btn_openUSB:
if (tv_usbNum.getText().toString().equals(""))
{
Toast.makeText(getApplicationContext(), "usb number is null", Toast.LENGTH_SHORT).show();
return;
}
smdt.smdtSetUsbPower(1, Integer.parseInt(tv_usbNum.getText().toString()), 1);
break;
case R.id.btn_closeUSB:
if (tv_usbNum.getText().toString().equals(""))
{
Toast.makeText(getApplicationContext(), "usb number is null", Toast.LENGTH_SHORT).show();
return;
}
smdt.smdtSetUsbPower(1, Integer.parseInt(tv_usbNum.getText().toString()), 0);
break;
case R.id.btn_getEth:
boolean isEnable = smdt.smdtGetEthernetState();
if (isEnable)
{
tv_eth.setText("open");
} else {
tv_eth.setText("close");
}
break;
case R.id.btn_openEthPower:
smdt.smdtSetControl(11, 1);
break;
case R.id.btn_closeEthPower:
smdt.smdtSetControl(11, 0);
break;
case R.id.btn_screenWidth:
int val = smdt.smdtGetScreenWidth(getApplicationContext());
tv_screenWidth.setText(val + "");
break;
case R.id.btn_screenHeight:
val = smdt.smdtGetScreenHeight(getApplicationContext());
tv_screenHeight.setText(val + "");
break;
case R.id.btn_write_eeprom:
String strEEprom = et_eeprom_data.getText().toString();
if (et_deviceId.getText().toString().equals("")
||et_areaId.getText().toString().equals("")
||et_start_addr.getText().toString().equals("")
||et_size.getText().toString().equals(""))
{
Toast.makeText(getApplicationContext(), "please check input paremete!", Toast.LENGTH_SHORT).show();
return;
}
smdt.smdtWriteExtROM(Integer.parseInt(et_deviceId.getText().toString()),
Integer.parseInt(et_areaId.getText().toString()),
Integer.parseInt(et_start_addr.getText().toString()),
Integer.parseInt(et_size.getText().toString()),
strEEprom.getBytes());
break;
case R.id.btn_read_eeprom:
if (et_deviceId.getText().toString().equals("")
||et_areaId.getText().toString().equals("")
||et_start_addr.getText().toString().equals("")
||et_size.getText().toString().equals(""))
{
Toast.makeText(getApplicationContext(), "please check input paremete!", Toast.LENGTH_SHORT).show();
return;
}
byte[] data = smdt.smdtReadExtROM(Integer.parseInt(et_deviceId.getText().toString()),
Integer.parseInt(et_areaId.getText().toString()),
Integer.parseInt(et_start_addr.getText().toString()),
Integer.parseInt(et_size.getText().toString()));
if (data != null)
{
String s=new String(data);
tv_read_eeprom.setText(s);
} else {
tv_read_eeprom.setText("");
}
break;
case R.id.btn_get_api_version:
tv_api_version.setText(smdt.smdtGetAPIVersion());
break;
case R.id.btn_3G_open:
smdt.smdtSetControl(9, 1);
break;
case R.id.btn_3G_close:
smdt.smdtSetControl(9, 0);
break;
case R.id.btn_3G_reset:
try {
smdt.smdtSetControl(10, 0);
Thread.sleep(1000);
smdt.smdtSetControl(10, 1);
} catch (Exception e) {
e.printStackTrace();
}
break;
case R.id.btn_led_open:
smdt.smdtSetControl(5, 1);
break;
case R.id.btn_led_close:
if (smdt == null)
{
Log.d("lzl", "============smdt is null======");
} else
smdt.smdtSetControl(5, 0);
break;
case R.id.btn_headsetmic_open:
smdt.setHeadsetMicOnOff(1);
break;
case R.id.btn_headsetmic_close:
if (smdt == null)
{
Log.d("lzl", "============smdt is null======");
} else
smdt.setHeadsetMicOnOff(0);
break;
case R.id.btn_unmount:
if (smdt == null)
{
Log.d("lzl", "============smdt is null======");
} else
smdt.unmountVolume(et_unmount_path.getText().toString(), true, false);
break;
case R.id.btn_get_screen_number:
int screen_number = smdt.getScreenNumber();
tv_screen_number.setText(screen_number+"");
break;
case R.id.btn_get_hdmiin_status:
int ret = smdt.getHdmiinStatus();
Toast.makeText(getApplicationContext(), "hdmi status:" + ret, Toast.LENGTH_SHORT).show();
break;
default:
break;
}
}
public void smdtRebootRecovery(Context context) {
File RECOVERY_DIR = new File("/cache/recovery");
File COMMAND_FILE = new File(RECOVERY_DIR, "command");
String SHOW_TEXT="--show_text";
RECOVERY_DIR.mkdirs();
// In case we need it COMMAND_FILE.delete();
// In case it's not writable
try {
FileWriter command = new FileWriter(COMMAND_FILE);
command.write(SHOW_TEXT);
command.write("\n");
command.close();
} catch (IOException e) {
e.printStackTrace();
}
PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
pm.reboot("recovery");
}
public final int exec_Cmd(String paramString) {
try {
java.lang.Process localProcess = Runtime.getRuntime().exec("sh");
Object localObject = localProcess.getOutputStream();
DataOutputStream localDataOutputStream = new DataOutputStream((OutputStream)localObject);
String str = String.valueOf(paramString);
localObject = str + "\n";
localDataOutputStream.writeBytes((String)localObject);
localDataOutputStream.flush();
localDataOutputStream.writeBytes("exit\n");
localDataOutputStream.flush();
localProcess.waitFor();
localObject = localProcess.exitValue();
} catch (Exception localException) {
localException.printStackTrace();
}
return 0;
}
public void smdtInstallPackage(Context context, File packageFile) throws IOException
{
File RECOVERY_DIR = new File("/cache/recovery");
File COMMAND_FILE = new File(RECOVERY_DIR, "command");
String filename = packageFile.getCanonicalPath();
String arg = "--update_package=" + filename;
String SHOW_TEXT="--show_text";
RECOVERY_DIR.mkdirs();
FileWriter command = new FileWriter(COMMAND_FILE);
try {
//command.write(arg);
command.write(SHOW_TEXT);
command.write("\n");
command.close();
}catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
pm.reboot("recovery");
}
public String getMipsDualResolution(Activity ctx)
{
DisplayManager mDisplayManager = (DisplayManager)ctx.getSystemService(Context.DISPLAY_SERVICE);
Display[] displays = mDisplayManager.getDisplays();
DisplayMetrics mDisplayMetrics = new DisplayMetrics();
if(displays.length == 1)
{
displays[0].getRealMetrics(mDisplayMetrics);
int width = mDisplayMetrics.widthPixels;
int height = mDisplayMetrics.heightPixels;
Log.i("DeviceUtils", "length == 1 getMipsDualResolution: lvds w" +width );
Log.i("DeviceUtils", "length == 1 getMipsDualResolution: lvds h" +height );
return "LVDS_" + width + "*" + height;
}
else if(displays.length == 2)
{
displays[0].getRealMetrics(mDisplayMetrics);
int width_1 = mDisplayMetrics.widthPixels;
int height_1 = mDisplayMetrics.heightPixels;
displays[1].getRealMetrics(mDisplayMetrics);
int width_2 = mDisplayMetrics.widthPixels;
int height_2 = mDisplayMetrics.heightPixels;
Log.i("DeviceUtils", "getMipsDualResolution: lvds w" +width_1 );
Log.i("DeviceUtils", "getMipsDualResolution: lvds h" +height_1 );
Log.i("DeviceUtils", "getMipsDualResolution: hdmi w" +width_2 );
Log.i("DeviceUtils", "getMipsDualResolution: hdmi h" +height_2 );
return "LVDS_" + width_1 + "*" + height_1 + "," + "HDMI_" + width_2 + "*" + height_2;
}
return null;
}
}
package com.smdt.androidapi;
import android.app.Service;
import android.app.smdt.SmdtManager;
import android.content.Intent;
import android.os.IBinder;
public class MyService extends Service{
private SmdtManager smdt;
@Override
public IBinder onBind(Intent arg0) {
// TODO Auto-generated method stub
return null;
}
@Override
public void onStart(Intent intent, int startId) {
// TODO Auto-generated method stub
super.onStart(intent, startId);
smdt= SmdtManager.create(this);
smdt.smdtSetExtrnalGpioValue(1, true);
}
}
package com.smdt.androidapi;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.smdt.SmdtManager;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.Display;
import android.view.Surface;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.MediaController;
import android.widget.VideoView;
public class ScreenActivity extends Activity {
private Button btn_screen;
private VideoView videoView;
private SmdtManager smdt;
private String filePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getPath() + File.separator;
@Override
protected void onCreate(Bundle arg0) {
super.onCreate(arg0);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.screen);
btn_screen = (Button)findViewById(R.id.btn_screen);
videoView = (VideoView)findViewById(R.id.videoView);
final String sdPath = Environment.getExternalStorageDirectory().getPath().toString() + File.separator + "1.mp4";
File file = new File(sdPath);
Log.e("sdPath", "===file:" + file + ", sdPath: " + sdPath );
if(file.exists()){
videoView.setMediaController(new MediaController(this));
videoView.setVideoPath(sdPath);
// videoView.setVideoURI(Uri.parse("http://mvvideo1.meitudata.com/572552eaf0d841441.mp4"));
videoView.start();
videoView.requestFocus();
videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mp) {
mp.start();
mp.setLooping(true);
}
});
videoView.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer arg0) {
videoView.setVideoPath(sdPath);
videoView.start();
}
});
}
btn_screen.setOnClickListener(new View.OnClickListener() {
@SuppressLint("SimpleDateFormat")
@Override
public void onClick(View arg0) {
smdt = SmdtManager.create(getApplicationContext());
SimpleDateFormat sdformats = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss-SSS");
String fileNames = sdformats.format(new Date(System.currentTimeMillis())) + ".png";
smdt.smdtTakeScreenshot(filePath, fileNames, getApplicationContext());
}
});
}
}
package com.smdt.androidapi;
import android.app.Activity;
import android.app.smdt.SmdtManager;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class WifiActivity extends Activity implements OnClickListener{
private Button open,close;
private SmdtManager smdtManager;
@Override
protected void onCreate(Bundle arg0) {
super.onCreate(arg0);
setContentView(R.layout.wifi);
open = (Button)findViewById(R.id.btn_openwifi);
close = (Button)findViewById(R.id.btn_closewifi);
open.setOnClickListener(this);
close.setOnClickListener(this);
smdtManager = SmdtManager.create(this);
}
@Override
public void onClick(View v) {
switch(v.getId()){
case R.id.btn_openwifi:
smdtManager.getWifiInterface(getApplicationContext()).wifiOpen();
break;
case R.id.btn_closewifi:
smdtManager.getWifiInterface(getApplicationContext()).wifiClose();
break;
default:
break;
}
}
}
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.smdt.androidapi.MainActivity" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="1.系统控制"/>
<Button
android:id="@+id/button_close"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:text="关闭系统(点击按钮即可)" />
<Button
android:id="@+id/button_reboot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="36dp"
android:text="重启系统(点击按钮即可)" />
<Button
android:id="@+id/button_three_poweronoff"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="36dp"
android:text="@string/three_poweronoff" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="2.定时开关机"/>
<EditText
android:id="@+id/edit_hour"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:hint="@string/et_hour" />
<EditText
android:id="@+id/edit_minute"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:hint="@string/et_minute" />
<EditText
android:id="@+id/edit_enable"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:inputType="number"
android:hint="@string/et_enable" />
<Button
android:id="@+id/set_power_off_on_time"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginLeft="24dp"
android:text="设置定时开关机时间"/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="3.网络类型" />
<Button
android:id="@+id/button_get_nettype"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:text="获取当前网络类型" />
<TextView
android:id="@+id/edit_get_net_type"
android:layout_width="400dp"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:hint="点击按钮后,这里会显示当前网络类型"
android:textSize="24sp" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="4.截图"/>
<Button
android:id="@+id/button_takepictrue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="76dp"
android:text="先把1.mp4视频存储在系统内存中,然后点击截图按钮,接着画面会跳转并播放视频,再点击下方的按钮,截图的图片存储在系统的pictures目录下" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="5.APK安装" />
<Button
android:id="@+id/button_silentInstall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="44dp"
android:text="先把Update.apk放入系统存储根目录下,再点击按钮" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="6.Gpio" />
<Button
android:id="@+id/btn_gpio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="76dp"
android:text="Gpio" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="7.设备信息" />
<Button
android:id="@+id/btn_devices"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:text="关于设备信息" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="8.串口控制" />
<Button
android:id="@+id/btn_uart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:text="获取串口路径(先点击按钮,然后下拉旁边的框)" />
<Spinner
android:id="@+id/spin_dev"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:entries="@array/uart_path" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24sp" />
<!-- <Button
android:id="@+id/btn_serialreceive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:text="接收"/>
<Button
android:id="@+id/btn_serialsend"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:text="发送"/> -->
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="9.固件升级" />
<Button
android:id="@+id/btn_update"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:text="升级update.zip(先把update.zip包存储在系统内部的根目录下,再点击按钮)" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="10.时间控制"/>
<EditText
android:id="@+id/et_year"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_marginLeft="36dp"
android:numeric="integer"
android:hint="@string/et_year" />
<EditText
android:id="@+id/et_month"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:numeric="integer"
android:hint="@string/et_month" />
<EditText
android:id="@+id/et_day"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:numeric="integer"
android:hint="@string/et_day"/>
<EditText
android:id="@+id/et_hour"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:numeric="integer"
android:hint="小时" />
<EditText
android:id="@+id/et_minute"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:numeric="integer"
android:hint="分钟" />
<Button
android:id="@+id/button_settime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:text="更改设置时间" />
<Button
android:id="@+id/button_settimebynet"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:text="同步网络时间" />
<Button
android:id="@+id/button_settimebynetoff"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:text="取消同步网络时间" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="11.wifi控制"/>
<Button
android:id="@+id/btn_wifi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:text="wifi控制" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="12.状态栏开关"/>
<Button
android:id="@+id/btn_showstatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:text="显示状态栏" />
<Button
android:id="@+id/btn_hidestatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:text="隐藏状态栏" />/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="13.旋转屏幕"/>
<Button
android:id="@+id/btn_one"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="0" />
<Button
android:id="@+id/btn_two"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:text="90" />
<Button
android:id="@+id/btn_three"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:text="180" />
<Button
android:id="@+id/btn_four"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:text="270" />/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="14.背光控制"/>
<Button
android:id="@+id/btn_openback"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="开" />
<Button
android:id="@+id/btn_closeback"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:text="关" />
<Button
android:id="@+id/btn_getback"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="获取开关屏状态值 " />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="15.系统日志"/>
<Button
android:id="@+id/btn_openlog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="开" />
<Button
android:id="@+id/btn_closelog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:text="关" />/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="16.声音控制"/>
<Button
android:id="@+id/btn_volumeadd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:text="音量+" />
<Button
android:id="@+id/btn_volumedec"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:text="音量-" />
<Button
android:id="@+id/btn_mute"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:text="静音" />
<Button
android:id="@+id/btn_normal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:text="正常" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="17.亮度"/>
<Button
android:id="@+id/btn_bright"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="设置亮度" />
<EditText
android:id="@+id/edit_setBright"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:numeric="integer"
android:hint="@string/edit_setBright"/>
<Button
android:id="@+id/btn_getBright"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="获取亮度值"/>
<TextView
android:id="@+id/tv_bright"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="显示亮度值" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="18.设置音量"/>
<Button
android:id="@+id/btn_setVolume"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="设置声音值" />
<EditText
android:id="@+id/edit_values"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:numeric="integer"
android:hint="输入音量值(1~15)"/>
<Button
android:id="@+id/btn_getVolume"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="获取声音值" />
<TextView
android:id="@+id/txt_volume_show"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:textSize="24sp"
android:hint="获取音量值"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="19.获取网络IP和Mac地址"/>
<Button
android:id="@+id/btn_getmac"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="获取网络Mac地址"/>
<TextView
android:id="@+id/tv_showMac"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:layout_marginLeft="34dp"
android:text="显示Mac地址"/>
<Button
android:id="@+id/btn_setIP"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="设置IP地址"/>
<EditText
android:id="@+id/tv_setIP"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:layout_marginLeft="34dp"
android:inputType="number"
android:digits="0123456789."
android:hint="显示要设置的IP地址"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:orientation="horizontal" >
<Button
android:id="@+id/btn_getIP"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="获取网络IP地址"/>
<TextView
android:id="@+id/tv_showIP"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:layout_marginLeft="34dp"
android:text="显示IP地址"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="20.路径"/>
<Button
android:id="@+id/btn_sd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="获取SD卡路径" />
<TextView
android:id="@+id/tv_sd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:numeric="integer"
android:hint="显示SD卡路径"/>
<Button
android:id="@+id/btn_USB"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="获取USB路径"/>
<EditText
android:id="@+id/edit_usb_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:numeric="integer"
android:hint="输入USB序号"/>
<TextView
android:id="@+id/tv_USB"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:hint="显示USB路径" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="21.开关开门狗"/>
<Button
android:id="@+id/btn_watchdog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:text="开启开门狗" />
<Button
android:id="@+id/btn_closedog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:text="关闭开门狗" />
<Button
android:id="@+id/btn_feeddog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:text="喂狗" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="22.USB"/>
<Button
android:id="@+id/btn_openUSB"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:text="开usb电源" />
<Button
android:id="@+id/btn_closeUSB"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:text="关usb电源" />
<EditText
android:id="@+id/tv_usbNum"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:numeric="integer"
android:hint="@string/usb_num"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="23.开关以太网"/>
<Button
android:id="@+id/btn_openEthPower"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:text="@string/open_eth_power" />
<Button
android:id="@+id/btn_closeEthPower"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:text="@string/close_eth_power" />
<Button
android:id="@+id/btn_getEth"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:text="@string/get_eth_status" />
<TextView
android:id="@+id/tv_eth"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:hint="@string/eth_status" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="24.屏幕参数"/>
<Button
android:id="@+id/btn_screenWidth"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="获取屏幕宽度"/>
<TextView
android:id="@+id/tv_screenWidth"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="屏幕宽度"/>
<Button
android:id="@+id/btn_screenHeight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="获取屏幕高度"/>
<TextView
android:id="@+id/tv_screenHeight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="屏幕高度"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="24.eeprom"/>
<EditText
android:id="@+id/et_deviceId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:numeric="integer"
android:hint="deviceId(从0开始)"/>
<EditText
android:id="@+id/et_areaId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:numeric="integer"
android:hint="区域ID(从1开始)"/>
<EditText
android:id="@+id/et_start_addr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:numeric="integer"
android:hint="超始地址"/>
<EditText
android:id="@+id/et_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:numeric="integer"
android:hint="数据长度"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:orientation="horizontal" >
<Button
android:id="@+id/btn_write_eeprom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:text="写eeprom"/>
<EditText
android:id="@+id/et_eeprom_data"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:hint="eeprom的数据"/>
<Button
android:id="@+id/btn_read_eeprom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:text="读eeprom"/>
<TextView
android:id="@+id/tv_read_eeprom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="eeprom数据"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="25.API"/>
<Button
android:id="@+id/btn_get_api_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="获取API版本"/>
<TextView
android:id="@+id/tv_api_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="api版本"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="25.3G"/>
<Button
android:id="@+id/btn_3G_open"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="3G开"/>
<Button
android:id="@+id/btn_3G_close"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="3G关"/>
<Button
android:id="@+id/btn_3G_reset"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="3G复位"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="26.LED"/>
<Button
android:id="@+id/btn_led_open"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="led开"/>
<Button
android:id="@+id/btn_led_close"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="led关"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="27.MIC"/>
<Button
android:id="@+id/btn_headsetmic_open"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="耳机mic开"/>
<Button
android:id="@+id/btn_headsetmic_close"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="耳机mic关"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="28.卸载u盘/sd卡"/>
<Button
android:id="@+id/btn_unmount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="卸载u盘/sd卡"/>
<EditText
android:id="@+id/et_unmount_path"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:hint="填写要卸载的SD卡或USB的路径"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="29.双屏异显"/>
<Button
android:id="@+id/btn_get_screen_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="获取screen_number"/>
<TextView
android:id="@+id/tv_screen_number1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="screen_number的值"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="30.hdmi in"/>
<Button
android:id="@+id/btn_get_hdmiin_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:text="获取hdmi in状态"/>
</LinearLayout>
</LinearLayout>
</ScrollView>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="84dp"
android:layout_marginTop="104dp"
android:orientation="vertical" >
<TextView
android:id="@+id/model"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:textSize="36sp"
android:text="@string/model"/>
<TextView
android:id="@+id/Android_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:textSize="36sp"
android:text="@string/android_version"/>
<TextView
android:id="@+id/running"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:textSize="36sp"
android:text="@string/running"/>
<TextView
android:id="@+id/inner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:textSize="36sp"
android:text="@string/inner"/>
<TextView
android:id="@+id/firware"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:textSize="36sp"
android:text="@string/firware"/>
<TextView
android:id="@+id/kernel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:textSize="36sp"
android:text="@string/kernel"/>
<TextView
android:id="@+id/version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:textSize="36sp"
android:text="@string/version"/>
</LinearLayout>
</LinearLayout>
</ScrollView>
\ No newline at end of file
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_marginLeft="440dp"
android:gravity="center" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:orientation="horizontal" >
<Button
android:id="@+id/btn_readGpio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:text="@string/read_gpio"/>
<Button
android:id="@+id/btn_writeGpio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:text="@string/write_gpio"/>
<EditText
android:id="@+id/tv_gpioNum"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:numeric="integer"
android:hint="@string/gpio_num"/>
<EditText
android:id="@+id/tv_gpioValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="34dp"
android:numeric="integer"
android:hint="@string/write_gpio_value"/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin" >
<VideoView
android:id="@+id/videoView"
android:layout_width="700dp"
android:layout_height="600dp" />
<ImageView
android:id="@+id/iv"
android:layout_width="1400dp"
android:layout_height="400dp"
android:layout_toRightOf="@id/videoView"
android:layout_marginLeft="30dp"
android:layout_alignBaseline="@id/videoView"
android:background="@drawable/smdt" />
<Button
android:id="@+id/btn_screen"
android:layout_width="400dp"
android:layout_height="60dp"
android:layout_below="@id/videoView"
android:layout_marginTop="20dp"
android:text="截图" />
<TextView
android:id="@+id/discrible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxEms="38"
android:textSize="36sp"
android:textStyle="bold"
android:text="@string/smdt"
android:layout_marginTop="70dp"
android:layout_below="@id/btn_screen"/>
</RelativeLayout>
\ No newline at end of file
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="164dp"
android:layout_marginTop="164dp"
android:orientation="vertical" >
<Button
android:id="@+id/btn_openwifi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/openwifi" />
<Button
android:id="@+id/btn_closewifi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="36dp"
android:text="@string/closewifi"/>
</LinearLayout>
\ No newline at end of file
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.smdt.androidapi.MainActivity" >
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>
</menu>
<resources>
<!--
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<!-- API 11 theme customizations can go here. -->
</style>
</resources>
<resources>
<!--
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- API 14 theme customizations can go here. -->
</style>
</resources>
<resources>
<!--
Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively).
-->
<dimen name="activity_horizontal_margin">64dp</dimen>
</resources>
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">AndroidApi</string>
<string name="hello_world">Hello world!</string>
<string name="action_settings">Settings</string>
<string name="versions_name">API版本号</string>
<string name="can_not_find_version_name">找不到API版本号</string>
<string name="interface_shutdown">关机</string>
<string name="interface_getipaddr">获取IP</string>
<string name="interface_setpowerofftime">更改设置时间(先输入值,然后再点击按钮)</string>
<string name="btn_screen">截屏</string>
<string name="model">类型</string>
<string name="android_version">Android版本</string>
<string name="running">运行内存</string>
<string name="inner">内部存储</string>
<string name="firware">固件版本</string>
<string name="kernel">内核版本</string>
<string name="version">版本号</string>
<string name="openwifi">打开wifi</string>
<string name="closewifi">关闭wifi</string>
<string name="connectwifi">连接wifi</string>
<string name="disconnectwifi">断开wifi</string>
<string name="et_year">年份</string>
<string name="et_month">月份</string>
<string name="et_day">哪天</string>
<string name="et_hour">关机时间(14:20)</string>
<string name="et_minute">开机时间14:30)</string>
<string name="et_enable">是否设置定时开关机</string>
<string name="edit_setBright">设置亮度</string>
<string name="smdt">深圳市视美泰技术股份有限公司,一直致力于商显智能主板及整体解决方案研发,为商显行业提供智能主板软硬件平台、O2O智能零售设备、及设备运营平台。
服务领域:智能数字标牌、智能零售终端、智能快递柜、虚拟显示设备、机器人、智能家居设备。
面向物联网IOT,以不断发展和积累的技术优势及生产管理经验,保障产品品质和技术服务。</string>
<string name="usb_num">usb口(1~3)</string>
<string name="gpio_num">gpio口(1~10)</string>
<string name="read_gpio">读GPIO</string>
<string name="write_gpio">写GPIO(1~10)</string>
<string name="write_gpio_value">写GPIO值(0 or 1)</string>
<string name="open_eth_power">开以太网电源</string>
<string name="close_eth_power">关以太网电源</string>
<string name="get_eth_status">获取以太网状态</string>
<string name="eth_status">以太网状态</string>
<string name="three_poweronoff">3分钟开3分钟关</string>
<string name="HeadsetMic">耳机mic</string>
<string name="MicOn">mic开</string>
<string name="MicOff">mic关</string>
<string-array name="uart_path" >
<item>uart1</item>
<item>uart2</item>
<item>uart3</item>
<item>uart4</item>
<item>uart5</item>
<item>uart6</item>
</string-array>
</resources>
<resources>
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
</resources>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论