Skip to content

Instantly share code, notes, and snippets.

View enesinky's full-sized avatar
🌍
Building a new ecosystem

enes inkaya enesinky

🌍
Building a new ecosystem
View GitHub Profile
export default {
props: ['websrc'],
data: {
title: "Your Quick App Name",
// keep it empty
loadUrl: "",
// Attribute allowthirdpartycookies, indicates whether cookies can be delivered in cross-domain mode.
// If you need login Google Account or Other Account, Please set TRUE.
<script>
import router from "@system.router";
import device from '@system.device';
let deviceLanguage
let deviceRegion
const pages = {
"default": "https://www.huawei.com", //default global page
"FR": "https://www.huawei.fr", // default page for France region
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- Set the border width and color. -->
<stroke android:width="3dp" android:color="#e1ffff"/>
<!-- Set the fill color within the scanning box. -->
<solid android:color="#00BCD4"/>
<!-- Set the round corner. -->
<corners android:radius="5dip"/>
<!-- Set the padding. -->
public class SecondActivity extends AppCompatActivity {
private static final float SCAN_FRAME_SIZE = 300 ;
private ImageView flashBtn;
private RemoteView remoteView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_second);
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:my_view="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- customize layout needed by scankit for camera preview -->
<FrameLayout
android:id="@+id/square_box"
@enesinky
enesinky / FirstActivity.java
Last active July 1, 2020 14:19
Initial Version!!
public class FirstActivity extends AppCompatActivity {
private Button scanButton;
private TextView resultText;
private final int PERMISSION_REQ_CODE = 111;
private final int SCAN_REQ_CODE = 222;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_first);
scanButton = findViewById(R.id.scanner_button);
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimaryDark"
tools:context=".FirstActivity">
<Button