1 找到录像和拍照的代码位置
packgaes/app/SnapdragonCamera/scr/com/android/camera/VideoModule.java
packgaes/app/SnapdragonCamera/scr/com/android/camera/VideoModule.java
2 添加判断(调用安卓源生方法)
import android.os.BatteryManager;
BatteryManger batteryManager = (BatteryManger)mActivity.getSystemService(Context.BATTERY_SERVICE);
int level = batteryManager.getIntProperty(batteryManager.BATTERY_PROPERTY_CAPACITY);
if(level <=5){
提示;
return;
}
网友评论