updates
This commit is contained in:
parent
b2ca2c1e47
commit
b4e2309243
@ -14,6 +14,13 @@
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
|
||||
android:theme="@style/Theme.LifelineTest2">
|
||||
<receiver android:name=".BootReceiver"
|
||||
android:enabled="true"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true">
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
package com.example.lifeline_test2;
|
||||
|
||||
import android.app.ActivityManager;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
public class BootReceiver extends BroadcastReceiver {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent){
|
||||
if(Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())){
|
||||
ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
|
||||
if(am!=null) {
|
||||
am.clearApplicationUserData();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
package com.example.lifeline_test2;
|
||||
|
||||
import android.app.ActivityManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
@ -89,7 +90,8 @@ protected void onCreate(Bundle savedInstanceState) {
|
||||
webView.setWebViewClient(new WebViewClient());
|
||||
CookieManager.getInstance().setAcceptCookie(true);
|
||||
CookieManager.getInstance().setAcceptThirdPartyCookies(webView,true);
|
||||
// webView.loadUrl("http://10.23.107.10:8000/kioskvideo");
|
||||
|
||||
//webView.loadUrl("http://10.23.107.10:8000/kioskvideo");
|
||||
|
||||
webView.loadUrl("http://192.168.0.114:8000/kioskvideo");
|
||||
//webView.loadUrl("file:///android_asset/index.html");
|
||||
@ -157,7 +159,7 @@ protected void onCreate(Bundle savedInstanceState) {
|
||||
}
|
||||
|
||||
ESCPOS_Printer printer = new ESCPOS_Printer(usbDeviceConnection, usbEndpoint);
|
||||
printer.logo(AppCompatResources.getDrawable(this, R.drawable.logo));
|
||||
printer.logo(AppCompatResources.getDrawable(this, R.drawable.updatedlogocropped));
|
||||
printer.printFormatted(text);
|
||||
printer.feed(5);
|
||||
printer.cut();
|
||||
|
||||
BIN
app/src/main/res/drawable/updatedlogo.jpg
Normal file
BIN
app/src/main/res/drawable/updatedlogo.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
BIN
app/src/main/res/drawable/updatedlogocropped.jpg
Normal file
BIN
app/src/main/res/drawable/updatedlogocropped.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 92 KiB |
@ -1,3 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">Lifeline-Test2</string>
|
||||
<string name="app_name">Lifeline Production</string>
|
||||
</resources>
|
||||
Loading…
x
Reference in New Issue
Block a user