|
@@ -21,6 +21,7 @@ public class TipActionUtils {
|
|
|
private MediaPlayer scanErrMedia;
|
|
private MediaPlayer scanErrMedia;
|
|
|
private MediaPlayer scanRepeatMedia;
|
|
private MediaPlayer scanRepeatMedia;
|
|
|
private MediaPlayer scanSucMedia;
|
|
private MediaPlayer scanSucMedia;
|
|
|
|
|
+ private MediaPlayer reLoginMedia;
|
|
|
private Vibrator scanErrVib;
|
|
private Vibrator scanErrVib;
|
|
|
private Vibrator scanRepeatVib;
|
|
private Vibrator scanRepeatVib;
|
|
|
private volatile static TipActionUtils tipAction;
|
|
private volatile static TipActionUtils tipAction;
|
|
@@ -32,6 +33,13 @@ public class TipActionUtils {
|
|
|
return tipAction;
|
|
return tipAction;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public void reLoginTip(Activity activity){
|
|
|
|
|
+ if (reLoginMedia==null){
|
|
|
|
|
+ reLoginMedia = MediaPlayer.create(activity,R.raw.relogin);
|
|
|
|
|
+ }
|
|
|
|
|
+ reLoginMedia.start();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public void scanRepeatTip(Activity activity){
|
|
public void scanRepeatTip(Activity activity){
|
|
|
if (scanRepeatMedia==null){
|
|
if (scanRepeatMedia==null){
|
|
|
scanRepeatMedia = MediaPlayer.create(activity, R.raw.scanner_repeat);
|
|
scanRepeatMedia = MediaPlayer.create(activity, R.raw.scanner_repeat);
|
|
@@ -81,4 +89,11 @@ public class TipActionUtils {
|
|
|
}
|
|
}
|
|
|
scanErrorTip(activity);
|
|
scanErrorTip(activity);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ public void loginErrorVib(Activity activity, String... args) {
|
|
|
|
|
+ if (args != null && args.length > 0 && args[0] != null) {
|
|
|
|
|
+ LogUtil.e(args[0]);
|
|
|
|
|
+ }
|
|
|
|
|
+ reLoginTip(activity);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|