add project adins

This commit is contained in:
Alfrid Sanjaya Leo Putra 2024-07-25 14:44:22 +07:00
commit f8f85d679d
5299 changed files with 625430 additions and 0 deletions

View file

@ -0,0 +1,172 @@
package com.adins.mss.base.about.activity;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.BatteryManager;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.os.StatFs;
import android.provider.Settings;
import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;
import android.text.format.DateFormat;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;
import com.adins.mss.base.R;
import com.adins.mss.base.networkmonitor.NetworkMonitorDataUsage;
import com.adins.mss.constant.Global;
import com.adins.mss.foundation.formatter.Tool;
import com.androidquery.AQuery;
import com.github.jjobes.slidedatetimepicker.SlidingTabLayout;
import com.mikepenz.aboutlibraries.Libs;
import com.mikepenz.aboutlibraries.entity.Library;
import org.acra.ACRA;
import java.io.File;
import java.util.ArrayList;
import java.util.Calendar;
import static com.pax.ippi.impl.NeptuneUser.getApplicationContext;
/**
* @author gigin.ginanjar
*/
public class DeviceInfoFragment extends Fragment {
public static boolean backEnabled = true;
private static ArrayList<Library> library;
private static int flag;
public Libs libs;
AQuery query;
int battery;
long appSize;
String txtMobileData;
NetworkMonitorDataUsage monitorDU = new NetworkMonitorDataUsage();
private SlidingTabLayout mSlidingTabLayout;
private ViewPager mViewPager;
/**
* @param changeLog
* @param flag
*/
public static void setChangeLog(ArrayList<Library> changeLog, int flag) {
library = new ArrayList<Library>();
library = changeLog;
DeviceInfoFragment.flag = flag;
}
public static long getAvailableInternalMemorySize() {
File path = Environment.getDataDirectory();
StatFs stat = new StatFs(path.getPath());
long blockSize = 0;
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR2) {
blockSize = stat.getBlockSizeLong();
} else {
blockSize = stat.getBlockSize();
}
long availableBlocks = 0;
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR2) {
availableBlocks = stat.getAvailableBlocksLong();
} else {
availableBlocks = stat.getAvailableBlocks();
}
return (availableBlocks * blockSize) / 1048576;
}
public int getBatteryLevel() {
//int level = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, 0);
IntentFilter ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
Intent batteryStatus = getActivity().registerReceiver(null, ifilter);
int level = batteryStatus.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
int scale = batteryStatus.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
// int level = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, 0);
// int plugged = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, 0);
int battery = (level * 100) / scale;
// int level = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, 0);\
return battery;
}
public long getAppSize() {
try {
appSize = new File(getActivity().getPackageManager().getApplicationInfo(getActivity().getPackageName(), 0).publicSourceDir).length();
} catch (NameNotFoundException e) {
ACRA.getErrorReporter().putCustomData("errorNameNotFound", e.getMessage());
ACRA.getErrorReporter().putCustomData("errorNameNotFound", DateFormat.format("yyyy.MM.dd G \'at\' HH:mm:ss z", Calendar.getInstance().getTime()).toString());
ACRA.getErrorReporter().handleSilentException(new Exception("Exception saat set getNameFile"));
e.printStackTrace();
}
return appSize / 1048576;
}
public String getMobileDataUsage() {
String mobileData = Long.toString(monitorDU.getDataThisDay(getContext()) / 1024);
int size = 0;
for (int i = 0; i < mobileData.length(); i++) {
size += 1;
}
if (size <= 3)
txtMobileData = mobileData + " KB";
else if (size > 3 && size <= 6)
txtMobileData = mobileData.substring(0, mobileData.length() - 3) + " MB";
else
txtMobileData = mobileData.substring(0, mobileData.length() - 3) + " GB";
return txtMobileData;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
View view = inflater.inflate(R.layout.new_device_info_tab, container, false);
TextView txtOsVer = (TextView) view.findViewById(R.id.txtOsVer);
TextView txtAppVer = (TextView) view.findViewById((R.id.txtAppVer));
TextView txtBattery = (TextView) view.findViewById((R.id.txtBattery));
// TextView txtDataUsage = (TextView) view.findViewById((R.id.txtDataUsage));
TextView txtMobileDataUsage = (TextView) view.findViewById((R.id.txtMobileDataUsage));
TextView txtMemoryAvailable = (TextView) view.findViewById((R.id.txtMemoryAvailable));
TextView txtAndroidID = (TextView) view.findViewById((R.id.txtAndroidId));
ACRA.getErrorReporter().putCustomData("LAST_CLASS_ACCESSED", getClass().getSimpleName());
txtAppVer.setText(getString(R.string.appVer) + " : " + Global.APP_VERSION);
txtOsVer.setText(getString(R.string.androidVersion) + " : " + Build.VERSION.RELEASE);
txtBattery.setText(getString(R.string.batteryPercen) + " : " + getBatteryLevel() + " %");
// olivia : UPDATE - Application Storage dihilangkan
// txtDataUsage.setText(getString(R.string.appStorage) + " : " + Tool.separateThousand((double) getAppSize())+ " MB");
txtMobileDataUsage.setText(getString(R.string.dataUsage) + " : " + getMobileDataUsage());
txtMemoryAvailable.setText(getString(R.string.deviceStorage) + " : " + Tool.separateThousand(getAvailableInternalMemorySize()) + " MB");
final String android_id;
if(Build.VERSION.SDK_INT > 28){
android_id = Settings.Secure.getString(getContext().getContentResolver(), Settings.Secure.ANDROID_ID);
txtAndroidID.setVisibility(View.VISIBLE);
}else {
android_id = "";
txtAndroidID.setVisibility(View.GONE);
}
txtAndroidID.setText(getString(R.string.androidID)+" : "+android_id);
txtAndroidID.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ClipboardManager clipboard = (ClipboardManager) getContext().getSystemService(Context.CLIPBOARD_SERVICE);
ClipData clip = ClipData.newPlainText("Clip", android_id);
clipboard.setPrimaryClip(clip);
Toast.makeText(getContext(),getString(R.string.copied),Toast.LENGTH_SHORT).show();
}
});
return view;
}
}

View file

@ -0,0 +1,61 @@
package com.adins.mss.base.dynamicform;
import com.adins.mss.dao.TaskD;
import com.adins.mss.dao.TaskH;
import com.adins.mss.foundation.http.MssRequestType;
import com.google.gson.annotations.SerializedName;
import java.util.List;
public class JsonRequestSubmitTask extends MssRequestType {
/**
* Property taskH
*/
@SerializedName("taskH")
TaskH taskH;
/**
* Property taskD
*/
@SerializedName("taskD")
List<TaskD> taskD;
@SerializedName("uuidTaskHNext")
String uuidTaskHNext;
/**
* Gets the taskH
*/
public TaskH getTaskH() {
return this.taskH;
}
/**
* Sets the taskH
*/
public void setTaskH(TaskH value) {
this.taskH = value;
}
/**
* Gets the taskD
*/
public List<TaskD> getTaskD() {
return this.taskD;
}
/**
* Sets the taskD
*/
public void setTaskD(List<TaskD> value) {
this.taskD = value;
}
public String getUuidTaskHNext() {
return uuidTaskHNext;
}
public void setUuidTaskHNext(String uuidTaskHNext) {
this.uuidTaskHNext = uuidTaskHNext;
}
}

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="card_margin">3dp</dimen>
<dimen name="card_shadow">5dp</dimen>
</resources>

View file

@ -0,0 +1,306 @@
<resources>
<string name="app_name">CheckId</string>
<string name="action_settings">Settings</string>
<string name="appVersion">v2.1.0.1</string>
<!-- Left Menu -->
<string name="drawer_open">Open drawer</string>
<string name="drawer_close">close_drawer</string>
<!-- CHECK ORDER -->
<string name="btnLookupCMO">Lookup CMO</string>
<string name="btnLookupCMOMH">Lookup CMO / MH</string>
<string name="lblSearchBy">Search By</string>
<string name="lblStartDate">Start Date</string>
<string name="lblEndDate">End Date</string>
<string name="lblNomorOrder">Nomor Order</string>
<string name="btnSearchOrder">Search</string>
<string name="menu">Main Menu</string>
<string name="cekOrder">Check Order</string>
<string name="btnOpen">Open</string>
<string name="lblSearchByStatus">Status</string>
<string name="btnOk">OK</string>
<string name="taskChanged">Task status has been changed.</string>
<!-- SURVEY VERIFICATION-->
<string name="chooseOne"> Choose One </string>
<string name="workflowByForm"> Workflow by Form</string>
<string name="pleaseChooseOne">Please Select an Action</string>
<string-array name="cbSearchByStatus">
<item>ALL</item>
<item>On Survey</item>
<item>On CA</item>
</string-array>
<string-array name="cbUpdateOrder">
<item>Open Order</item>
<item>Cancel Order</item>
</string-array>
<string-array name="cbOrderReassign">
<item>Date</item>
<!-- <item >Nomor Order</item> -->
</string-array>
<string-array name="cbSearchBy">
<item>Date</item>
<item>Month</item>
<item>Estimation Days</item>
</string-array>
<string-array name="cbSearchByMonth">
<item>January</item>
<item>February</item>
<item>March</item>
<item>April</item>
<item>May</item>
<item>June</item>
<item>July</item>
<item>August</item>
<item>September</item>
<item>October</item>
<item>November</item>
<item>December</item>
</string-array>
<!-- Main Menu -->
<!-- Main Menu -->
<string name="title_mn_home">Home</string>
<string name="title_mn_tasklist">TASK LIST</string>
<string name="title_mn_log">LOG</string>
<string name="title_mn_reportsummary">Report Summary</string>
<string name="title_mn_depositreport">Deposit Report</string>
<string name="title_mn_absentin">ATTENDANCE IN</string>
<string name="title_mn_synchronize">SYNCHRONIZE</string>
<string name="title_mn_about">ABOUT</string>
<string name="title_mn_exit">EXIT</string>
<string name="title_mn_newtask">NEW TASK</string>
<string name="title_mn_surveyperformance">SURVEY PERFORMANCE</string>
<string name="title_mn_surveyverification">SURVEY VERIFICATION</string>
<string name="title_mn_surveyapproval">SURVEY APPROVAL</string>
<string name="title_mn_checkorder">Check Order</string>
<string name="title_mn_creditsimulation">Credit Simulation</string>
<string name="title_mn_news">News</string>
<string name="title_mn_promo">Promo</string>
<string name="title_mn_orderassign">Order Assignment</string>
<string name="title_mn_orderreassign">Order Re-Assignment</string>
<string name="title_mn_cancelorder">Cancel Order</string>
<string name="title_mn_surveyassign">SURVEY ASSIGNMENT</string>
<string name="title_mn_surveyreassign">SURVEY RE-ASSIGNMENT</string>
<string name="title_mn_verification_bybranch">VERIFICATION BY BRANCH</string>
<string name="title_mn_approval_bybranch">APPROVAL BY BRANCH</string>
<string name="title_mn_changepassword">CHANGE PASSWORD</string>
<string name="title_mn_paymenthistory">Payment History</string>
<string name="title_mn_installmentschedule">Installment Schedule</string>
<string name="title_mn_absentout">Check Out</string>
<string name="title_mn_setting">Settings</string>
<string name="login_desc">Login to CheckId Application</string>
<string name="text_gps">GPS</string>
<string name="filter_by">Filter By</string>
<string name="news_not_found">News not found</string>
<string name="nama_customer">Nama Customer</string>
<string name="form_name">Form Name</string>
<string name="toast_crash">Ooooops ! MSSSVY crashed, but a report has been sent to my developer to help fix the issue !</string>
<!-- <string name="progressWait">Please wait...</string> -->
<!-- <string name="msgUnavaibleLocationCheckIn">Unable get location to check in</string> -->
<!-- <string name="msgUnavaibleLocationCheckOut">Unable get location to check out</string> -->
<string name="title_activity_survey_verification_action">Survey Verification</string>
<string name="hello_world">Hello world!</string>
<string name="selectOne">Select One</string>
<string name="reject_failed">Rejection Task Failed</string>
<string name="reject_success">Task Rejected</string>
<string name="approve_failed">Approval Task Failed</string>
<string name="approve_success">Task Approved</string>
<string name="get_suggestion_user">Getting Suggestion User...</string>
<string name="title_activity_developer_option">Dev Options</string>
<string name="changelog_v230"><![CDATA[Changes: <br/>
1. Support Multilingual <br/>
2. Update compatibility for Android M <br/>
3. Support refresh location by tap GPS Icon <br/>
4. Increase performance <br/>
5. Decrease memory usage <br/>
6. Add cirle radius in map viewer if accuracy available <br/>
7. Loading not relevant Questions automatically <br/>
8. Support Copy value from other questions <br/>
9. Support advanced question validation <br/>
10. Minor Bug fixes]]></string>
<string name="action_not_available">Action not available</string>
<string name="changelog_v2310"><![CDATA[Changes: <br/>
1. Support copy value with condition]]></string>
<string name="changelog_v2320"><![CDATA[Changes: <br/>
1. Fixing profile and cover image if exit
]]></string>
<string name="changelog_v200"><![CDATA[Changes: <br/>
1. Add support for Timeline Task <br/>
2. Add support for navigation menu]]></string>
<string name="changelog_v210"><![CDATA[Changes: <br/>
1. Add Support for Survey Approval<br/>
2. Add Support for Survey Verification]]></string>
<string name="changelog_v220"><![CDATA[Changes: <br/>
1. Add Support for Survey Approval By Branch<br/>
2. Add Support for Survey Verification By Branch<br/>
3. Add Support for Reschedule Survey]]></string>
<string name="changelog_v2330"><![CDATA[Changes: <br/>
1. Fixing Synchronize<br/>
2. Fixing Timeline for Attendance<br/>
3. Fixing load question answer<br/>
4. Add check root device]]></string>
<string name="changelog_v2340"><![CDATA[Changes: <br/>
1. Aplhanumeric Password requirement]]></string>
<string name="changelog_v2350"><![CDATA[Changes: <br/>
1. Minor Bug Fixes<br/>
2. Removing Inactive Form]]></string>
<string name="changelog_v2360"><![CDATA[Changes: <br/>
1. Minor Bug Fixes]]></string>
<string name="changelog_v2370"><![CDATA[Changes: <br/>
1. Minor Bug Fixes
2. Fixing GPS issues]]></string>
<string name="changelog_v2380"><![CDATA[Changes: <br/>
1. Minor Bug Fixes]]></string>
<string name="changelog_v2390"><![CDATA[Changes: <br/>
1. Minor Bug Fixes]]></string>
<string name="changelog_v23100"><![CDATA[Changes: <br/>
1. Minor Bug Fixes]]></string>
<string name="changelog_v23110"><![CDATA[Changes: <br/>
1. Minor Bug Fixes]]></string>
<string name="changelog_v23120"><![CDATA[Changes: <br/>
1. Minor Bug Fixes]]></string>
<string name="changelog_v23130"><![CDATA[Changes: <br/>
1. Minor Bug Fixes]]></string>
<string name="changelog_v23140"><![CDATA[Changes: <br/>
1. Minor Bug Fixes]]></string>
<string name="changelog_v23150"><![CDATA[Changes: <br/>
1. Minor Bug Fixes]]></string>
<string name="changelog_v23160"><![CDATA[Changes: <br/>
1. Minor Bug Fixes]]></string>
<string name="changelog_v23170"><![CDATA[Changes: <br/>
1. Minor Bug Fixes]]></string>
<string name="changelog_v23180"><![CDATA[Changes: <br/>
1. Minor Bug Fixes]]></string>
<string name="changelog_v23190"><![CDATA[Changes: <br/>
1. Minor Bug Fixes]]></string>
<string name="changelog_v2400"><![CDATA[Changes: <br/>
1. Add device information at about<br/>
2. Support online lookup<br/>
3. Task list view : box or list]]></string>
<string name="changelog_v2500"><![CDATA[Changes: <br/>
1. New user interface<br/>
2. Add file synchronize<br/>
3. Minor bug fixes]]></string>
<string name="changelog_v3000"><![CDATA[Changes: <br/>
1. More readable messages and information<br/>
2. Support push themes<br/>
3. Support round profile picture<br/>
4. Add image timestamp<br/>
5. Minor bug fixes]]></string>
<string name="changelog_v3001"><![CDATA[Changes: <br/>
1. Add toggle password visibiliy in Change Password popup<br/>
2. Change connection timeout message<br/>
3. Fix bug Fake GPS Deactivation dialog does not showing up when using mock up location<br/>
4. Fix bug warning message for user inactive<br/>
5. Add Database Migration from Version 2.5 to 3.<br/>
6. Fix bug task header missing after save draft<br/>
7. Fix bug dropdown search type in Survey Performance page]]></string>
<string name="changelog_v3002"><![CDATA[Changes: <br/>
1. Fix Search Timeline Uploading Task option not showing up although there are tasks that have uploading status.<br/>
2. Fix bug not all options appear in radio button question dynamic form.<br/>
3. Fix bug Fake GPS Deactivation dialog does not showing up when using mock up location.<br/>
4. Fix bug developer option at top right not showing up.<br/>
5. Fix bug task answers are disappeared when start doing task from draft after change user.<br/>
6. Add regex checking for customer name input.]]></string>
<string name="changelog_v3003"><![CDATA[Changes: <br/>
1. Perbaikan google play service update bisa diabaikan.<br/>
2. Penambahan submit lokasi untuk reschedule task.<br/>
3. Perbaikan task list tidak update.<br/>
4. Perbaikan notifikasi uploading.<br/>
5. Set default bulan berjalan di survey performance.<br/>
6. Perbaikan log online.<br/>
7. Penambahan notification channel untuk foreground service notification.<br/>
8. Perbaikan pertanyaan tipe option dan multiple memiliki duplikasi jawaban.<br/>
9. Perbaikan pertanyaan option choice filter tidak tampil.<br/>
10.Penjagaan format datetime dengan panjang lebih dari 14 karakter pada DateTimePicker.<br/>
11.Perbaikan crash saat submit task manual menggunakan long click.]]></string>
<string name="changelog_v3004"><![CDATA[Changes: <br/>
1. Fix push theme.<br/>
2. Show application running notification.<br/>
3. Fix crash when open task list.<br/>
4. Fix task filter feature.<br/>
5. Fix minor bugs.]]></string>
<string name="changelog_v3005"><![CDATA[Changes: <br/>
1. Penambahan pengecekan dan update status task survey approval atau verification sesuai data di server.<br/>
2. Fix minor bugs.]]></string>
<string name="changelog_v3006"><![CDATA[Changes: <br/>
1. Perbaikan fragment overlapped.<br/>
3. Perbaikan sync question set.<br/>
4. Perbaikan filter status pending tidak ada hasil.]]></string>
<string name="changelog_v3007"><![CDATA[Changes: <br/>
1. Perbaikan add taskd untuk log online.<br/>
2. Perbaikan bug di viewholder.<br/>
3. Perbaikan answer location, brand, dan model task approval tidak tampil pada halaman review.<br/>
4. Menseragamkan format request submit task melalui force send, auto send, dan send biasa.<br/>
5. Perbaikan bug timeline task header tertukar ketika diklik.<br/>
6. Perbaikan minor bug.]]></string>
<string name="changelog_v3008"><![CDATA[Changes: <br/>
1. Perbaikan minor bug.]]></string>
<string name="changelog_v3009"><![CDATA[Changes: <br/>
1. Add bypass developer mode feature.<br/>
2. Fix timeline when upgrading from 2.5 to 3.0 version.<br/>
3. Fix crash handle question with choice filter.<br/>
4. Fix minor bug.]]></string>
<string name="changelog_v30013"><![CDATA[Changes: <br/>
1. Add support location service in Android >= O.<br/>
2. Add support location service for oppo, vivo and xiaomi devices.<br/>
3. Fix notification new task in Android >= O.<br/>
4. Fix image printing on Android >= O.<br/>
5. Fix minor bug.]]></string>
<string name="changelog_v30017"><![CDATA[Changes: <br/>
1. Add support 64bit architecture.<br/>
2. Fix delete task from Timeline.<br/>
3. Fix duplicate customer name on view map.<br/>
4. Fix upgrade database from v2.5 to v3.0<br/>
5. Remove audio permission.<br/>
6. Minor bug fixes.]]></string>
<string name="changelog_v30032"><![CDATA[Changes: <br/>
1. Fix bug crash ketika buka Timeline setelah check in Attendance]]></string>
<string name="changelog_v3110"><![CDATA[Changes: <br/>
1. Add FailedDraft status on TaskH when there is specific response code is received from server .<br/>
2. Fix bug SPV shouldn\'t hit openreadtask on verification and approval .<br/>
3. Add user help .<br/>
4. Fix take picture failed on android 10 .<br/>
5. App slow on Login-Logout-Login .<br/>
6. Enhancement for answer type LuOnline.<br/>
7. Fix bug uploading task on timeline not showing.<br/>
8. Add support for Android 10
]]></string>
<string name="changelog_v3120">
<![CDATA[ Changes: <br/>
1. Fix bug Cloud CSV can\'t be imported .<br/>
2. Fix bug application running service stopped caused by close application .<br/>
3. Fix synchronize crash .<br/>
4. Fix crash when is_tracking off . ]]>
</string>
<string name="changelog_v3130">
<![CDATA[ Changes: <br/>
1. Fix user help issues.<br/>
2. Add call customer phone number action at customer form.<br/>
3. Fix validation not working at form because of regex.<br/>
4. Add Failed Draft and Save Draft status at SPV timeline.<br/>
5. Add save button at survey verification form.<br/>
6. Add sample text at user help with dynamic data.<br/>
7.Fix crash on verification because tasks are not fully synchronized.<br/>
8.Add error handler for workflow by form at survey verification page.<br/>
]]>
</string>
<string name="changelog_v3140">
<![CDATA[ Changes: <br/>
1. Refactor some codes.<br/>
2. Fix some bugs.<br/>]]>
</string>
<string name="changelog_v3201">
<![CDATA[ Changes: <br/>
1. Add Term and Condition.<br/>]]>
</string>
<string name="changelog_v3202"><![CDATA[ Changes: <br/>
1. Add Privacy and Policy.<br/>]]></string>
</resources>

View file

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape>
<solid
android:color="@color/gradient_start" />
<stroke
android:width="2dp"
android:color="@android:color/transparent" />
<corners
android:radius="10dp" />
<padding
android:left="10dp"
android:top="10dp"
android:right="10dp"
android:bottom="10dp" />
</shape>
</item>
<item>
<shape>
<gradient
android:startColor="@color/gradient_end"
android:endColor="@color/gradient_end"
android:angle="270" />
<stroke
android:width="2dp"
android:color="@android:color/transparent" />
<corners
android:radius="10dp" />
<padding
android:left="10dp"
android:top="10dp"
android:right="10dp"
android:bottom="10dp" />
</shape>
</item>
</selector>

View file

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.adins.mss.foundation.camera2.AutoFitTextureView
android:id="@+id/texture"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true" />
<include layout="@layout/item_camera_mode"
android:id="@+id/item_camera_mode"
android:layout_width="wrap_content"
android:layout_height="110dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:visibility="gone"
android:layout_alignParentStart="true" />
<include layout="@layout/item_review_mode"
android:id="@+id/item_review_mode"
android:layout_width="wrap_content"
android:visibility="gone"
android:layout_height="110dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<include layout="@layout/item_camera_auto_focus"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/item_camera_auto_focus"
/>
</RelativeLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View file

@ -0,0 +1,130 @@
package com.adins.mss.odr.other;
/**
* Created by winy.firdasari on 04/02/2015.
*/
import java.util.ArrayList;
import com.adins.mss.odr.R;
import com.adins.mss.odr.R.id;
import com.adins.mss.odr.R.layout;
import android.app.Activity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.BaseExpandableListAdapter;
import android.widget.CheckedTextView;
import android.widget.TextView;
import android.widget.Toast;
@SuppressWarnings("unchecked")
public class MyExpandableAdapter extends BaseExpandableListAdapter {
private Activity activity;
private ArrayList<Object> childtems;
private LayoutInflater inflater;
private ArrayList<String> parentItems, child;
public MyExpandableAdapter(ArrayList<String> parents, ArrayList<Object> childern) {
this.parentItems = parents;
this.childtems = childern;
}
public void setInflater(LayoutInflater inflater, Activity activity) {
this.inflater = inflater;
this.activity = activity;
}
@Override
public View getChildView(int groupPosition, final int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {
child = (ArrayList<String>) childtems.get(groupPosition);
TextView textView = null;
if (convertView == null) {
convertView = inflater.inflate(R.layout.child_view, null);
}
textView = (TextView) convertView.findViewById(R.id.textView1);
textView.setText(child.get(childPosition));
convertView.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
Toast.makeText(activity, child.get(childPosition),
Toast.LENGTH_SHORT).show();
}
});
return convertView;
}
@Override
public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {
if (convertView == null) {
convertView = inflater.inflate(R.layout.parent_view, null);
}
((CheckedTextView) convertView).setText(parentItems.get(groupPosition));
((CheckedTextView) convertView).setChecked(isExpanded);
return convertView;
}
@Override
public Object getChild(int groupPosition, int childPosition) {
return null;
}
@Override
public long getChildId(int groupPosition, int childPosition) {
return 0;
}
@Override
public int getChildrenCount(int groupPosition) {
return ((ArrayList<String>) childtems.get(groupPosition)).size();
}
@Override
public Object getGroup(int groupPosition) {
return null;
}
@Override
public int getGroupCount() {
return parentItems.size();
}
@Override
public void onGroupCollapsed(int groupPosition) {
super.onGroupCollapsed(groupPosition);
}
@Override
public void onGroupExpanded(int groupPosition) {
super.onGroupExpanded(groupPosition);
}
@Override
public long getGroupId(int groupPosition) {
return 0;
}
@Override
public boolean hasStableIds() {
return false;
}
@Override
public boolean isChildSelectable(int groupPosition, int childPosition) {
return false;
}
}

View file

@ -0,0 +1,453 @@
package com.adins.mss.dao;
import com.adins.mss.dao.DaoSession;
import de.greenrobot.dao.DaoException;
import com.adins.mss.base.util.ExcludeFromGson;
import com.google.gson.annotations.SerializedName;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit.
/**
* Entity mapped to table "TR_TASK_D".
*/
public class TaskD {
/** Not-null value. */
@SerializedName("uuid_task_d")
private String uuid_task_d;
@SerializedName("question_group_id")
private String question_group_id;
@SerializedName("question_id")
private String question_id;
@SerializedName("option_answer_id")
private String option_answer_id;
@SerializedName("text_answer")
private String text_answer;
@SerializedName("image")
private byte[] image;
@SerializedName("is_final")
private String is_final;
@SerializedName("is_sent")
private String is_sent;
@SerializedName("lov")
private String lov;
@SerializedName("usr_crt")
private String usr_crt;
@SerializedName("dtm_crt")
private java.util.Date dtm_crt;
@SerializedName("uuid_task_h")
private String uuid_task_h;
@SerializedName("question_label")
private String question_label;
@SerializedName("latitude")
private String latitude;
@SerializedName("longitude")
private String longitude;
@SerializedName("mcc")
private String mcc;
@SerializedName("mnc")
private String mnc;
@SerializedName("lac")
private String lac;
@SerializedName("cid")
private String cid;
@SerializedName("gps_time")
private java.util.Date gps_time;
@SerializedName("accuracy")
private Integer accuracy;
@SerializedName("regex")
private String regex;
@SerializedName("is_readonly")
private String is_readonly;
@ExcludeFromGson
@SerializedName("location_image")
private byte[] location_image;
@SerializedName("is_visible")
private String is_visible;
@SerializedName("uuid_lookup")
private String uuid_lookup;
@SerializedName("tag")
private String tag;
@SerializedName("count")
private String count;
@SerializedName("image_timestamp")
private java.util.Date image_timestamp;
@SerializedName("data_dukcapil")
private String data_dukcapil;
/** Used to resolve relations */
private transient DaoSession daoSession;
/** Used for active entity operations. */
private transient TaskDDao myDao;
private TaskH taskH;
private String taskH__resolvedKey;
private Lookup lookup;
private String lookup__resolvedKey;
public TaskD() {
}
public TaskD(String uuid_task_d) {
this.uuid_task_d = uuid_task_d;
}
public TaskD(String uuid_task_d, String question_group_id, String question_id, String option_answer_id, String text_answer, byte[] image, String is_final, String is_sent, String lov, String usr_crt, java.util.Date dtm_crt, String uuid_task_h, String question_label, String latitude, String longitude, String mcc, String mnc, String lac, String cid, java.util.Date gps_time, Integer accuracy, String regex, String is_readonly, byte[] location_image, String is_visible, String uuid_lookup, String tag, String count, java.util.Date image_timestamp, String data_dukcapil) {
this.uuid_task_d = uuid_task_d;
this.question_group_id = question_group_id;
this.question_id = question_id;
this.option_answer_id = option_answer_id;
this.text_answer = text_answer;
this.image = image;
this.is_final = is_final;
this.is_sent = is_sent;
this.lov = lov;
this.usr_crt = usr_crt;
this.dtm_crt = dtm_crt;
this.uuid_task_h = uuid_task_h;
this.question_label = question_label;
this.latitude = latitude;
this.longitude = longitude;
this.mcc = mcc;
this.mnc = mnc;
this.lac = lac;
this.cid = cid;
this.gps_time = gps_time;
this.accuracy = accuracy;
this.regex = regex;
this.is_readonly = is_readonly;
this.location_image = location_image;
this.is_visible = is_visible;
this.uuid_lookup = uuid_lookup;
this.tag = tag;
this.count = count;
this.image_timestamp = image_timestamp;
this.data_dukcapil = data_dukcapil;
}
/** called by internal mechanisms, do not call yourself. */
public void __setDaoSession(DaoSession daoSession) {
this.daoSession = daoSession;
myDao = daoSession != null ? daoSession.getTaskDDao() : null;
}
/** Not-null value. */
public String getUuid_task_d() {
return uuid_task_d;
}
/** Not-null value; ensure this value is available before it is saved to the database. */
public void setUuid_task_d(String uuid_task_d) {
this.uuid_task_d = uuid_task_d;
}
public String getQuestion_group_id() {
return question_group_id;
}
public void setQuestion_group_id(String question_group_id) {
this.question_group_id = question_group_id;
}
public String getQuestion_id() {
return question_id;
}
public void setQuestion_id(String question_id) {
this.question_id = question_id;
}
public String getOption_answer_id() {
return option_answer_id;
}
public void setOption_answer_id(String option_answer_id) {
this.option_answer_id = option_answer_id;
}
public String getText_answer() {
return text_answer;
}
public void setText_answer(String text_answer) {
this.text_answer = text_answer;
}
public byte[] getImage() {
return image;
}
public void setImage(byte[] image) {
this.image = image;
}
public String getIs_final() {
return is_final;
}
public void setIs_final(String is_final) {
this.is_final = is_final;
}
public String getIs_sent() {
return is_sent;
}
public void setIs_sent(String is_sent) {
this.is_sent = is_sent;
}
public String getLov() {
return lov;
}
public void setLov(String lov) {
this.lov = lov;
}
public String getUsr_crt() {
return usr_crt;
}
public void setUsr_crt(String usr_crt) {
this.usr_crt = usr_crt;
}
public java.util.Date getDtm_crt() {
return dtm_crt;
}
public void setDtm_crt(java.util.Date dtm_crt) {
this.dtm_crt = dtm_crt;
}
public String getUuid_task_h() {
return uuid_task_h;
}
public void setUuid_task_h(String uuid_task_h) {
this.uuid_task_h = uuid_task_h;
}
public String getQuestion_label() {
return question_label;
}
public void setQuestion_label(String question_label) {
this.question_label = question_label;
}
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getMcc() {
return mcc;
}
public void setMcc(String mcc) {
this.mcc = mcc;
}
public String getMnc() {
return mnc;
}
public void setMnc(String mnc) {
this.mnc = mnc;
}
public String getLac() {
return lac;
}
public void setLac(String lac) {
this.lac = lac;
}
public String getCid() {
return cid;
}
public void setCid(String cid) {
this.cid = cid;
}
public java.util.Date getGps_time() {
return gps_time;
}
public void setGps_time(java.util.Date gps_time) {
this.gps_time = gps_time;
}
public Integer getAccuracy() {
return accuracy;
}
public void setAccuracy(Integer accuracy) {
this.accuracy = accuracy;
}
public String getRegex() {
return regex;
}
public void setRegex(String regex) {
this.regex = regex;
}
public String getIs_readonly() {
return is_readonly;
}
public void setIs_readonly(String is_readonly) {
this.is_readonly = is_readonly;
}
public byte[] getLocation_image() {
return location_image;
}
public void setLocation_image(byte[] location_image) {
this.location_image = location_image;
}
public String getIs_visible() {
return is_visible;
}
public void setIs_visible(String is_visible) {
this.is_visible = is_visible;
}
public String getUuid_lookup() {
return uuid_lookup;
}
public void setUuid_lookup(String uuid_lookup) {
this.uuid_lookup = uuid_lookup;
}
public String getTag() {
return tag;
}
public void setTag(String tag) {
this.tag = tag;
}
public String getCount() {
return count;
}
public void setCount(String count) {
this.count = count;
}
public java.util.Date getImage_timestamp() {
return image_timestamp;
}
public void setImage_timestamp(java.util.Date image_timestamp) {
this.image_timestamp = image_timestamp;
}
public String getData_dukcapil() {
return data_dukcapil;
}
public void setData_dukcapil(String data_dukcapil) {
this.data_dukcapil = data_dukcapil;
}
/** To-one relationship, resolved on first access. */
public TaskH getTaskH() {
String __key = this.uuid_task_h;
if (taskH__resolvedKey == null || taskH__resolvedKey != __key) {
if (daoSession == null) {
throw new DaoException("Entity is detached from DAO context");
}
TaskHDao targetDao = daoSession.getTaskHDao();
TaskH taskHNew = targetDao.load(__key);
synchronized (this) {
taskH = taskHNew;
taskH__resolvedKey = __key;
}
}
return taskH;
}
public void setTaskH(TaskH taskH) {
synchronized (this) {
this.taskH = taskH;
uuid_task_h = taskH == null ? null : taskH.getUuid_task_h();
taskH__resolvedKey = uuid_task_h;
}
}
/** To-one relationship, resolved on first access. */
public Lookup getLookup() {
String __key = this.uuid_lookup;
if (lookup__resolvedKey == null || lookup__resolvedKey != __key) {
if (daoSession == null) {
throw new DaoException("Entity is detached from DAO context");
}
LookupDao targetDao = daoSession.getLookupDao();
Lookup lookupNew = targetDao.load(__key);
synchronized (this) {
lookup = lookupNew;
lookup__resolvedKey = __key;
}
}
return lookup;
}
public void setLookup(Lookup lookup) {
synchronized (this) {
this.lookup = lookup;
uuid_lookup = lookup == null ? null : lookup.getUuid_lookup();
lookup__resolvedKey = uuid_lookup;
}
}
/** Convenient call for {@link AbstractDao#delete(Object)}. Entity must attached to an entity context. */
public void delete() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.delete(this);
}
/** Convenient call for {@link AbstractDao#update(Object)}. Entity must attached to an entity context. */
public void update() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.update(this);
}
/** Convenient call for {@link AbstractDao#refresh(Object)}. Entity must attached to an entity context. */
public void refresh() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.refresh(this);
}
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,92 @@
package com.adins.mss.dao;
import com.adins.mss.base.util.ExcludeFromGson;
import com.google.gson.annotations.SerializedName;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit.
/**
* Entity mapped to table "MS_SYNC".
*/
public class Sync {
/** Not-null value. */
@SerializedName("uuid_sync")
private String uuid_sync;
@SerializedName("tabel_name")
private String tabel_name;
@SerializedName("lov_group")
private String lov_group;
@SerializedName("dtm_upd")
private java.util.Date dtm_upd;
@SerializedName("flag")
private Integer flag;
@SerializedName("flag_hardsync")
private String flag_hardsync;
public Sync() {
}
public Sync(String uuid_sync) {
this.uuid_sync = uuid_sync;
}
public Sync(String uuid_sync, String tabel_name, String lov_group, java.util.Date dtm_upd, Integer flag, String flag_hardsync) {
this.uuid_sync = uuid_sync;
this.tabel_name = tabel_name;
this.lov_group = lov_group;
this.dtm_upd = dtm_upd;
this.flag = flag;
this.flag_hardsync = flag_hardsync;
}
/** Not-null value. */
public String getUuid_sync() {
return uuid_sync;
}
/** Not-null value; ensure this value is available before it is saved to the database. */
public void setUuid_sync(String uuid_sync) {
this.uuid_sync = uuid_sync;
}
public String getTabel_name() {
return tabel_name;
}
public void setTabel_name(String tabel_name) {
this.tabel_name = tabel_name;
}
public String getLov_group() {
return lov_group;
}
public void setLov_group(String lov_group) {
this.lov_group = lov_group;
}
public java.util.Date getDtm_upd() {
return dtm_upd;
}
public void setDtm_upd(java.util.Date dtm_upd) {
this.dtm_upd = dtm_upd;
}
public Integer getFlag() {
return flag;
}
public void setFlag(Integer flag) {
this.flag = flag;
}
public String getFlag_hardsync() {
return flag_hardsync;
}
public void setFlag_hardsync(String flag_hardsync) {
this.flag_hardsync = flag_hardsync;
}
}