Commit f76d4160 authored by Gandha Ryanto's avatar Gandha Ryanto

Initial commit

parents
*.iml
.gradle
/local.properties
/.idea/caches/build_file_checksums.ser
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
.DS_Store
/build
/captures
.externalNativeBuild
unik-update-balance-lib/.idea/
unik-update-balance-lib/build/
brizzi-debug/build/
PayLib-release-1.4.17/build/
mybanklibrary/.cxx/
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<option name="RIGHT_MARGIN" value="215" />
<codeStyleSettings language="XML">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
<arrangement>
<rules>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:android</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:id</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>style</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>ANDROID_ATTRIBUTE_ORDER</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>.*</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
</rules>
</arrangement>
</codeStyleSettings>
</code_scheme>
</component>
\ No newline at end of file
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true" />
</annotationProcessing>
<bytecodeTargetLevel target="11" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="PLATFORM" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/PayLib-release-1.4.43" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
<remote-repository>
<option name="id" value="Google" />
<option name="name" value="Google" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven" />
<option name="name" value="maven" />
<option name="url" value="http://mobile-repo.mdd.co.id:8081/artifactory/libs-release-local/" />
</remote-repository>
<remote-repository>
<option name="id" value="C:\Users\ITDEV\AppData\Local\Android\Sdk\extras\m2repository" />
<option name="name" value="C:\Users\ITDEV\AppData\Local\Android\Sdk\extras\m2repository" />
<option name="url" value="file:/$USER_HOME$/AppData/Local/Android/Sdk/extras/m2repository" />
</remote-repository>
<remote-repository>
<option name="id" value="C:\Users\ITDEV\AppData\Local\Android\Sdk\extras\android\m2repository" />
<option name="name" value="C:\Users\ITDEV\AppData\Local\Android\Sdk\extras\android\m2repository" />
<option name="url" value="file:/$USER_HOME$/AppData/Local/Android/Sdk/extras/android/m2repository" />
</remote-repository>
<remote-repository>
<option name="id" value="C:\Users\ITDEV\AppData\Local\Android\Sdk\extras\google\m2repository" />
<option name="name" value="C:\Users\ITDEV\AppData\Local\Android\Sdk\extras\google\m2repository" />
<option name="url" value="file:/$USER_HOME$/AppData/Local/Android/Sdk/extras/google/m2repository" />
</remote-repository>
<remote-repository>
<option name="id" value="maven2" />
<option name="name" value="maven2" />
<option name="url" value="http://mobile-repo.mdd.co.id:8081/artifactory/android-libs/" />
</remote-repository>
<remote-repository>
<option name="id" value="$USER_HOME$/Android/Sdk/extras/google/m2repository" />
<option name="name" value="$USER_HOME$/Android/Sdk/extras/google/m2repository" />
<option name="url" value="file:$USER_HOME$/Android/Sdk/extras/google/m2repository" />
</remote-repository>
<remote-repository>
<option name="id" value="$USER_HOME$/Android/Sdk/extras/android/m2repository" />
<option name="name" value="$USER_HOME$/Android/Sdk/extras/android/m2repository" />
<option name="url" value="file:$USER_HOME$/Android/Sdk/extras/android/m2repository" />
</remote-repository>
<remote-repository>
<option name="id" value="$USER_HOME$/Android/Sdk/extras/m2repository" />
<option name="name" value="$USER_HOME$/Android/Sdk/extras/m2repository" />
<option name="url" value="file:$USER_HOME$/Android/Sdk/extras/m2repository" />
</remote-repository>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="org.jetbrains.annotations.Nullable" />
<option name="myDefaultNotNull" value="androidx.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="15">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
<item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="4" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
<item index="6" class="java.lang.String" itemvalue="android.annotation.Nullable" />
<item index="7" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" />
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.Nullable" />
<item index="9" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableDecl" />
<item index="10" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableType" />
<item index="11" class="java.lang.String" itemvalue="com.android.annotations.Nullable" />
<item index="12" class="java.lang.String" itemvalue="org.eclipse.jdt.annotation.Nullable" />
<item index="13" class="java.lang.String" itemvalue="io.reactivex.annotations.Nullable" />
<item index="14" class="java.lang.String" itemvalue="io.reactivex.rxjava3.annotations.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="14">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
<item index="4" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
<item index="5" class="java.lang.String" itemvalue="android.annotation.NonNull" />
<item index="6" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" />
<item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.NonNull" />
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullDecl" />
<item index="9" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullType" />
<item index="10" class="java.lang.String" itemvalue="com.android.annotations.NonNull" />
<item index="11" class="java.lang.String" itemvalue="org.eclipse.jdt.annotation.NonNull" />
<item index="12" class="java.lang.String" itemvalue="io.reactivex.annotations.NonNull" />
<item index="13" class="java.lang.String" itemvalue="io.reactivex.rxjava3.annotations.NonNull" />
</list>
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
</set>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
configurations.maybeCreate("default")
artifacts.add("default", file('PayLib-release-1.4.43.aar'))
\ No newline at end of file
apply plugin: 'com.android.library'
apply plugin: 'com.jfrog.artifactory'
apply plugin: 'maven-publish'
android {
compileSdkVersion 30
defaultConfig {
minSdkVersion 15
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'io.reactivex.rxjava2:rxjava:2.2.19'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
// implementation project(path: ':unik-update-balance-lib')
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
compileOnly 'org.projectlombok:lombok:1.18.12'
annotationProcessor 'org.projectlombok:lombok:1.18.12'
}
//region publish to repo
def libraryGroupId = 'com.mdd.payment'
def libraryArtifactId = 'aar-deviceid-release'
def libraryVersion = '2.0.7'
publishing {
publications {
aar(MavenPublication) {
groupId libraryGroupId
version libraryVersion
artifactId libraryArtifactId
artifact("$buildDir/outputs/aar/${artifactId}.aar")
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
//Iterate over the compile dependencies (we don't want the test ones), adding a <dependency> node for each
configurations.implementation.allDependencies.each {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
}
//task copyLibs(type: Copy) {
// from configurations.customConfig
// into 'libs'
//}
artifactory {
contextUrl = artifactory_url
publish {
repository {
repoKey = "android-libs"
username = "admin"
password = "Mddcoid*123#"
}
defaults {
publications('aar')
publishArtifacts = true
properties = ['qa.level': 'basic', 'q.os': 'android', 'dev.team': 'core']
publishPom = true
}
}
}
//enderegion
\ No newline at end of file
aux
Aux
aUx
AUx
auX
AuX
aUX
AUX
AUX
con
Con
cOn
COn
coN
CoN
cON
CON
CON
nul
Nul
nUl
NUl
nuL
NuL
nUL
NUL
NUL
prn
Prn
pRn
PRn
prN
PrN
pRN
PRN
PRN
com1
Com1
cOm1
COm1
coM1
CoM1
cOM1
COM1
COM1
com2
Com2
cOm2
COm2
coM2
CoM2
cOM2
COM2
COM2
com3
Com3
cOm3
COm3
coM3
CoM3
cOM3
COM3
COM3
com4
Com4
cOm4
COm4
coM4
CoM4
cOM4
COM4
COM4
com5
Com5
cOm5
COm5
coM5
CoM5
cOM5
COM5
COM5
com6
Com6
cOm6
COm6
coM6
CoM6
cOM6
COM6
COM6
com7
Com7
cOm7
COm7
coM7
CoM7
cOM7
COM7
COM7
com8
Com8
cOm8
COm8
coM8
CoM8
cOM8
COM8
COM8
com9
Com9
cOm9
COm9
coM9
CoM9
cOM9
COM9
COM9
lpt1
Lpt1
lPt1
LPt1
lpT1
LpT1
lPT1
LPT1
LPT1
lpt2
Lpt2
lPt2
LPt2
lpT2
LpT2
lPT2
LPT2
LPT2
lpt3
Lpt3
lPt3
LPt3
lpT3
LpT3
lPT3
LPT3
LPT3
lpt4
Lpt4
lPt4
LPt4
lpT4
LpT4
lPT4
LPT4
LPT4
lpt5
Lpt5
lPt5
LPt5
lpT5
LpT5
lPT5
LPT5
LPT5
lpt6
Lpt6
lPt6
LPt6
lpT6
LpT6
lPT6
LPT6
LPT6
lpt7
Lpt7
lPt7
LPt7
lpT7
LpT7
lPT7
LPT7
LPT7
lpt8
Lpt8
lPt8
LPt8
lpT8
LpT8
lPT8
LPT8
LPT8
lpt9
Lpt9
lPt9
LPt9
lpT9
LpT9
lPT9
LPT9
LPT9
\ No newline at end of file
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-obfuscationdictionary dictionary.txt
-classobfuscationdictionary dictionary.txt
-packageobfuscationdictionary dictionary.txt
-optimizationpasses 5
-keepattributes InnerClasses
# Retrofit 2.X
## https://square.github.io/retrofit/ ##
-dontwarn retrofit2.**
-keep class retrofit2.** { *; }
-keepattributes Signature
-keepattributes Exceptions
-keepclasseswithmembers class * {
@retrofit2.http.* <methods>;
}
# RxJava 0.21
-keep class rx.schedulers.Schedulers {
public static <methods>;
}
-keep class rx.schedulers.ImmediateScheduler {
public <methods>;
}
-keep class rx.schedulers.TestScheduler {
public <methods>;
}
-keep class rx.schedulers.Schedulers {
public static ** test();
}
-keep class com.mdd.aar.deviceid.RegisterCallback
-keepclassmembers class com.mdd.aar.deviceid.RegisterCallback {
public <methods>;
}
-keep class com.mdd.aar.deviceid.UnlockAarCallback
-keepclassmembers class com.mdd.aar.deviceid.UnlockAarCallback {
public <methods>;
}
-keep enum com.mdd.aar.deviceid.DeviceEnvironment
-keepclassmembers enum com.mdd.aar.deviceid.DeviceEnvironment{
public <fields>;
}
-keep class com.mdd.aar.deviceid.AarDeviceId
-keepclassmembers class com.mdd.aar.deviceid.AarDeviceId {
public <methods>;
}
-keep class retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory
-keepclassmembers class com.mdd.aar.deviceid.AarDeviceId {
public <methods>;
}
##---------------Begin: proguard configuration for Gson ----------
# Gson uses generic type information stored in a class file when working with fields. Proguard
# removes such information by default, so configure it to keep all of it.
-keepattributes Signature
# For using GSON @Expose annotation
-keepattributes *Annotation*
# Gson specific classes
-dontwarn sun.misc.**
#-keep class com.google.gson.stream.** { *; }
# Application classes that will be serialized/deserialized over Gson
-keep class com.google.gson.examples.android.model.** { <fields>; }
# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class * extends com.google.gson.TypeAdapter
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer
# Prevent R8 from leaving Data object members always null
-keepclassmembers,allowobfuscation class * {
@com.google.gson.annotations.SerializedName <fields>;
}
##---------------End: proguard configuration for Gson ----------
\ No newline at end of file
package com.mdd.aar.deviceid;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.mdd.aar.deviceid.test", appContext.getPackageName());
}
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mdd.aar.deviceid" />
package com.mdd.aar.deviceid;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Environment;
import android.preference.PreferenceManager;
import android.util.Log;
import com.mdd.aar.deviceid.exceptions.DeviceNotRegisteredException;
import com.mdd.aar.deviceid.http.Api;
import com.mdd.aar.deviceid.http.responses.RegisterDeviceResponse;
import com.mdd.aar.deviceid.http.responses.UnlockAarResponse;
import java.io.File;
import java.io.IOException;
/**
* Created by Husnan on 17/05/2020
*/
public class
AarDeviceId {
private final Context context;
private String TAG = "AarDeviceId";
public AarDeviceId(Context context) {
this.context = context;
}
public String getDeviceId() throws DeviceNotRegisteredException {
String deviceId = getSharedPreferences().getString("com.mdd.aar.deviceId", null);
if (deviceId == null)
throw new DeviceNotRegisteredException();
return deviceId;
}
public String unlockAar(String accessToken, DeviceEnvironment deviceEnvironment, String deviceId, String debugToken, String bypassMode) {
Api api = new Api(accessToken, deviceEnvironment);
UnlockAarResponse unlockAarResponse = api.unlockAar(deviceId, debugToken, bypassMode);
if (unlockAarResponse.isOk()) {
return unlockAarResponse.getData().getDebugResponse();
} else {
return null;
}
}
public String unlockAarV3(String accessToken, DeviceEnvironment deviceEnvironment, String deviceId, String debugToken, String bypassMode) {
Api api = new Api(accessToken, deviceEnvironment);
UnlockAarResponse unlockAarResponse = api.unlockAarV3(accessToken, deviceId, debugToken, bypassMode);
if (unlockAarResponse.isOk()) {
return unlockAarResponse.getData().getDebugResponse();
} else {
return null;
}
}
public UnlockAarResponse unlockLibrary(String accessToken, DeviceEnvironment deviceEnvironment, String deviceId, String debugToken, String bypassMode) {
Api api = new Api(accessToken, deviceEnvironment);
UnlockAarResponse unlockAarResponse = api.unlockAarV3(accessToken, deviceId, debugToken, bypassMode);
if (unlockAarResponse.isOk()) {
return unlockAarResponse;
} else {
return null;
}
}
private SharedPreferences getSharedPreferences() {
return PreferenceManager.getDefaultSharedPreferences(context);
}
public void init(String accessToken, DeviceEnvironment deviceEnvironment) {
String deviceId = getDeviceIdToSharedPreferences();
if (deviceId != null) {
storeDeviceIdToSharedPreferences(deviceId);
} else {
Api api = new Api(accessToken, deviceEnvironment);
RegisterDeviceResponse registerDeviceResponse = api.registerDevice();
if (registerDeviceResponse.isOk()) {
deviceId = registerDeviceResponse.getData().getDeviceId();
Log.d(TAG, "onSuccess: " + deviceId);
// createHiddenFile(deviceId);
storeDeviceIdToSharedPreferences(deviceId);
} else {
Log.d(TAG, "onFailed: " + registerDeviceResponse.getResponse().getMessage());
}
}
}
private void createHiddenFile(String generatedDeviceId) {
File sdcard = Environment.getExternalStorageDirectory();
File file = new File(sdcard, "/com.mdd.aar/");
File file1 = new File(file, "." + generatedDeviceId);
try {
file1.createNewFile();
} catch (IOException e) {
Log.e(TAG, "createHiddenFile: " + e.getMessage());
}
}
private String getDeviceIdFromHiddenFile() {
String deviceId = null;
File sdcard = Environment.getExternalStorageDirectory();
File file = new File(sdcard, "/com.mdd.aar/");
if (file.isDirectory()) {
String[] list = file.list();
for (String l : list) {
if (l.charAt(0) == '.' && !l.equalsIgnoreCase(".nomedia")) {
deviceId = l.substring(1);
break;
}
}
} else {
boolean mkdirs = file.mkdirs();
if (!mkdirs) {
Log.e(TAG, "getDeviceIdFromHiddenFile: failed to create " + file.getAbsolutePath());
} else {
Log.e(TAG, "getDeviceIdFromHiddenFile: success to create " + file.getAbsolutePath());
}
createNoMediaFile(file);
}
return deviceId;
}
private void createNoMediaFile(File file) {
File file1 = new File(file, ".nomedia");
try {
boolean newFile = file1.createNewFile();
if (!newFile) {
Log.e(TAG, "createNoMediaFile: failed to create " + file.getAbsolutePath());
} else {
Log.e(TAG, "createNoMediaFile: success to create " + file.getAbsolutePath());
}
} catch (IOException e) {
Log.e(TAG, "createNoMediaFile: " + e.getMessage());
}
}
private void storeDeviceIdToSharedPreferences(String generatedDeviceId) {
SharedPreferences.Editor prefEditor = getSharedPreferences().edit();
prefEditor.putString("com.mdd.aar.deviceId", generatedDeviceId);
prefEditor.apply();
}
private String getDeviceIdToSharedPreferences() {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
String data = prefs.getString("com.mdd.aar.deviceId", (String) null);
return data;
}
}
package com.mdd.aar.deviceid;
/**
* Created by Husnan on 17/05/2020
*/
public enum DeviceEnvironment {
DEVELOPMENT,
STAGING,
PROD,
UNLOCK
}
package com.mdd.aar.deviceid.exceptions;
/**
* Created by Husnan on 17/05/2020
*/
public class DeviceNotRegisteredException extends Exception {
public DeviceNotRegisteredException() {
super("This device not registered yet, please init your device..");
}
}
package com.mdd.aar.deviceid.http;
import android.os.Build;
import com.mdd.aar.deviceid.DeviceEnvironment;
import com.mdd.aar.deviceid.http.requests.AuthLoginRequest;
import com.mdd.aar.deviceid.http.requests.RefreshTokenRequest;
import com.mdd.aar.deviceid.http.requests.RegisterDeviceRequest;
import com.mdd.aar.deviceid.http.requests.UnlockAarRequest;
import com.mdd.aar.deviceid.http.responses.AuthLoginResponse;
import com.mdd.aar.deviceid.http.responses.RegisterDeviceResponse;
import com.mdd.aar.deviceid.http.responses.UnlockAarResponse;
import com.mdd.aar.deviceid.services.DeviceService;
import java.util.concurrent.TimeUnit;
import io.reactivex.Single;
import io.reactivex.schedulers.Schedulers;
import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;
/**
* Created by Husnan on 17/05/2020
*/
public class Api {
private final DeviceEnvironment deviceEnvironment;
private final String token;
public Api(String accessToken, DeviceEnvironment deviceEnvironment) {
this.deviceEnvironment = deviceEnvironment;
token = accessToken;
}
public RegisterDeviceResponse registerDevice() {
DeviceService deviceService = getClient().create(DeviceService.class);
RegisterDeviceRequest request = new RegisterDeviceRequest();
request.setManufacturer(Build.MANUFACTURER);
request.setBrand(Build.BRAND);
request.setDataSource("AAR");
request.setModel(Build.MODEL);
request.setPhoneType(Build.DEVICE);
return deviceService.register("Bearer: " + token, request)
.observeOn(Schedulers.io())
.subscribeOn(Schedulers.io())
.blockingGet();
}
public Single<AuthLoginResponse> loginMerchant(AuthLoginRequest authLoginRequest) {
// MdsEndpoint mdsEndpoint = getApiInterfaces();
// return mdsEndpoint.authLogin(authLoginRequest);
DeviceService deviceService = getClient().create(DeviceService.class);
return deviceService.authLogin(authLoginRequest);
}
public Single<AuthLoginResponse> refreshToken(String token, RefreshTokenRequest refreshTokenRequest) {
// MdsEndpoint mdsEndpoint = getApiInterfaces();
// return mdsEndpoint.refreshToken(makeToken(token), refreshTokenRequest);
DeviceService deviceService = getClient().create(DeviceService.class);
return deviceService.refreshToken(token, refreshTokenRequest);
}
public UnlockAarResponse unlockAar(String deviceId, String debugToken, String bypassMode) {
DeviceService deviceService = getClient().create(DeviceService.class);
UnlockAarRequest request = new UnlockAarRequest();
request.setDeviceId(deviceId);
request.setDebugToken(debugToken);
request.setBypassMode(bypassMode);
return deviceService.unlockAar("Bearer: " + token, request)
.observeOn(Schedulers.io())
.subscribeOn(Schedulers.io())
.blockingGet();
}
public UnlockAarResponse unlockAarV3(String accessToken, String deviceId, String debugToken, String bypassMode) {
DeviceService deviceService = getClient().create(DeviceService.class);
UnlockAarRequest request = new UnlockAarRequest();
request.setDeviceId(deviceId);
request.setDebugToken(debugToken);
request.setBypassMode(bypassMode);
return deviceService.unlockAarV3(accessToken, request)
.observeOn(Schedulers.io())
.subscribeOn(Schedulers.io())
.blockingGet();
}
private Retrofit getClient() {
HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
OkHttpClient client = new OkHttpClient.Builder()
.addInterceptor(interceptor)
.connectTimeout(100, TimeUnit.SECONDS)
.writeTimeout(100, TimeUnit.SECONDS)
.readTimeout(110, TimeUnit.SECONDS)
.build();
Retrofit retrofit = new Retrofit.Builder()
.baseUrl(getBaseUrl())
.addConverterFactory(GsonConverterFactory.create())
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.client(client)
.build();
return retrofit;
}
private String getBaseUrl() {
switch (deviceEnvironment) {
case PROD:
return "https://api-prod.multidaya.id";
case DEVELOPMENT:
return "https://api-dev.mdd.co.id";
case STAGING:
return "https://api-staging.multidaya.id";
case UNLOCK:
return "https://apiv2.mdd.co.id:30309";
}
return "";
}
}
package com.mdd.aar.deviceid.http.requests;
import com.google.gson.Gson;
import lombok.Getter;
import lombok.Setter;
@Getter
public class AuthLoginRequest {
private String username, password;
public AuthLoginRequest(String username, String password) {
this.username = username;
this.password = password;
}
@Override
public String toString() {
return new Gson().toJson(this);
}
}
package com.mdd.aar.deviceid.http.requests;
import com.google.gson.Gson;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class RefreshTokenRequest {
String refresh_token;
public RefreshTokenRequest(String refresh_token) {
this.refresh_token = refresh_token;
}
public RefreshTokenRequest() {
}
@Override
public String toString() {
return new Gson().toJson(this);
}
}
package com.mdd.aar.deviceid.http.requests;
import com.google.gson.annotations.SerializedName;
import lombok.Getter;
import lombok.Setter;
/**
* Created by Husnan on 17/05/2020
*/
@Getter
@Setter
public class RegisterDeviceRequest {
@SerializedName("model")
String model;
@SerializedName("manufacturer")
String manufacturer;
@SerializedName("brand")
String brand;
@SerializedName("phone_type")
String phoneType;
@SerializedName("data_source")
String dataSource;
}
package com.mdd.aar.deviceid.http.requests;
import com.google.gson.annotations.SerializedName;
import lombok.Getter;
import lombok.Setter;
/**
* Created by Husnan on 17/05/2020
*/
@Getter
@Setter
public class UnlockAarRequest {
@SerializedName("device_id")
String deviceId;
@SerializedName("debug_token")
String debugToken;
@SerializedName("bypass_mode")
String bypassMode;
}
package com.mdd.aar.deviceid.http.responses;
import com.google.gson.annotations.SerializedName;
import lombok.Getter;
import lombok.Setter;
/**
* Created by Husnan on 17/05/2020
*/
@Getter
@Setter
public class ApiResponse {
@SerializedName("code")
int code;
@SerializedName("message")
String message;
@SerializedName("latency")
double latency;
@SerializedName("host")
String host;
}
package com.mdd.aar.deviceid.http.responses;
import com.google.gson.annotations.SerializedName;
import lombok.Getter;
import lombok.Setter;
/**
* Created by Husnan on 24/04/2020
*/
@Getter
@Setter
public class AuthData {
@SerializedName("name")
String name;
@SerializedName("username")
String username;
@SerializedName("authLevel")
String authLevel;
@SerializedName("expired_at")
String expiredAt;
@SerializedName("access_token")
String accessToken;
@SerializedName("refresh_token")
String refreshToken;
}
package com.mdd.aar.deviceid.http.responses;
import com.google.gson.annotations.SerializedName;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class AuthLoginResponse {
@SerializedName("response")
ApiResponse response;
@SerializedName("data")
AuthData data;
}
package com.mdd.aar.deviceid.http.responses;
import com.google.gson.annotations.SerializedName;
import lombok.Getter;
import lombok.Setter;
/**
* Created by Husnan on 17/05/2020
*/
@Getter
@Setter
public class RegisterDeviceData {
@SerializedName("device_id")
String deviceId;
}
package com.mdd.aar.deviceid.http.responses;
import com.google.gson.annotations.SerializedName;
import lombok.Getter;
import lombok.Setter;
/**
* Created by Husnan on 17/05/2020
*/
@Getter
@Setter
public class RegisterDeviceResponse {
@SerializedName("response")
ApiResponse response;
@SerializedName("data")
RegisterDeviceData data;
public boolean isOk() {
return getResponse().getCode() == 200;
}
}
package com.mdd.aar.deviceid.http.responses;
import com.google.gson.annotations.SerializedName;
import lombok.Getter;
import lombok.Setter;
/**
* Created by Husnan on 17/05/2020
*/
@Getter
@Setter
public class UnlockAarData {
@SerializedName("debug_response")
String debugResponse;
@SerializedName("created_at")
String createdAt;
@SerializedName("expired_at")
String expiredAt;
@SerializedName("state")
String state;
}
package com.mdd.aar.deviceid.http.responses;
import com.google.gson.annotations.SerializedName;
import lombok.Getter;
import lombok.Setter;
/**
* Created by Husnan on 17/05/2020
*/
@Setter
@Getter
public class UnlockAarResponse {
@SerializedName("response")
ApiResponse response;
@SerializedName("data")
UnlockAarData data;
public boolean isOk() {
return getResponse().getCode() == 200;
}
}
package com.mdd.aar.deviceid.services;
import com.mdd.aar.deviceid.http.requests.AuthLoginRequest;
import com.mdd.aar.deviceid.http.requests.RefreshTokenRequest;
import com.mdd.aar.deviceid.http.requests.RegisterDeviceRequest;
import com.mdd.aar.deviceid.http.requests.UnlockAarRequest;
import com.mdd.aar.deviceid.http.responses.AuthLoginResponse;
import com.mdd.aar.deviceid.http.responses.RegisterDeviceResponse;
import com.mdd.aar.deviceid.http.responses.UnlockAarData;
import com.mdd.aar.deviceid.http.responses.UnlockAarResponse;
import io.reactivex.Single;
import retrofit2.http.Body;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Path;
/**
* Created by Husnan on 17/05/2020
*/
public interface DeviceService {
@Headers({
"Accept: application/json",
"Content-Type: application/json"
})
@POST("/auth-service/v1/login")
Single<AuthLoginResponse> authLogin(@Body AuthLoginRequest authLoginRequest);
@Headers({
"Accept: application/json",
"Content-Type: application/json"
})
@POST("/auth-service/v1/refresh-token")
Single<AuthLoginResponse> refreshToken(@Header("Authorization") String token, @Body RefreshTokenRequest refreshTokenRequest);
@Headers({
"Accept: application/json",
"Content-Type: application/json"
})
@POST("/device-service/register")
Single<RegisterDeviceResponse> register(@Header("Authorization") String accessToken, @Body RegisterDeviceRequest request);
@Headers({
"Accept: application/json",
"Content-Type: application/json"
})
@POST("/aar-service/aar/unlock")
Single<UnlockAarResponse> unlockAar(@Header("Authorization") String accessToken, @Body UnlockAarRequest request);
@Headers({
"Accept: application/json",
"Content-Type: application/json"
})
@POST("/aar-service/aar/unlock/{token}")
Single<UnlockAarResponse> unlockAarV3(@Path("token") String token, @Body UnlockAarRequest request);
}
<resources>
<string name="app_name">Aar DeviceId</string>
</resources>
package com.mdd.aar.deviceid;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
apply plugin: 'com.android.application'
android {
compileSdkVersion 30
defaultConfig {
applicationId "com.medicom.dudikov.mypaxsimulator"
minSdkVersion 22
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
}
}
}
compileOptions {
encoding "UTF-8"
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
minifyEnabled false
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
ndkVersion = '21.3.6528147'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.google.android.material:material:1.2.1'
// Dependencies for working with Architecture components
// You'll probably have to update the version numbers in guild.gradle (Project)
implementation "android.arch.persistence.room:runtime:$rootProject.roomVersion"
annotationProcessor "android.arch.persistence.room:compiler:$rootProject.roomVersion"
androidTestImplementation "android.arch.persistence.room:testing:$rootProject.roomVersion"
implementation "android.arch.lifecycle:extensions:$rootProject.archLifecycleVersion"
//annotationProcessor "android.arch.lifecycle:compiler:$rootProject.archLifecycleVersion"
androidTestImplementation "android.arch.core:core-testing:$rootProject.archLifecycleVersion"
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.sunmi:printerlibrary:1.0.9'
implementation 'com.google.zxing:core:3.3.2'
testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
//http
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
implementation "androidx.preference:preference:1.1.1"
implementation(group: 'com.mdd.payment', name: 'mybanklibrary-release', version: '3.7.0', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'organicdrv-release', version: '2.1.2', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'paylib-release', version: '1.0.1', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'aar-deviceid-release', version: '2.0.5', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'nativecripto-release', version: '2.0.1', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'sunmilibrary-release', version: '2.2.1', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'isodeplibrary-release', version: '2.1.2', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'z91library-release', version: '2.1.2', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'verifonelibrary-release', version: '2.1.2', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'paxlibrary-release', version: '2.1.3', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'ingenicolibrary-release', version: '1.0.3', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'wepoylibrary-release', version: '2.2.6', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'd130library-release', version: '1.0.0', ext: 'aar')
}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
{
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "3b109e1a65b0e38d75f0564ab164d6bf",
"entities": [
{
"tableName": "parameters_table",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`c_parameters_desc` TEXT NOT NULL, `c_parameters_value` TEXT NOT NULL, PRIMARY KEY(`c_parameters_desc`))",
"fields": [
{
"fieldPath": "mDescription",
"columnName": "c_parameters_desc",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "mValue",
"columnName": "c_parameters_value",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"c_parameters_desc"
],
"autoGenerate": false
},
"indices": [],
"foreignKeys": []
}
],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"3b109e1a65b0e38d75f0564ab164d6bf\")"
]
}
}
\ No newline at end of file
{
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "3b109e1a65b0e38d75f0564ab164d6bf",
"entities": [
{
"tableName": "parameters_table",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`c_parameters_desc` TEXT NOT NULL, `c_parameters_value` TEXT NOT NULL, PRIMARY KEY(`c_parameters_desc`))",
"fields": [
{
"fieldPath": "mDescription",
"columnName": "c_parameters_desc",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "mValue",
"columnName": "c_parameters_value",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"c_parameters_desc"
],
"autoGenerate": false
},
"indices": [],
"foreignKeys": []
}
],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"3b109e1a65b0e38d75f0564ab164d6bf\")"
]
}
}
\ No newline at end of file
package com.medicom.dudikov.mypaxsimulator;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.medicom.dudikov.mypaxsimulator", appContext.getPackageName());
}
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.medicom.dudikov.mypaxsimulator">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:name=".MyApp"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme.NoActionBar"
android:usesCleartextTraffic="true">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".SettingsActivity"
android:theme="@style/MyMaterialTheme" />
</application>
</manifest>
\ No newline at end of file
package com.medicom.dudikov.mypaxsimulator.Api;
public class ApiH2HConfig {
String mid;
String tid;
String token;
public ApiH2HConfig(String mid, String tid, String token) {
this.mid = mid;
this.tid = tid;
this.token = token;
}
public String getMid() {
return mid;
}
public String getTid() {
return tid;
}
public String getToken() {
return token;
}
}
\ No newline at end of file
package com.medicom.dudikov.mypaxsimulator.Api;
import android.util.Log;
import com.medicom.dudikov.mypaxsimulator.http.BaseApiServices;
import com.medicom.dudikov.mypaxsimulator.http.RetrofitClient;
import com.medicom.dudikov.mypaxsimulator.http.request.RequestAccessToken;
import com.medicom.dudikov.mypaxsimulator.http.request.TopupMandiriConfirmJson;
import com.medicom.dudikov.mypaxsimulator.http.request.TopupMandiriPendingJson;
import com.medicom.dudikov.mypaxsimulator.http.request.TopupMandiriReversalJson;
import com.medicom.dudikov.mypaxsimulator.http.request.TopupMandiriUpdateJson;
import com.medicom.dudikov.mypaxsimulator.http.response.ResponseToken;
import java.io.IOException;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
public class ApiUtils {
// public static final String BASE_URL_API = "http://192.168.2.194/";
public static final String BASE_URL_API_DEV = "http://apidev.mdd.co.id:28194/";
private static final String BASE_URL_API = "https://apiv2.mdd.co.id:30307/";
private static final String BASE_URL_API_STAG = "https://apiv2.mdd.co.id:30307/";
private static final String BASE_URL_API_TOKEN = "http://apidev.mdd.co.id:28194/internal/topup-bri/";
private static final String TAG = "ApiUtils";
private static BaseApiServices getAPIService() {
return RetrofitClient.getClient(BASE_URL_API_STAG).create(BaseApiServices.class);
}
private static BaseApiServices getAPIService(String baseUrl) {
return RetrofitClient.getClient(baseUrl).create(BaseApiServices.class);
}
private static BaseApiServices getAPIDevService() {
return RetrofitClient.getClient(BASE_URL_API_DEV).create(BaseApiServices.class);
}
public static String topupMandiriPending(TopupMandiriPendingJson topupMandiriPendingJson) throws IOException {
BaseApiServices mApiService = getAPIService();
Response response = mApiService.topupMandiriPending(topupMandiriPendingJson).execute();
Boolean isSuccess = response.isSuccessful();
String resp = "";
if (isSuccess) {
assert response.body() != null;
resp = response.body().toString();
} else {
ResponseBody errorBody = response.errorBody();
if (errorBody != null) {
resp = errorBody.string();
}
}
return resp;
}
public static String topupMandiriUpdateSynchronous(TopupMandiriUpdateJson topupMandiriUpdateJson) throws IOException {
BaseApiServices mApiService = getAPIService();
Response response = mApiService.topupMandiriUpdate(topupMandiriUpdateJson).execute();
Boolean isSuccess = response.isSuccessful();
String resp = "";
if (isSuccess) {
assert response.body() != null;
resp = response.body().toString();
} else {
ResponseBody errorBody = response.errorBody();
if (errorBody != null) {
resp = errorBody.string();
}
}
return resp;
}
public static String getTopupMandiriUpdateConfirmResponseBody(TopupMandiriConfirmJson topupMandiriConfirmJson) {
BaseApiServices mApiService = getAPIService();
try {
return mApiService.topupMandiriupdateConfirm(topupMandiriConfirmJson).execute().body();
} catch (IOException e) {
e.printStackTrace();
}
return "";
}
public static String getTopupMandiriReversalResponseBody(TopupMandiriReversalJson topupMandiriReversalJson) {
BaseApiServices mApiService = getAPIService();
try {
return mApiService.topupMandiriReversal(topupMandiriReversalJson).execute().body();
} catch (IOException e) {
e.printStackTrace();
}
return "";
}
public static void hitApiTokenMDD(BaseApiServices.CallbackToken callback){
BaseApiServices mApiService = getAPIService(BASE_URL_API_TOKEN);
RequestAccessToken request = new RequestAccessToken();
request.setToken("165eea86947a4e9483d1902f93495fc6");
request.setMid("1234567abc");
try {
mApiService.getAccesToken(request).enqueue(new Callback<ResponseToken>() {
@Override
public void onResponse(Call<ResponseToken> call, Response<ResponseToken> response) {
callback.onSuccess(response.body());
}
@Override
public void onFailure(Call<ResponseToken> call, Throwable t) {
Log.e("responseFailure", t.getMessage());
}
});
}catch(Exception e){
e.printStackTrace();
}
}
}
package com.medicom.dudikov.mypaxsimulator.Api;
public interface InitConfig {
ApiH2HConfig getH2HConfig();
}
package com.medicom.dudikov.mypaxsimulator.Database;
import androidx.room.TypeConverter;
import java.sql.Date;
public class Converters {
@TypeConverter
public static Date fromTimestamp(Long value) {
return value == null ? null : new Date(value);
}
@TypeConverter
public static Long dateToTimestamp(Date date) {
return date == null ? null : date.getTime();
}
}
\ No newline at end of file
package com.medicom.dudikov.mypaxsimulator.Database;
import android.content.Context;
import android.os.AsyncTask;
import androidx.annotation.NonNull;
import androidx.room.Database;
import androidx.room.Room;
import androidx.room.RoomDatabase;
import androidx.room.TypeConverters;
import androidx.sqlite.db.SupportSQLiteDatabase;
@Database(entities = {ParametersTable.class}, version = 1)
@TypeConverters({Converters.class})
public abstract class LocalDatabase extends RoomDatabase {
public abstract ParametersTableDAO ParametersDao();
// marking the instance as volatile to ensure atomic access to the variable
private static volatile LocalDatabase INSTANCE;
static LocalDatabase getDatabase(final Context context) {
if (INSTANCE == null) {
synchronized (LocalDatabase.class) {
if (INSTANCE == null) {
INSTANCE = Room.databaseBuilder(context.getApplicationContext(),
LocalDatabase.class, "edc_database")
// Wipes and rebuilds instead of migrating if no Migration object.
// Migration is not part of this codelab.
.fallbackToDestructiveMigration()
.addCallback(sRoomDatabaseCallback)
.build();
}
}
}
return INSTANCE;
}
/**
* Override the onOpen method to populate the database.
* For this sample, we clear the database every time it is created or opened.
* <p>
* If you want to populate the database only when the database is created for the 1st time,
* override RoomDatabase.Callback()#onCreate
*/
private static final RoomDatabase.Callback sRoomDatabaseCallback = new RoomDatabase.Callback() {
@Override
public void onOpen(@NonNull SupportSQLiteDatabase db) {
super.onOpen(db);
}
@Override
public void onCreate(@NonNull SupportSQLiteDatabase db) {
// new PopulateDbAsync(INSTANCE).execute();
}
};
/**
* Populate the database in the background.
* If you want to start with more words, just add them.
*/
private static class PopulateDbAsync extends AsyncTask<Void, Void, Void> {
private final ParametersTableDAO mParameterDao;
PopulateDbAsync(LocalDatabase db) {
mParameterDao = db.ParametersDao();
}
@Override
protected Void doInBackground(final Void... params) {
// Start the app with a clean database every time.
// Not needed if you only populate on creation.
//mDao.deleteAll();
//ParametersTable parameters = new ParametersTable("trans_number", "1");
//mDao.insert(parameters);
//parameters = new ParametersTable("World");
//mDao.insert(parameters);
return null;
}
}
}
package com.medicom.dudikov.mypaxsimulator.Database;
import android.content.Context;
import android.os.AsyncTask;
import androidx.lifecycle.LiveData;
import java.util.List;
public class ParametersRepository {
private final ParametersTableDAO mParametersDao;
private final LiveData<List<ParametersTable>> mAllParameters;
public ParametersRepository(Context context) {
LocalDatabase db = LocalDatabase.getDatabase(context);
mParametersDao = db.ParametersDao();
mAllParameters = mParametersDao.getAlphabetizedParameters();
}
// Room executes all queries on a separate thread.
// Observed LiveData will notify the observer when the data has changed.
public LiveData<List<ParametersTable>> getAllParameters() {
return mAllParameters;
}
public String findValue(String Desc, String defaultValue) {
String res = mParametersDao.findValue(Desc);
if (res == null) {
ParametersTable parValue = new ParametersTable(Desc, defaultValue);
mParametersDao.insert(parValue);
res = defaultValue;
}
return res;
}
// You must call this on a non-UI thread or your app will crash.
// Like this, Room ensures that you're not doing any long running operations on the main
// thread, blocking the UI.
public void insert(ParametersTable parameters) {
new insertAsyncTask(mParametersDao).execute(parameters);
}
private static class insertAsyncTask extends AsyncTask<ParametersTable, Void, Void> {
private final ParametersTableDAO mAsyncTaskDao;
insertAsyncTask(ParametersTableDAO dao) {
mAsyncTaskDao = dao;
}
@Override
protected Void doInBackground(final ParametersTable... params) {
mAsyncTaskDao.insert(params[0]);
return null;
}
}
}
package com.medicom.dudikov.mypaxsimulator.Database;
import androidx.annotation.NonNull;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
@Entity(tableName = "parameters_table")
public class ParametersTable {
@NonNull
@PrimaryKey
@ColumnInfo(name = "c_parameters_desc")
private final String mDescription;
@NonNull
@ColumnInfo(name = "c_parameters_value")
private final String mValue;
public ParametersTable(@NonNull String mDescription, @NonNull String mValue) {
this.mDescription = mDescription;
this.mValue = mValue;
}
@NonNull
public String getDescription() {
return this.mDescription;
}
@NonNull
public String getValue() {
return this.mValue;
}
}
package com.medicom.dudikov.mypaxsimulator.Database;
import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;
import java.util.List;
@Dao
public interface ParametersTableDAO {
@Query("SELECT * from PARAMETERS_TABLE ORDER BY c_parameters_desc ASC")
LiveData<List<ParametersTable>> getAlphabetizedParameters();
@Insert(onConflict = OnConflictStrategy.REPLACE)
void insert(ParametersTable Parameters);
@Update
void update(ParametersTable Parameters);
@Query("SELECT c_parameters_value from PARAMETERS_TABLE where c_parameters_desc=:mDescription")
String findValue(String mDescription);
@Query("DELETE FROM PARAMETERS_TABLE")
void deleteAll();
}
package com.medicom.dudikov.mypaxsimulator;
import android.content.Context;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.RemoteException;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import com.medicom.dudikov.mybanklibrary.halDriver;
import com.medicom.dudikov.mypaxsimulator.Database.ParametersRepository;
import com.medicom.organicdrv.utilsLib;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.Locale;
import java.util.Objects;
/**
* A simple {@link Fragment} subclass.
* Activities that contain this fragment must implement the
* {@link FragmentAbout.OnFragmentInteractionListener} interface
* to handle interaction events.
* Use the {@link FragmentAbout#newInstance} factory method to
* create an instance of this fragment.
*/
public class FragmentAbout extends Fragment {
private static final String TAG = "ABOUT";
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;
private int idxDriver;
private halDriver organicLibrary = null;
private OnFragmentInteractionListener mListener;
public FragmentAbout() {
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment FragmentAbout.
*/
// TODO: Rename and change types and number of parameters
public static FragmentAbout newInstance(String param1, String param2) {
FragmentAbout fragment = new FragmentAbout();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
Bundle bundle = getArguments();
if (bundle != null) {
idxDriver = bundle.getInt("ENGGINE_USE");
}
try {
organicLibrary = new halDriver(getActivity(), idxDriver);
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_about, container, false);
}
public byte[] FindOrganicCard(int timeoutMs, int[] cardType) throws RemoteException, IOException, InterruptedException {
byte[] result = null;
result = organicLibrary.JavaClDetect(timeoutMs, cardType);
return result;
}
public boolean PAXsamInit() throws RemoteException, InterruptedException {
boolean result = false;
byte[] apdu_sel_app = {0x00, (byte) 0xA4, 0x04, 0x00, 0x08, 0x52, 0x56, 0x53, 0x5F, 0x30, 0x31, 0x30, 0x30};
byte[] apdu_get_uid = {0x00, (byte) 0xC2, 0x10, 0x00, 0x00};
byte[] apdu_get_version = {0x00, (byte) 0xC2, 0x11, 0x00, 0x00};
byte[] resp;
resp = organicLibrary.javaSamPowerOn((byte) 0);
if (resp != null) {
resp = organicLibrary.JavaSamSendApdu((byte) 0, apdu_sel_app);
if (organicLibrary.apduResultOk(resp)) {
resp = organicLibrary.JavaSamSendApdu((byte) 0, apdu_get_uid);
if (organicLibrary.apduResultOk(resp)) {
resp = organicLibrary.JavaSamSendApdu((byte) 0, apdu_get_version);
if (organicLibrary.apduResultOk(resp)) {
result = true;
}
}
}
}
return result;
}
public boolean PAXsamLogin(byte[] pin, byte[] mid, byte[] tid) throws RemoteException {
boolean result = false;
byte[] apdu_login = {0x00, (byte) 0xC2, 0x0A, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
byte[] apdu_update = {0x00, (byte) 0xC2, 0x0A, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};//Baru
//byte apdu_activate_boost[]={0x00, 0x12, 0x00, 0x00, 0x00};//Jangan Dipakai Jika TOP-UP, Bakalan Error
byte[] resp;
System.arraycopy(pin, 0, apdu_login, 5, pin.length);
resp = organicLibrary.JavaSamSendApdu((byte) 0, apdu_login);
if (organicLibrary.apduResultOk(resp)) {
System.arraycopy(mid, 0, apdu_update, 5, mid.length);
System.arraycopy(tid, 0, apdu_update, 5 + mid.length, tid.length);
resp = organicLibrary.JavaSamSendApdu((byte) 0, apdu_update);
if (organicLibrary.apduResultOk(resp)) {
result = true;
}
}
return result;
}
public boolean PAXIsMyCard() throws RemoteException, IOException {
boolean result = false;
byte[] apdu_cl_select_app = {0x00, (byte) 0xA4, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01};
byte[] apdu_cl_card_info = {0x00, (byte) 0xB3, 0x00, 0x00, 0x3F};
byte[] resp = new byte[0];
resp = organicLibrary.JavaClSendApdu(apdu_cl_select_app);
if (organicLibrary.apduResultOk(resp)) {
resp = organicLibrary.JavaClSendApdu(apdu_cl_card_info);
if (organicLibrary.apduResultOk(resp)) {
result = true;
}
}
return result;
}
private byte[] samClTalk(byte slotNo, byte[] initial_apdu, boolean[] isPartial, byte simulate, int[] error_rst) {
byte[] commit = {0x00, (byte) 0xDD, 0x00, 0x00, 0x00};
byte[] cmd = {0x00, (byte) 0xC3, 0x00, 0x00};
byte[] apdu;
byte[] respdata;
byte[] rapdu = null;
boolean talk_end = false;
apdu = new byte[initial_apdu.length];
System.arraycopy(initial_apdu, 0, apdu, 0, initial_apdu.length);
Log.v(TAG, "SAM CL TALK");
do {
try {
respdata = organicLibrary.JavaSamSendApdu(slotNo, apdu);
error_rst[0] = organicLibrary.apduResultCode(respdata);
if (organicLibrary.apduResultOk(respdata)) {
if (respdata[0] == 0x07) {
apdu = new byte[cmd.length + 1 + 2];
System.arraycopy(cmd, 0, apdu, 0, cmd.length);
apdu[cmd.length] = 2;
System.arraycopy(respdata, 3, apdu, cmd.length + 1, 2);
} else if (respdata[0] == 0x02) {
if (respdata[1] == 0x02) {
if ((respdata[2] == (byte) 0x90) && (respdata[3] == 0x00)) {
} else {
error_rst[0] = (respdata[2] << 8) + respdata[3];//Update Applet Error code
}
rapdu = new byte[respdata[1]];
System.arraycopy(respdata, 0, rapdu, 0, respdata.length);
} else {
rapdu = new byte[respdata[1]];
System.arraycopy(respdata, 2, rapdu, 0, respdata[1]);
}
talk_end = true;
} else {
apdu = new byte[respdata[1]];
System.arraycopy(respdata, 2, apdu, 0, respdata[1]);
byte[] apduPack = new byte[apdu.length];
System.arraycopy(apdu, 0, apduPack, 0, apdu.length);
if (Arrays.equals(apduPack, commit)) {
isPartial[0] = true;
if (simulate == 0x4F) {
break;
}
}
respdata = organicLibrary.JavaClSendApdu(apdu);
if (respdata == null) {
error_rst[0] = organicLibrary.apduResultCode(respdata);
if (organicLibrary.apduResultOk(respdata)) {
if (isPartial[0] == true) {
if (simulate == 0x4E) {
break;
}
isPartial[0] = false;
}
apdu = new byte[cmd.length + 1 + respdata.length];
System.arraycopy(cmd, 0, apdu, 0, cmd.length);
apdu[cmd.length] = ((byte) respdata.length);
System.arraycopy(respdata, 0, apdu, cmd.length + 1, respdata.length);
} else {
rapdu = new byte[respdata[1]];
System.arraycopy(respdata, 0, rapdu, 2, respdata.length);
talk_end = true;
}
} else {
//talk_end=TRUE; if OPEN SAM WILL NOT REPORT 0x6700
apdu = new byte[cmd.length];
System.arraycopy(cmd, 0, apdu, 0, cmd.length);
}
}
} else {
talk_end = true;
}
} catch (Exception e) {
e.printStackTrace();
}
} while (!talk_end);
Log.v(TAG, "SAM CL TALK END");
return rapdu;
}
private boolean PAXGetBalance(String strDate, byte[] cardUID, int[] balance, int[] errorCode) throws RemoteException, IOException {
boolean result = false;
byte[] apdu_cl_card_info = {0x00, (byte) 0xB3, 0x00, 0x00, 0x3F};
byte[] apdu_cl_balance = {0x00, (byte) 0xC3, 0x01, 0x00, (byte) 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00};
int year = Integer.parseInt(strDate.substring(0, 4)) - 2000;
int month = Integer.parseInt(strDate.substring(4, 6));
int day = Integer.parseInt(strDate.substring(6, 8));
int hour = Integer.parseInt(strDate.substring(8, 10));
int minute = Integer.parseInt(strDate.substring(10, 12));
int second = Integer.parseInt(strDate.substring(12, 14));
byte[] mandiri_date = new byte[6];
mandiri_date[0] = (byte) ((((day / 10)) << 4) + (byte) (day % 10));
mandiri_date[1] = (byte) ((((month / 10)) << 4) + (byte) (month % 10));
mandiri_date[2] = (byte) ((((year / 10)) << 4) + (byte) (year % 10));
mandiri_date[3] = (byte) ((((hour / 10)) << 4) + (byte) (hour % 10));
mandiri_date[4] = (byte) ((((minute / 10)) << 4) + (byte) (minute % 10));
mandiri_date[5] = (byte) ((((second / 10)) << 4) + (byte) (second % 10));
byte[] cardinfo = null;
cardinfo = organicLibrary.JavaClSendApdu(apdu_cl_card_info);
System.arraycopy(mandiri_date, 0, apdu_cl_balance, 5, mandiri_date.length);
System.arraycopy(cardUID, 0, apdu_cl_balance, 5 + mandiri_date.length + (7 - cardUID.length), cardUID.length);
System.arraycopy(cardinfo, 0, apdu_cl_balance, 5 + mandiri_date.length + 7, 63);
boolean[] isPartial = new boolean[1];
isPartial[0] = false;
byte[] resp = samClTalk((byte) 0, apdu_cl_balance, isPartial, (byte) 0x31, errorCode);
if (resp != null)
result = true;
return result;
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
final Button mPaxText = view.findViewById(R.id.btnTextPax);
mPaxText.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mPaxText.setEnabled(false);
AsyncTask.execute(new Runnable() {
@Override
public void run() {
ParametersRepository Parameters = new ParametersRepository(getActivity());
try {
int[] cardType = new int[1];
byte[] cardUID = FindOrganicCard(5000, cardType);
if (cardUID != null) {
if (PAXIsMyCard()) {
if (PAXsamInit()) {
if (PAXsamLogin(utilsLib.HexStringToByteArray(Parameters.findValue("mandiri_sam_pin", "")),
utilsLib.HexStringToByteArray(Parameters.findValue("mandiri_mid", "")),
utilsLib.HexStringToByteArray(Parameters.findValue("mandiri_tid", "")))) {
Date date = new Date();
String StrDate = new SimpleDateFormat("yyyyMMddHHmmss", Locale.getDefault()).format(date);
int[] balance = new int[1];
int[] errorCode = new int[1];
PAXGetBalance(StrDate, cardUID, balance, errorCode);
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
@Override
public void run() {
mPaxText.setEnabled(true);
}
});
}
});
}
});
}
// TODO: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
}
@Override
public void onAttach(@NonNull Context context) {
super.onAttach(context);
if (context instanceof OnFragmentInteractionListener) {
mListener = (OnFragmentInteractionListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement OnFragmentInteractionListener");
}
}
@Override
public void onDetach() {
super.onDetach();
mListener = null;
}
/**
* This interface must be implemented by activities that contain this
* fragment to allow an interaction in this fragment to be communicated
* to the activity and potentially other fragments contained in that
* activity.
* <p>
* See the Android Training lesson <a href=
* "http://developer.android.com/training/basics/fragments/communicating.html"
* >Communicating with Other Fragments</a> for more information.
*/
public interface OnFragmentInteractionListener {
// TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
}
}
package com.medicom.dudikov.mypaxsimulator;
import android.content.Context;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import com.medicom.dudikov.mypaxsimulator.Database.ParametersRepository;
import com.medicom.dudikov.mypaxsimulator.Database.ParametersTable;
/**
* A simple {@link Fragment} subclass.
* Activities that contain this fragment must implement the
* {@link FragmentBankBCA.OnFragmentInteractionListener} interface
* to handle interaction events.
* Use the {@link FragmentBankBCA#newInstance} factory method to
* create an instance of this fragment.
*/
public class FragmentBankBCA extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;
private OnFragmentInteractionListener mListener;
private EditText mMid;
private EditText mTid;
private EditText mMinBalance;
public FragmentBankBCA() {
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment FragmentBankBCA.
*/
// TODO: Rename and change types and number of parameters
public static FragmentBankBCA newInstance(String param1, String param2) {
FragmentBankBCA fragment = new FragmentBankBCA();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mMid = view.findViewById(R.id.edMID);
mTid = view.findViewById(R.id.edTID);
mMinBalance = view.findViewById(R.id.edMinBalance);
mMid.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus){
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("bca_mid", mMid.getText().toString()));
}
}
});
mTid.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus){
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("bca_tid", mTid.getText().toString()));
}
}
});
mMinBalance.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus){
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("bca_min_balance", mMinBalance.getText().toString()));
}
}
});
AsyncTask.execute(new Runnable() {
@Override
public void run() {
ParametersRepository Parameters = new ParametersRepository(getActivity());
final String mid = Parameters.findValue("bca_mid", "000885000015999");
final String tid = Parameters.findValue("bca_tid", "ABC12345");
final String minBalance = Parameters.findValue("bca_min_balance", "0");
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
mMid.setText(mid);
mTid.setText(tid);
mMinBalance.setText(minBalance);
}
});
}
});
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_bank_bca, container, false);
}
// TODO: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
if (context instanceof OnFragmentInteractionListener) {
mListener = (OnFragmentInteractionListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement OnFragmentInteractionListener");
}
}
@Override
public void onDetach() {
super.onDetach();
mListener = null;
}
/**
* This interface must be implemented by activities that contain this
* fragment to allow an interaction in this fragment to be communicated
* to the activity and potentially other fragments contained in that
* activity.
* <p>
* See the Android Training lesson <a href=
* "http://developer.android.com/training/basics/fragments/communicating.html"
* >Communicating with Other Fragments</a> for more information.
*/
public interface OnFragmentInteractionListener {
// TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
}
}
package com.medicom.dudikov.mypaxsimulator;
import android.content.Context;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import com.medicom.dudikov.mybanklibrary.bniLib;
import com.medicom.dudikov.mybanklibrary.halDriver;
import com.medicom.dudikov.mybanklibrary.nativeLib;
import com.medicom.dudikov.mybanklibrary.readerLib;
import com.medicom.dudikov.mypaxsimulator.Database.ParametersRepository;
import com.medicom.dudikov.mypaxsimulator.Database.ParametersTable;
import com.medicom.organicdrv.HalInterface;
import com.medicom.organicdrv.OrganicDriver;
import com.medicom.organicdrv.utilsLib;
import java.util.Objects;
/**
* A simple {@link Fragment} subclass.
* Activities that contain this fragment must implement the
* {@link FragmentBankBNI.OnFragmentInteractionListener} interface
* to handle interaction events.
* Use the {@link FragmentBankBNI#newInstance} factory method to
* create an instance of this fragment.
*/
public class FragmentBankBNI extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
//private static byte[] MARRIAGE = {(byte)0xF0,0x34,0x35,(byte)0xF5,0x52,(byte)0xAB,0x1F,(byte)0xBB,(byte)0xD9,0x40,0x52,(byte)0xC6,(byte)0xCB,0x50,(byte)0x93,0x19};
//private static byte[] MARRIAGE = {0x66, (byte)0xA1, 0x07, 0x27, (byte)0x87, 0x43, (byte)0xFE, (byte)0x9E, 0x45, (byte)0xDE, 0x27, 0x1D, 0x58, 0x45, (byte)0xD0, 0x53}; // MDD DEV
private static final byte[] MARRIAGE = {0x53, (byte) 0xF1, (byte) 0xD5, (byte) 0x9B, (byte) 0xB4, (byte) 0xDF, 0x11, 0x20, (byte) 0xA4, (byte) 0xE1, 0x6D, (byte) 0xF4, (byte) 0xDD, (byte) 0xF3, 0x40, (byte) 0xB5};//MIY PROD
// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;
private OnFragmentInteractionListener mListener;
//private nativeLib nativeLibrary;
private readerLib readerLibrary;
private int idxDriver;
private EditText mMerriedCode;
private EditText mTid;
private EditText mMasterKey;
private EditText mIv;
private EditText mPin;
private Button mGetMerried;
public FragmentBankBNI() {
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment FragmentBankBNI.
*/
// TODO: Rename and change types and number of parameters
public static FragmentBankBNI newInstance(String param1, String param2) {
FragmentBankBNI fragment = new FragmentBankBNI();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_bank_bni, container, false);
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mMerriedCode = view.findViewById(R.id.edMerriedCode);
mTid = view.findViewById(R.id.edTid);
mMasterKey = view.findViewById(R.id.edMasterKey);
mIv = view.findViewById(R.id.edInitialVector);
mPin = view.findViewById(R.id.edBNIc2cPin);
mGetMerried = view.findViewById(R.id.btnGetMerried);
mGetMerried.setVisibility(View.INVISIBLE);
Bundle bundle = getArguments();
if (bundle != null) {
idxDriver = bundle.getInt("ENGGINE_USE");
}
mMerriedCode.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("bni_merried", mMerriedCode.getText().toString()));
}
}
});
mTid.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("bni_tid", mTid.getText().toString()));
}
}
});
mMasterKey.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("bni_masterkey", mMasterKey.getText().toString()));
}
}
});
mIv.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("bni_iv", mIv.getText().toString()));
}
}
});
mPin.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("bni_pin", mPin.getText().toString()));
}
}
});
mGetMerried.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String[] merriedCode = new String[1];
if (readerLibrary.readerBniSamGetMerriesCode(merriedCode)) {
final String strMerried = merriedCode[0];
mMerriedCode.setText(strMerried);
AsyncTask.execute(new Runnable() {
@Override
public void run() {
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("bni_merried", strMerried));
}
});
}
}
});
AsyncTask.execute(new Runnable() {
@Override
public void run() {
initEnggine();
}
});
}
private void initEnggine() {
ParametersRepository Parameters = new ParametersRepository(getActivity());
final String certDebugRespons = Parameters.findValue("cert_debug_respons", "");
String strMerried = Parameters.findValue("bni_merried", utilsLib.ByteArrayToHexString(MARRIAGE, 0, MARRIAGE.length));
final String strBniTid = Parameters.findValue("bni_tid", "01234567");
final String strMasterKey = Parameters.findValue("bni_masterkey", "404142434445464748494A4B4C4D4E4F");
final String strIv = Parameters.findValue("bni_iv", "0000000000000000");
final String strPin = Parameters.findValue("bni_pin", "1234560000000000");
try {
readerLibrary = new readerLib(getActivity(), true, idxDriver);
readerLibrary.activateDebug(getActivity(), certDebugRespons);
if (readerLibrary.bniEnabled()) {
byte[] merriedCode = utilsLib.HexStringToByteArray(Parameters.findValue("bni_merried", ""));
byte[] bniTid = utilsLib.HexStringToByteArray(Parameters.findValue("bni_tid", ""));
readerLibrary.bniSetConfig(merriedCode, bniTid);
readerLibrary.readerBniSetSamSlot(OrganicDriver.ORGANIC_SAM1);//Default ORGANIC_SAM1
}
final boolean bniInitOk = readerLibrary.readerBniSamActivateOnly();
final String finalStrMerried = strMerried;
Objects.requireNonNull(getActivity()).runOnUiThread(() -> {
if (finalStrMerried.length() > 0)
mMerriedCode.setText(finalStrMerried);
mTid.setText(strBniTid);
mMasterKey.setText(strMasterKey);
mIv.setText(strIv);
mPin.setText(strPin);
if (bniInitOk)
if (!readerLibrary.readerBniSamHasMerried()) {
mGetMerried.setVisibility(View.VISIBLE);
}
});
} catch (Exception e) {
e.printStackTrace();
}
}
// TODO: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
}
@Override
public void onAttach(@NonNull Context context) {
super.onAttach(context);
if (context instanceof OnFragmentInteractionListener) {
mListener = (OnFragmentInteractionListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement OnFragmentInteractionListener");
}
}
@Override
public void onDetach() {
super.onDetach();
mListener = null;
}
@Override
public void onDestroyView() {
super.onDestroyView();
readerLibrary.closeReader();
}
/**
* This interface must be implemented by activities that contain this
* fragment to allow an interaction in this fragment to be communicated
* to the activity and potentially other fragments contained in that
* activity.
* <p>
* See the Android Training lesson <a href=
* "http://developer.android.com/training/basics/fragments/communicating.html"
* >Communicating with Other Fragments</a> for more information.
*/
public interface OnFragmentInteractionListener {
// TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
}
}
package com.medicom.dudikov.mypaxsimulator;
import android.content.Context;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import com.medicom.dudikov.mypaxsimulator.Database.ParametersRepository;
import com.medicom.dudikov.mypaxsimulator.Database.ParametersTable;
/**
* A simple {@link Fragment} subclass.
* Activities that contain this fragment must implement the
* {@link FragmentBankBRI.OnFragmentInteractionListener} interface
* to handle interaction events.
* Use the {@link FragmentBankBRI#newInstance} factory method to
* create an instance of this fragment.
*/
public class FragmentBankBRI extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;
private OnFragmentInteractionListener mListener;
public FragmentBankBRI() {
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment FragmentBankBRI.
*/
// TODO: Rename and change types and number of parameters
public static FragmentBankBRI newInstance(String param1, String param2) {
FragmentBankBRI fragment = new FragmentBankBRI();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_bank_bri, container, false);
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
final EditText mMid = view.findViewById(R.id.edMid);
final EditText mTid = view.findViewById(R.id.edTid);
final EditText mProcode = view.findViewById(R.id.edProcode);
final EditText mBatch = view.findViewById(R.id.edBatch);
final EditText mReference = view.findViewById(R.id.edReference);
mMid.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("bri_mid", mMid.getText().toString()));
}
}
});
mTid.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("bri_tid", mTid.getText().toString()));
}
}
});
mProcode.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("bri_procode", mProcode.getText().toString()));
}
}
});
mBatch.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("bri_batch", mBatch.getText().toString()));
}
}
});
mReference.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("bri_reference", mReference.getText().toString()));
}
}
});
AsyncTask.execute(new Runnable() {
@Override
public void run() {
ParametersRepository Parameters = new ParametersRepository(getActivity());
final String mid = Parameters.findValue("bri_mid", "01234567");
final String tid = Parameters.findValue("bri_tid", "0123456789ABCDEF");
final String procode = Parameters.findValue("bri_procode", "012345");
final String batch = Parameters.findValue("bri_batch", "03");
final String reference = Parameters.findValue("bri_reference", "01");
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
mMid.setText(mid);
mTid.setText(tid);
mProcode.setText(procode);
mBatch.setText(batch);
mReference.setText(reference);
}
});
}
});
}
// TODO: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
}
@Override
public void onAttach(@NonNull Context context) {
super.onAttach(context);
if (context instanceof OnFragmentInteractionListener) {
mListener = (OnFragmentInteractionListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement OnFragmentInteractionListener");
}
}
@Override
public void onDetach() {
super.onDetach();
mListener = null;
}
/**
* This interface must be implemented by activities that contain this
* fragment to allow an interaction in this fragment to be communicated
* to the activity and potentially other fragments contained in that
* activity.
* <p>
* See the Android Training lesson <a href=
* "http://developer.android.com/training/basics/fragments/communicating.html"
* >Communicating with Other Fragments</a> for more information.
*/
public interface OnFragmentInteractionListener {
// TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
}
}
package com.medicom.dudikov.mypaxsimulator;
import android.content.Context;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import com.medicom.dudikov.mypaxsimulator.Database.ParametersRepository;
import com.medicom.dudikov.mypaxsimulator.Database.ParametersTable;
/**
* A simple {@link Fragment} subclass.
* Activities that contain this fragment must implement the
* {@link FragmentBankDKI.OnFragmentInteractionListener} interface
* to handle interaction events.
* Use the {@link FragmentBankDKI#newInstance} factory method to
* create an instance of this fragment.
*/
public class FragmentBankDKI extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;
private OnFragmentInteractionListener mListener;
private EditText mMid;
private EditText mTid;
private EditText mStanStart;
public FragmentBankDKI() {
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment FragmentBankDKI.
*/
// TODO: Rename and change types and number of parameters
public static FragmentBankDKI newInstance(String param1, String param2) {
FragmentBankDKI fragment = new FragmentBankDKI();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_bank_dki, container, false);
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mMid = view.findViewById(R.id.edMID);
mTid = view.findViewById(R.id.edTID);
mStanStart = view.findViewById(R.id.edStanStart);
mMid.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus){
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("dki_mid", mMid.getText().toString()));
}
}
});
mTid.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus){
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("dki_tid", mTid.getText().toString()));
}
}
});
mStanStart.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus){
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("dki_stan_start", mStanStart.getText().toString()));
}
}
});
AsyncTask.execute(new Runnable() {
@Override
public void run() {
ParametersRepository Parameters = new ParametersRepository(getActivity());
final String mid = Parameters.findValue("dki_mid", "000885000015999");
final String tid = Parameters.findValue("dki_tid", "ABC12345");
final String minBalance = Parameters.findValue("dki_stan_start", "0");
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
mMid.setText(mid);
mTid.setText(tid);
mStanStart.setText(minBalance);
}
});
}
});
}
// TODO: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
if (context instanceof OnFragmentInteractionListener) {
mListener = (OnFragmentInteractionListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement OnFragmentInteractionListener");
}
}
@Override
public void onDetach() {
super.onDetach();
mListener = null;
}
/**
* This interface must be implemented by activities that contain this
* fragment to allow an interaction in this fragment to be communicated
* to the activity and potentially other fragments contained in that
* activity.
* <p>
* See the Android Training lesson <a href=
* "http://developer.android.com/training/basics/fragments/communicating.html"
* >Communicating with Other Fragments</a> for more information.
*/
public interface OnFragmentInteractionListener {
// TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
}
}
package com.medicom.dudikov.mypaxsimulator;
import android.content.Context;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import com.medicom.dudikov.mybanklibrary.mandiriLib;
import com.medicom.dudikov.mypaxsimulator.Database.ParametersRepository;
import com.medicom.dudikov.mypaxsimulator.Database.ParametersTable;
import com.medicom.organicdrv.OrganicDriver;
import com.medicom.organicdrv.utilsLib;
import java.util.Objects;
/**
* A simple {@link Fragment} subclass.
* Activities that contain this fragment must implement the
* {@link FragmentBankMandiri.OnFragmentInteractionListener} interface
* to handle interaction events.
* Use the {@link FragmentBankMandiri#newInstance} factory method to
* create an instance of this fragment.
*/
public class FragmentBankMandiri extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;
private OnFragmentInteractionListener mListener;
private EditText mSamPin;
private EditText mMid;
private EditText mTid;
private EditText mKaPin;
private EditText mMactros;
private EditText mPuk;
public FragmentBankMandiri() {
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment FragmentBankMandiri.
*/
// TODO: Rename and change types and number of parameters
public static FragmentBankMandiri newInstance(String param1, String param2) {
FragmentBankMandiri fragment = new FragmentBankMandiri();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_bank_mandiri, container, false);
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mSamPin = view.findViewById(R.id.edSamPin);
mMid = view.findViewById(R.id.edMID);
mTid = view.findViewById(R.id.edTID);
mKaPin = view.findViewById(R.id.edKAPin);
mMactros = view.findViewById(R.id.edMactros);
mPuk = view.findViewById(R.id.edPuk);
Button mUnblockPIN = view.findViewById(R.id.btnUnblockPin);
mUnblockPIN.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
try {
mandiriLib mandiriLibrary = new mandiriLib();
int[] errorRst = new int[1];
mandiriLibrary.mandiriSetSamSlot(OrganicDriver.ORGANIC_SAM1);
byte[] bPin = utilsLib.HexStringToByteArray(mSamPin.getText().toString());
byte[] bPuk = utilsLib.HexStringToByteArray(mPuk.getText().toString());
mandiriLibrary.mandiriSamResetPin(false, bPuk, bPin, errorRst);
} catch (Exception e) {
e.printStackTrace();
}
}
});
mSamPin.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("mandiri_sam_pin", mSamPin.getText().toString()));
}
}
});
mMid.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("mandiri_mid", mMid.getText().toString()));
}
}
});
mTid.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("mandiri_tid", mTid.getText().toString()));
}
}
});
mKaPin.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("mandiri_ka_pin", mKaPin.getText().toString()));
}
}
});
mMactros.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("mandiri_mactros", mMactros.getText().toString()));
}
}
});
mPuk.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("mandiri_puk", mPuk.getText().toString()));
}
}
});
AsyncTask.execute(new Runnable() {
@Override
public void run() {
ParametersRepository Parameters = new ParametersRepository(getActivity());
final String samPin = Parameters.findValue("mandiri_sam_pin", "0123456789ABCDEF");
final String mid = Parameters.findValue("mandiri_mid", "0001");
final String tid = Parameters.findValue("mandiri_tid", "01234567");
final String kaPin = Parameters.findValue("mandiri_ka_pin", "0123456789ABCDEF");
final String mactros = Parameters.findValue("mandiri_mactros", "5566778800012222");
final String puk = Parameters.findValue("mandiri_puk", "0123456789ABCDEF");
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
@Override
public void run() {
mSamPin.setText(samPin);
mMid.setText(mid);
mTid.setText(tid);
mKaPin.setText(kaPin);
mMactros.setText(mactros);
mPuk.setText(puk);
}
});
}
});
}
// TODO: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
}
@Override
public void onAttach(@NonNull Context context) {
super.onAttach(context);
if (context instanceof OnFragmentInteractionListener) {
mListener = (OnFragmentInteractionListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement OnFragmentInteractionListener");
}
}
@Override
public void onDetach() {
super.onDetach();
mListener = null;
}
/**
* This interface must be implemented by activities that contain this
* fragment to allow an interaction in this fragment to be communicated
* to the activity and potentially other fragments contained in that
* activity.
* <p>
* See the Android Training lesson <a href=
* "http://developer.android.com/training/basics/fragments/communicating.html"
* >Communicating with Other Fragments</a> for more information.
*/
public interface OnFragmentInteractionListener {
// TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
}
}
package com.medicom.dudikov.mypaxsimulator;
import android.content.Context;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import com.medicom.dudikov.mybanklibrary.dataStructure.bniHistory;
import com.medicom.dudikov.mybanklibrary.dataStructure.briHistory;
import com.medicom.dudikov.mybanklibrary.dataStructure.configFlash;
import com.medicom.dudikov.mybanklibrary.dataStructure.mandiriHistory;
import com.medicom.dudikov.mybanklibrary.nativeLib;
import com.medicom.dudikov.mybanklibrary.readerLib;
import com.medicom.dudikov.mypaxsimulator.Database.ParametersRepository;
import com.medicom.organicdrv.OrganicDriver;
import com.medicom.organicdrv.utilsLib;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.Objects;
import static java.lang.String.format;
/**
* A simple {@link Fragment} subclass.
* Activities that contain this fragment must implement the
* {@link FragmentBasic.OnFragmentInteractionListener} interface
* to handle interaction events.
* Use the {@link FragmentBasic#newInstance} factory method to
* create an instance of this fragment.
*/
//public class FragmentBasic extends Fragment implements NfcAdapter.ReaderCallback {
public class FragmentBasic extends Fragment {
private final String TAG = "Basic Fragment";
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
//private final int COMMAND_NONE = 0;
//private final int COMMAND_BALANCE = 1;
//private final int COMMAND_DEDUCT = 2;
private final int DEFAULT_TIMEOUT = 5000;
// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;
private OnFragmentInteractionListener mListener;
private readerLib myReader;
private int idxDriver;
private Button mGetBalance;
private Button mDeduct;
private Button mGetReport;
private Button mWriteMime;
private Button mReadMime;
private Button mResetPartial;
private Button mDetectApplet;
private Button mTransHist;
TextView mEnggineVersion;
private TextView mOpsResult;
private ProgressBar mProgress;
private EditText mDeductValue;
private EditText mMimeData;
private TextView mMimeRead;
public FragmentBasic() {
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment FragmentBasic.
*/
// TODO: Rename and change types and number of parameters
public static FragmentBasic newInstance(String param1, String param2) {
FragmentBasic fragment = new FragmentBasic();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_basic, container, false);
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mGetBalance = view.findViewById(R.id.btnGetBalance);
mDeduct = view.findViewById(R.id.btnDeduct);
mGetReport = view.findViewById(R.id.btnGetReportMandiri);
mWriteMime = view.findViewById(R.id.btnWriteMime);
mReadMime = view.findViewById(R.id.btnReadMime);
mResetPartial = view.findViewById(R.id.btnResetPartial);
mDetectApplet = view.findViewById(R.id.btnDetectApplet);
mTransHist = view.findViewById(R.id.btnTransactionHist);
mGetBalance.setEnabled(false);
mDeduct.setEnabled(false);
mGetReport.setEnabled(false);
mWriteMime.setEnabled(false);
mReadMime.setEnabled(false);
mResetPartial.setEnabled(false);
mDetectApplet.setEnabled(false);
mTransHist.setEnabled(false);
mEnggineVersion = view.findViewById(R.id.tvEnggineVersion);
mDeductValue = view.findViewById(R.id.edDeductValue);
mMimeData = view.findViewById(R.id.edMimeWrite);
mMimeRead = view.findViewById(R.id.tvMimeRead);
mOpsResult = view.findViewById(R.id.tvOpsResult);
mProgress = view.findViewById(R.id.pbProcess);
mProgress.setVisibility(View.GONE);
Bundle bundle = getArguments();
if (bundle != null) {
idxDriver = bundle.getInt("ENGGINE_USE");
}
if (idxDriver != nativeLib.USE_NFC_NATIVE) {
mGetBalance.setOnClickListener(v -> doGetBalance());
mDeduct.setOnClickListener(v -> doDeduct());
mResetPartial.setOnClickListener(v -> doResetPartial());
mGetReport.setOnClickListener(v -> doGetReport());
mWriteMime.setOnClickListener(v -> doWriteMime());
mReadMime.setOnClickListener(view1 -> doReadMime());
mTransHist.setOnClickListener(v -> doTransactionHistory());
mDetectApplet.setOnClickListener(v -> {
int[] bankType = new int[20];
byte[] totalApplet = new byte[1];
try {
myReader.readerDetectApplet(OrganicDriver.ORGANIC_SAM1, bankType, totalApplet);
} catch (Exception e) {
e.printStackTrace();
}
if (totalApplet[0] > 0) {
StringBuilder strBank = new StringBuilder();
for (int i = 0; i < totalApplet[0]; i++) {
strBank.append(format("%s,", translateBankCode(bankType[i])));
}
mOpsResult.setText(strBank.toString());
}
});
}
new Thread() {
@Override
public void run() {
initEnggine();
}
}.start();
// AsyncTask.execute(new Runnable() {
// @Override
// public void run() {
// initEnggine();
// }
// });
}
private void initEnggine() {
ParametersRepository Parameters = new ParametersRepository(getActivity());
final String certDebugRespons = Parameters.findValue("cert_debug_respons", "");
//getService(getActivity());
//MposHandler handler = MposHandler.getInstance(this);
//settings = Settings.getInstance(handler);
try {
myReader = new readerLib(getActivity(), true, idxDriver);
myReader.activateDebug(getActivity(), certDebugRespons);
configFlash flash = null;
if (myReader.readerFlashAvail()) {
int[] blockSize = new int[1];
int[] blockCnt = new int[1];
int[] version = new int[1];
myReader.readerFlashInfo(blockSize, blockCnt, version);
int blockNr = blockCnt[0] - 1;
int[] blockIdx = new int[1];
int[] blockLen = new int[1];
myReader.readerFlashBlockInfo(blockNr, blockIdx, blockLen);
byte[] data = new byte[blockSize[0]];
myReader.readerFlashReadBlock(blockNr, data);
flash = new configFlash(blockSize[0], blockCnt[0], version[0], blockNr, data);
Log.d(TAG, flash.getSign());
Log.d(TAG, utilsLib.ByteArrayToHexString(flash.getMandiriPin()));
Log.d(TAG, utilsLib.ByteArrayToHexString(flash.getMandiriTid()));
Log.d(TAG, utilsLib.ByteArrayToHexString(flash.getMandiriMid()));
Log.d(TAG, utilsLib.ByteArrayToHexString(flash.getMandiriMactos()));
}
if (myReader.mandiriEnabled()) {
String samPin = Parameters.findValue("mandiri_sam_pin", "");
String mid = Parameters.findValue("mandiri_mid", "");
String tid = Parameters.findValue("mandiri_tid", "");
/*String kaPin = Parameters.findValue("mandiri_ka_pin", "");
String mactros = Parameters.findValue("mandiri_mactros", "");*/
byte[] bpin = utilsLib.HexStringToByteArray(samPin);
byte[] bmid = utilsLib.HexStringToByteArray(mid);
byte[] btid = utilsLib.HexStringToByteArray(tid);
myReader.mandiriDeductSetConfig(bpin, bmid, btid);
myReader.readerMandiriSetSamSlot(OrganicDriver.ORGANIC_SAM1);
myReader.readerMandiriEnableFastDeduct();
}
if (myReader.bcaEnabled()) {
String bcamid = Parameters.findValue("bca_mid", "");
String bcatid = Parameters.findValue("bca_tid", "");
int bcaMinBalance = Integer.parseInt(Parameters.findValue("bca_min_balance", "0"));
myReader.readerBcaSetSamSlot(OrganicDriver.ORGANIC_SAM1);
String[] strlogRsp = new String[1];
myReader.bcaSetConfig(bcamid, bcatid, bcaMinBalance, strlogRsp);
Log.d(TAG, myReader.bcaGetConfig());
}
if (myReader.bniEnabled()) {
byte[] merriedCode = utilsLib.HexStringToByteArray(Parameters.findValue("bni_merried", ""));
byte[] bniTid = utilsLib.HexStringToByteArray(Parameters.findValue("bni_tid", ""));
myReader.bniSetConfig(merriedCode, bniTid);
myReader.readerBniSetSamSlot(OrganicDriver.ORGANIC_SAM1);//Default ORGANIC_SAM1
}
if (myReader.briEnabled()) {
byte[] brimid = utilsLib.HexStringToByteArray(Parameters.findValue("bri_mid", ""));
byte[] britid = utilsLib.HexStringToByteArray(Parameters.findValue("bri_tid", ""));
byte[] briprocode = utilsLib.HexStringToByteArray(Parameters.findValue("bri_procode", "012345"));
int batch = Integer.parseInt(Parameters.findValue("bri_batch", "03"));
int reference = Integer.parseInt(Parameters.findValue("bri_reference", "1"));
myReader.briSetConfig(brimid, britid, briprocode, (byte) batch, reference);
myReader.readerBriSetSamSlot(OrganicDriver.ORGANIC_SAM1);
}
if (myReader.dkiEnabled()) {
byte[] dkimid = Parameters.findValue("dki_mid", "").getBytes();
byte[] dkitid = Parameters.findValue("dki_tid", "").getBytes();
int reff = Integer.parseInt(Parameters.findValue("dki_stan_start", "0"));
myReader.readerDkiSetSamSlot(OrganicDriver.ORGANIC_SAM2);
myReader.dkiSetDevMode(true);
myReader.dkiSetConfig(dkimid, dkitid, (byte) reff);
}
if (myReader.nobuEnabled()) {
myReader.readerNobuSetSamSlot(OrganicDriver.ORGANIC_SAM1);
}
if (myReader.iconoxEnabled()) {
myReader.readerNobuSetSamSlot(OrganicDriver.ORGANIC_SAM1);
}
myReader.enableMifareClassicBaseCard(true);
//int[][] bankType={new int[10]};
//myReader.readerDetectApplet(bankType);
requireActivity().runOnUiThread(() -> {
mGetBalance.setEnabled(true);
mDeduct.setEnabled(true);
mGetReport.setEnabled(true);
mWriteMime.setEnabled(true);
mReadMime.setEnabled(true);
mResetPartial.setEnabled(true);
mDetectApplet.setEnabled(true);
mTransHist.setEnabled(true);
//String strVersion = String.format("[SN:%s]][libBCA %s]", myReader.getDeviceSN(), myReader.bcaGetVersionDll());
String strVersion = String.format("[SN:%s]\n[libBCA %s]", myReader.getDeviceSN(), myReader.bcaGetVersionDll());
mEnggineVersion.setText(strVersion);
});
} catch (Exception e) {
e.printStackTrace();
final String msg = e.getMessage();
requireActivity().runOnUiThread(() -> mOpsResult.setText(msg));
}
}
private synchronized void doResetPartial() {
myReader.resetPartialTransaction();
}
private void doTransactionHistory() {
mProgress.setVisibility(View.VISIBLE);
mOpsResult.setText(R.string.strBlank);
AsyncTask.execute(() -> {
byte[] uid = new byte[16];
byte[] uidLen = new byte[1];
int[] cardType = new int[1];
int[] bankType = new int[1];
final int[] errorCode = new int[1];
String[] cardNumber = new String[1];
String[] TransHist = new String[1];
Date date = new Date();
String StrDate = new SimpleDateFormat("yyyyMMddHHmmss", Locale.getDefault()).format(date);
cardType[0] = OrganicDriver.CARDTYPE_UNKNOWN;
if (myReader.findCard(DEFAULT_TIMEOUT, uid, uidLen, cardType)) {
try {
if (myReader.readerTransactionHistory(cardType[0], StrDate, bankType, cardNumber, TransHist, errorCode)) {
myReader.beep();
if (bankType[0] == readerLib.PROTOCOL_BANK_BRI_DESFIRE) {
briHistory mBriHistory = new briHistory(TransHist[0]);
Log.d(TAG, format("Total Log:%d", mBriHistory.getRecordSize()));
Log.d(TAG, "no\tmid\t\t\t\t\ttid\t\tdate\t\ttype\tamount\tbal before\tbal after\n");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss", Locale.getDefault());
for (int i = 0; i < mBriHistory.getRecordSize(); i++) {
Log.d(TAG, format("%02d\t%s\t\t%s\t\t%s\t\t%02X\t%,d\t%,d\t%,d\n",
i,
mBriHistory.mid(i),
mBriHistory.tid(i),
sdf.format(mBriHistory.transDate(i).getTime()),
mBriHistory.transType(i),
mBriHistory.amount(i),
mBriHistory.balanceBefore(i),
mBriHistory.balanceAfter(i)
));
}
} else if ((bankType[0] == readerLib.PROTOCOL_BANK_MANDIRI) || (bankType[0] == readerLib.PROTOCOL_BANK_MANDIRI_NEWAPPLET)) {
mandiriHistory mMandiriHistory = new mandiriHistory(TransHist[0]);
Log.d(TAG, format("Total Log:%d", mMandiriHistory.getRecordSize()));
Log.d(TAG, "no\tdate\t\t\t\t\ttid\t\tcounter\t\ttype\tamount\tbalance\n");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss", Locale.getDefault());
for (int i = 0; i < mMandiriHistory.getRecordSize(); i++) {
Log.d(TAG, format("%02d\t%s\t\t%s\t\t%,d\t\t%04X\t%,d\t%,d\n",
i,
sdf.format(mMandiriHistory.transDate(i).getTime()),
mMandiriHistory.tid(i),
mMandiriHistory.counter(i),
mMandiriHistory.transType(i),
mMandiriHistory.amount(i),
mMandiriHistory.balance(i)
));
}
} else if (bankType[0] == readerLib.PROTOCOL_BANK_BNI) {
bniHistory mbniHistory = new bniHistory(TransHist[0]);
Log.d(TAG, format("Total Log:%d", mbniHistory.getRecordSize()));
Log.d(TAG, "no\ttype\tamount\t\tdate\n");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss", Locale.getDefault());
for (int i = 0; i < mbniHistory.getRecordSize(); i++) {
Log.d(TAG, format("%02d\t%02X\t%,d\t\t%s\n",
i,
mbniHistory.transType(i),
mbniHistory.amount(i),
sdf.format(mbniHistory.transDate(i).getTime())
));
}
}
requireActivity().runOnUiThread(() -> {
mProgress.setVisibility(View.GONE);
mOpsResult.setText(R.string.strSuccess);
});
} else {
requireActivity().runOnUiThread(() -> {
mProgress.setVisibility(View.GONE);
mOpsResult.setText(R.string.strFailed);
});
}
} catch (Exception e) {
e.printStackTrace();
}
} else {
requireActivity().runOnUiThread(() -> {
mOpsResult.setText(format(Locale.getDefault(), "Timeout %04X", errorCode[0]));
mProgress.setVisibility(View.GONE);
});
}
});
}
private synchronized void doReadMime() {
mProgress.setVisibility(View.VISIBLE);
mOpsResult.setText(R.string.strBlank);
AsyncTask.execute(() -> {
byte[] uid = new byte[16];
byte[] uidLen = new byte[1];
int[] cardType = new int[1];
int[] bankType = new int[1];
final int[] errorCode = new int[1];
final byte[] data = new byte[16];
cardType[0] = OrganicDriver.CARDTYPE_UNKNOWN;
if (myReader.findCard(DEFAULT_TIMEOUT, uid, uidLen, cardType)) {
try {
if (myReader.readerReadMime(cardType[0], readerLib.FILE_NO1, (byte) 0x00, bankType, data, errorCode)) {
myReader.beep();
requireActivity().runOnUiThread(() -> {
mProgress.setVisibility(View.GONE);
mMimeRead.setText(new String(data));
mOpsResult.setText(R.string.strSuccess);
});
} else {
requireActivity().runOnUiThread(() -> {
mOpsResult.setText(format(Locale.getDefault(), "Failed \nError:%04X ", errorCode[0]));
mProgress.setVisibility(View.GONE);
});
}
} catch (Exception e) {
e.printStackTrace();
}
try {
myReader.readerClDisconnect();
} catch (Exception e) {
e.printStackTrace();
}
} else {
requireActivity().runOnUiThread(() -> {
mOpsResult.setText(R.string.strTimeout);
mProgress.setVisibility(View.GONE);
});
}
});
}
private synchronized void doWriteMime() {
mProgress.setVisibility(View.VISIBLE);
mOpsResult.setText(R.string.strBlank);
if (mMimeData.getText().toString().length() > 0) {
AsyncTask.execute(() -> {
byte[] uid = new byte[16];
byte[] uidLen = new byte[1];
int[] cardType = new int[1];
int[] bankType = new int[1];
final int[] errorCode = new int[1];
byte[] data = mMimeData.getText().toString().getBytes();
cardType[0] = OrganicDriver.CARDTYPE_UNKNOWN;
if (myReader.findCard(DEFAULT_TIMEOUT, uid, uidLen, cardType)) {
try {
if (myReader.readerWriteMime(cardType[0], readerLib.FILE_NO1, (byte) 0x00, bankType, data, errorCode)) {
myReader.beep();
requireActivity().runOnUiThread(() -> {
mOpsResult.setText(R.string.strSuccess);
mProgress.setVisibility(View.GONE);
});
} else {
requireActivity().runOnUiThread(() -> {
mOpsResult.setText(format(Locale.getDefault(), "Failed \nError:%04X ", errorCode[0]));
mProgress.setVisibility(View.GONE);
});
}
} catch (Exception e) {
e.printStackTrace();
}
try {
myReader.readerClDisconnect();
} catch (Exception e) {
e.printStackTrace();
}
} else {
requireActivity().runOnUiThread(() -> {
mOpsResult.setText(R.string.strTimeout);
mProgress.setVisibility(View.GONE);
});
}
});
}
}
private synchronized void doGetReport() {
mProgress.setVisibility(View.VISIBLE);
mOpsResult.setText(R.string.strBlank);
AsyncTask.execute(() -> {
String[] report = new String[1];
final int[] balance = new int[1];
final int[] errorCode = new int[1];
if (myReader.getReportMandiri(report, balance, errorCode)) {
myReader.beep();
requireActivity().runOnUiThread(() -> {
mOpsResult.setText(format(Locale.getDefault(), "Success \nBalance:%d ", balance[0]));
mProgress.setVisibility(View.GONE);
});
} else {
requireActivity().runOnUiThread(() -> {
mOpsResult.setText(format(Locale.getDefault(), "Failed \nError:%04X ", errorCode[0]));
mProgress.setVisibility(View.GONE);
});
}
});
}
private synchronized void doDeduct() {
mProgress.setVisibility(View.VISIBLE);
mOpsResult.setText(R.string.strBlank);
AsyncTask.execute(() -> {
byte[] uid = new byte[16];
byte[] uidLen = new byte[1];
int[] cardType = new int[1];
final int[] bankType = new int[1];
final int[] balance = new int[1];
final String[] cardNumber = new String[1];
final String[] report = new String[1];
final int[] errorCode = new int[1];
Date date = new Date();
String StrDate = new SimpleDateFormat("yyyyMMddHHmmss", Locale.getDefault()).format(date);
myReader.ledClrIdle();
myReader.ledSetBusy();
myReader.ledClrOk();
myReader.ledClrError();
byte deductMode = readerLib.DEDUCT_SIMULATE_NORMAL;
cardType[0] = OrganicDriver.CARDTYPE_UNKNOWN;
if (myReader.findCard(DEFAULT_TIMEOUT, uid, uidLen, cardType)) {
final long start = System.currentTimeMillis();
requireActivity().runOnUiThread(() -> mOpsResult.setText(R.string.strProcessing));
try {
int value = Integer.parseInt(mDeductValue.getText().toString());
if (myReader.readerDeduct(cardType[0], StrDate, value, bankType, balance, cardNumber, report, errorCode, deductMode)) {
final long stop = System.currentTimeMillis();
myReader.beep();
myReader.ledClrBusy();
myReader.ledSetIdle();
myReader.ledSetOk();
getActivity().runOnUiThread(() -> {
Log.d(TAG, "Report:" + report[0]);
mOpsResult.setText(format(Locale.getDefault(), "Success %s-%s\nBalance %,d \n%,d mS", translateBankCode(bankType[0]), cardNumber[0], balance[0], stop - start));
mProgress.setVisibility(View.GONE);
});
} else {
myReader.ledClrBusy();
myReader.ledSetIdle();
myReader.ledSetError();
getActivity().runOnUiThread(() -> {
mOpsResult.setText(format(Locale.getDefault(), "Failed \n%s, Error:%04X", translateBankCode(bankType[0]), errorCode[0]));
mProgress.setVisibility(View.GONE);
});
}
} catch (final Exception e) {
e.printStackTrace();
final String message = e.getMessage();
getActivity().runOnUiThread(() -> {
mOpsResult.setText(format(Locale.getDefault(), "Failed %s\n%04X", message, errorCode[0]));
mProgress.setVisibility(View.GONE);
});
}
} else {
myReader.ledClrBusy();
myReader.ledSetIdle();
requireActivity().runOnUiThread(() -> {
mOpsResult.setText(R.string.strTimeout);
mProgress.setVisibility(View.GONE);
});
}
});
}
private String translateBankCode(int bankCode) {
String strBank = "Unknown";
switch (bankCode) {
case readerLib.PROTOCOL_BANK_MANDIRI:
strBank = "MANDIRI OLD APPLET";
break;
case (readerLib.PROTOCOL_BANK_MANDIRI_NEWAPPLET):
strBank = "MANDIRI NEW APPLET";
break;
case (readerLib.PROTOCOL_BANK_MANDIRI_CARD):
strBank = "MANDIRI EMONEY";
break;
case (readerLib.PROTOCOL_BANK_MANDIRI_OFFLINE_KAOLD):
strBank = "MANDIRI OFF-OLD";
break;
case (readerLib.PROTOCOL_BANK_MANDIRI_OFFLINE_KANEW):
strBank = "MANDIRI OFF-NEW";
break;
case readerLib.PROTOCOL_BANK_BCA:
strBank = "BCA";
break;
case readerLib.PROTOCOL_BANK_BNI:
strBank = "BNI";
break;
case readerLib.PROTOCOL_BANK_BNI_CARD:
strBank = "BNI TAPCASH";
break;
case readerLib.PROTOCOL_BANK_BRI_DESFIRE:
strBank = "BRI";
break;
case readerLib.PROTOCOL_BANK_DKI:
strBank = "DKI-OLD";
break;
case readerLib.PROTOCOL_BANK_DKI_NEW:
strBank = "DKI-NEW";
break;
case readerLib.PROTOCOL_BANK_ICONOX:
strBank = "ICONOX";
case readerLib.PROTOCOL_BANK_NOBU:
strBank = "NOBU";
break;
case readerLib.PROTOCOL_BANK_UNKNOWN:
strBank = "UNKNOWN";
break;
}
return strBank;
}
private void getbalance() throws Exception {
byte[] uid = new byte[16];
byte[] uidLen = new byte[1];
int[] cardType = new int[1];
myReader.ledClrIdle();
myReader.ledSetBusy();
myReader.ledClrOk();
myReader.ledClrError();
cardType[0] = OrganicDriver.CARDTYPE_UNKNOWN;
if (myReader.findCard(DEFAULT_TIMEOUT, uid, uidLen, cardType)) {
final long start = System.currentTimeMillis();
requireActivity().runOnUiThread(() -> mOpsResult.setText(R.string.strProcessing));
final int[] bankType = new int[1];
final int[] balance = new int[1];
final String[] cardNumber = new String[1];
final int[] errorCode = new int[1];
Date date = new Date();
String StrDate = new SimpleDateFormat("yyyyMMddHHmmss", Locale.getDefault()).format(date);
try {
if (myReader.readerGetBalance(cardType[0], StrDate, bankType, balance, cardNumber, errorCode)) {
final long stop = System.currentTimeMillis();
myReader.beep();
myReader.ledClrBusy();
myReader.ledSetIdle();
myReader.ledSetOk();
getActivity().runOnUiThread(() -> {
mOpsResult.setText(format(Locale.getDefault(), "Success %s-%s\nBalance %,d \n%,d mS", translateBankCode(bankType[0]), cardNumber[0], balance[0], stop - start));
mProgress.setVisibility(View.GONE);
});
} else {
myReader.ledClrBusy();
myReader.ledSetIdle();
myReader.ledSetError();
getActivity().runOnUiThread(() -> {
mOpsResult.setText(format(Locale.getDefault(), "Failed \n%s\nError:%04X", translateBankCode(bankType[0]), errorCode[0]));
mProgress.setVisibility(View.GONE);
});
}
} catch (Exception e) {
e.printStackTrace();
}
myReader.readerClDisconnect();
} else {
myReader.ledClrBusy();
myReader.ledSetIdle();
requireActivity().runOnUiThread(() -> {
mOpsResult.setText(R.string.strTimeout);
mProgress.setVisibility(View.GONE);
});
}
}
private synchronized void doGetBalance() {
mProgress.setVisibility(View.VISIBLE);
mOpsResult.setText(R.string.strBlank);
new Thread() {
@Override
public void run() {
try {
getbalance();
} catch (Exception e) {
e.printStackTrace();
}
}
}.start();
// AsyncTask.execute(new Runnable() {
// @Override
// public void run() {
// getbalance();
// }
// });
}
// TODO: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
}
@Override
public void onAttach(@NonNull Context context) {
super.onAttach(context);
if (context instanceof OnFragmentInteractionListener) {
mListener = (OnFragmentInteractionListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement OnFragmentInteractionListener");
}
// enableReaderMode();
}
@Override
public void onDetach() {
super.onDetach();
mListener = null;
}
@Override
public void onDestroyView() {
super.onDestroyView();
myReader.closeReader();
}
/**
* This interface must be implemented by activities that contain this
* fragment to allow an interaction in this fragment to be communicated
* to the activity and potentially other fragments contained in that
* activity.
* <p>
* See the Android Training lesson <a href=
* "http://developer.android.com/training/basics/fragments/communicating.html"
* >Communicating with Other Fragments</a> for more information.
*/
public interface OnFragmentInteractionListener {
// TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
}
}
package com.medicom.dudikov.mypaxsimulator;
import android.Manifest;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.*;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import com.google.gson.Gson;
import com.mdd.aar.deviceid.AarDeviceId;
import com.mdd.aar.deviceid.DeviceEnvironment;
import com.mdd.aar.deviceid.http.responses.UnlockAarResponse;
import com.medicom.dudikov.mybanklibrary.nativeLib;
import com.medicom.dudikov.mypaxsimulator.Database.ParametersRepository;
import com.medicom.dudikov.mypaxsimulator.Database.ParametersTable;
import com.medicom.sunmilibrary.SunmiDriver;
import com.medicom.sunmilibrary.utils.BitmapUtil;
import com.medicom.sunmilibrary.utils.SunmiPrintHelper;
import com.sunmi.peripheral.printer.SunmiPrinterService;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Objects;
import java.util.Random;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import static com.medicom.organicdrv.utilsLib.HexStringToByteArray;
/**
* A simple {@link Fragment} subclass.
* Activities that contain this fragment must implement the
* {@link FragmentGeneral.OnFragmentInteractionListener} interface
* to handle interaction events.
* Use the {@link FragmentGeneral#newInstance} factory method to
* create an instance of this fragment.
*/
public class FragmentGeneral extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
private static final int REQUEST_READ_PHONE_STATE = 1;
// TODO: Rename and change types of parameters
/*private String mParam1;
private String mParam2;*/
private OnFragmentInteractionListener mListener;
private Spinner mEdcDriver;
private Button mSetRandom;
private TextView mDebugEnableToken;
private TextView mExpirityDate;
private TextView mEnggineVersion;
private CheckBox mandiriEnable;
private CheckBox bniEnable;
private CheckBox briEnable;
private CheckBox bcaEnable;
private CheckBox dkiEnable;
private CheckBox nobuEnable;
private CheckBox iconoxEnable;
private CheckBox mddEnable;
private CheckBox loketEnable;
private CheckBox megaEnable;
private CheckBox mdebugEnable;
private CheckBox mandiriTopOffEnable;
private CheckBox mandiriC2CEnable;
private CheckBox mandiriApiEnable;
private CheckBox bniC2CEnable;
private CheckBox bniApiEnable;
private CheckBox briApiEnable;
private EditText mDebugRespons;
private nativeLib nativeLibrary;
private String debugToken;
public FragmentGeneral() {
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment FragmentGeneral.
*/
// TODO: Rename and change types and number of parameters
public static FragmentGeneral newInstance(String param1, String param2) {
FragmentGeneral fragment = new FragmentGeneral();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
/*if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}*/
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_general, container, false);
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mEdcDriver = view.findViewById(R.id.spEnggineUsed);
mSetRandom = view.findViewById(R.id.btnSetRandom);
mDebugEnableToken = view.findViewById(R.id.edDebugEnableToken);
Button mCopyDebugToken = view.findViewById(R.id.btnCopyDebugToken);
mExpirityDate = view.findViewById(R.id.tvDebugExpirity);
mEnggineVersion = view.findViewById(R.id.tvEnggineVersion);
mandiriEnable = view.findViewById(R.id.cbMandiriEnable);
bniEnable = view.findViewById(R.id.cbBNIEnable);
briEnable = view.findViewById(R.id.cbBRIEnable);
bcaEnable = view.findViewById(R.id.cbBCAEnable);
dkiEnable = view.findViewById(R.id.cbDKIEnable);
nobuEnable = view.findViewById(R.id.cbNobu);
iconoxEnable = view.findViewById(R.id.cbIconoxEnable);
mddEnable = view.findViewById(R.id.cbMDDSingletrip);
loketEnable = view.findViewById(R.id.cbLoketTimezoneEnable);
megaEnable = view.findViewById(R.id.cbMegaEnable);
mandiriTopOffEnable = view.findViewById(R.id.cbMandiriTopOff);
mandiriC2CEnable = view.findViewById(R.id.cbMandiriC2C);
mandiriApiEnable = view.findViewById(R.id.cbMandiriApi);
bniC2CEnable = view.findViewById(R.id.cbBNIC2C);
bniApiEnable = view.findViewById(R.id.cbBNIApi);
briApiEnable = view.findViewById(R.id.cbBRIAPI);
mdebugEnable = view.findViewById(R.id.cbDebugEnable);
mDebugRespons = view.findViewById(R.id.edCertDebugToken);
Button mPasteDebugRespons = view.findViewById(R.id.btnPasteDebugRespons);
Button btnTestPrint = view.findViewById(R.id.btnTestPrint);
mDebugEnableToken.setShowSoftInputOnFocus(false);
mSetRandom.setOnClickListener(v -> {
nativeLibrary.setRandom("0123456789AB0123456789AB");
loadData();
});
mPasteDebugRespons.setOnClickListener(v -> {
ClipboardManager clipboard = (ClipboardManager) Objects.requireNonNull(getActivity()).getSystemService(Context.CLIPBOARD_SERVICE);
assert clipboard != null;
ClipData.Item item = Objects.requireNonNull(clipboard.getPrimaryClip()).getItemAt(0);
mDebugRespons.setText(item.getText().toString());
AsyncTask.execute(() -> {
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("cert_debug_respons", mDebugRespons.getText().toString()));
try {
nativeLibrary.activateDebug(getActivity(), mDebugRespons.getText().toString());
} catch (Exception e) {
e.printStackTrace();
}
getActivity().runOnUiThread(() -> {
mExpirityDate.setText(nativeLibrary.getExpirityDateJNI());
mandiriEnable.setChecked(nativeLibrary.isMandiriEnabledJNI());
bniEnable.setChecked(nativeLibrary.isBNIEnabledJNI());
briEnable.setChecked(nativeLibrary.isBRIEnabledJNI());
bcaEnable.setChecked(nativeLibrary.isBCAEnabledJNI());
dkiEnable.setChecked(nativeLibrary.isDKIEnabledJNI());
nobuEnable.setChecked(nativeLibrary.isNOBUEnabledJNI());
iconoxEnable.setChecked(nativeLibrary.isICONOXEnabledJNI());
mddEnable.setChecked(nativeLibrary.isMDDEnabledJNI());
mandiriTopOffEnable.setChecked(nativeLibrary.isMandiriTopOffEnabledJNI());
mandiriC2CEnable.setChecked(nativeLibrary.isMandiriC2CEnabledJNI());
mandiriApiEnable.setChecked(nativeLibrary.isMandiriApiEnabledJNI());
bniApiEnable.setChecked(nativeLibrary.isBNIApiEnabledJNI());
bniC2CEnable.setChecked(nativeLibrary.isBNIC2CEnabledJNI());
briApiEnable.setChecked(nativeLibrary.isBRIApiEnabledJNI());
mdebugEnable.setChecked(nativeLibrary.isDebugerEnable());
loketEnable.setChecked(nativeLibrary.isLoketEnabledJNI());
megaEnable.setChecked(nativeLibrary.isMEGAEnabledJNI());
});
});
});
mCopyDebugToken.setOnClickListener(v -> {
ClipboardManager clipboard = (ClipboardManager) requireActivity().getSystemService(Context.CLIPBOARD_SERVICE);
ClipData clip = ClipData.newPlainText("DEBUG_TOKEN", mDebugEnableToken.getText().toString());
assert clipboard != null;
clipboard.setPrimaryClip(clip);
});
final ArrayList<String> availableDriver = new ArrayList<>();
availableDriver.add("Android NFC Native 1.00");
availableDriver.add("PAX PaxNeptuneLiteApi_V2.01");
availableDriver.add("Wepoy SDK4BaseBinderV2.0");
availableDriver.add("Z91 POS2.8.8.180524");
availableDriver.add("SunMi PayLib 1.0.49");
availableDriver.add("Verifone 1.1.1");
availableDriver.add("Ingenico usdk_api_aidl_v1.0.8.2017070501");
availableDriver.add("PAX D130 External Reader");
ArrayAdapter<String> dataAdapter_availableDriver = new ArrayAdapter<>(requireActivity(),
android.R.layout.simple_spinner_item, availableDriver);
dataAdapter_availableDriver.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
mEdcDriver.setAdapter(dataAdapter_availableDriver);
mEdcDriver.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, final int position, long id) {
AsyncTask.execute(() -> {
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("idx_driver", String.valueOf(position)));
Bundle gateInArg = new Bundle();
gateInArg.putInt("ENGGINE_USE", position);
});
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
/*int permissionCheck;
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {
permissionCheck = getActivity().checkSelfPermission(Manifest.permission.READ_PHONE_STATE);
if (permissionCheck != PackageManager.PERMISSION_GRANTED) {
getActivity().requestPermissions(new String[]{Manifest.permission.READ_PHONE_STATE}, REQUEST_READ_PHONE_STATE);
} else {
loadData();
}
} else {
loadData();
}*/
loadData();
}
private void activateAar() {
AsyncTask.execute(() -> {
ParametersRepository Parameters = new ParametersRepository(getActivity());
Parameters.insert(new ParametersTable("cert_debug_respons", mDebugRespons.getText().toString()));
try {
nativeLibrary.activateDebug(getActivity(), mDebugRespons.getText().toString());
} catch (Exception e) {
e.printStackTrace();
}
getActivity().runOnUiThread(() -> {
mExpirityDate.setText(nativeLibrary.getExpirityDateJNI());
mandiriEnable.setChecked(nativeLibrary.isMandiriEnabledJNI());
bniEnable.setChecked(nativeLibrary.isBNIEnabledJNI());
briEnable.setChecked(nativeLibrary.isBRIEnabledJNI());
bcaEnable.setChecked(nativeLibrary.isBCAEnabledJNI());
dkiEnable.setChecked(nativeLibrary.isDKIEnabledJNI());
nobuEnable.setChecked(nativeLibrary.isNOBUEnabledJNI());
iconoxEnable.setChecked(nativeLibrary.isICONOXEnabledJNI());
mddEnable.setChecked(nativeLibrary.isMDDEnabledJNI());
mandiriTopOffEnable.setChecked(nativeLibrary.isMandiriTopOffEnabledJNI());
mandiriC2CEnable.setChecked(nativeLibrary.isMandiriC2CEnabledJNI());
mandiriApiEnable.setChecked(nativeLibrary.isMandiriApiEnabledJNI());
bniApiEnable.setChecked(nativeLibrary.isBNIApiEnabledJNI());
bniC2CEnable.setChecked(nativeLibrary.isBNIC2CEnabledJNI());
briApiEnable.setChecked(nativeLibrary.isBRIApiEnabledJNI());
mdebugEnable.setChecked(nativeLibrary.isDebugerEnable());
loketEnable.setChecked(nativeLibrary.isLoketEnabledJNI());
megaEnable.setChecked(nativeLibrary.isMEGAEnabledJNI());
});
});
}
private void loadData() {
AsyncTask.execute(() -> {
debugToken = "";
ParametersRepository Parameters = new ParametersRepository(getActivity());
final int idxDriver = Integer.parseInt(Parameters.findValue("idx_driver", "0"));
final String certDebugRespons = Parameters.findValue("cert_debug_respons", "");
try {
nativeLibrary = new nativeLib(getActivity(), 0xFF);
debugToken = nativeLibrary.generateDebugCert();
nativeLibrary.activateDebug(getActivity(), certDebugRespons);
} catch (Exception e) {
e.printStackTrace();
}
final String finalDebugToken = debugToken;
requireActivity().runOnUiThread(() -> {
mDebugEnableToken.setText(finalDebugToken);
mEnggineVersion.setText(nativeLib.Version);
if (idxDriver < mEdcDriver.getCount())
mEdcDriver.setSelection(idxDriver);
else
mEdcDriver.setSelection(0);
mDebugRespons.setText(certDebugRespons);
if (nativeLibrary.getExpirityDateJNI() != null) {
mExpirityDate.setText(nativeLibrary.getExpirityDateJNI());
mandiriEnable.setChecked(nativeLibrary.isMandiriEnabledJNI());
bniEnable.setChecked(nativeLibrary.isBNIEnabledJNI());
briEnable.setChecked(nativeLibrary.isBRIEnabledJNI());
bcaEnable.setChecked(nativeLibrary.isBCAEnabledJNI());
dkiEnable.setChecked(nativeLibrary.isDKIEnabledJNI());
nobuEnable.setChecked(nativeLibrary.isNOBUEnabledJNI());
iconoxEnable.setChecked(nativeLibrary.isICONOXEnabledJNI());
mddEnable.setChecked(nativeLibrary.isMDDEnabledJNI());
mandiriTopOffEnable.setChecked(nativeLibrary.isMandiriTopOffEnabledJNI());
mandiriC2CEnable.setChecked(nativeLibrary.isMandiriC2CEnabledJNI());
mandiriApiEnable.setChecked(nativeLibrary.isMandiriApiEnabledJNI());
bniApiEnable.setChecked(nativeLibrary.isBNIApiEnabledJNI());
bniC2CEnable.setChecked(nativeLibrary.isBNIC2CEnabledJNI());
briApiEnable.setChecked(nativeLibrary.isBRIApiEnabledJNI());
mdebugEnable.setChecked(nativeLibrary.isDebugerEnable());
loketEnable.setChecked(nativeLibrary.isLoketEnabledJNI());
megaEnable.setChecked(nativeLibrary.isMEGAEnabledJNI());
}
});
});
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
if (requestCode == REQUEST_READ_PHONE_STATE) {
if ((grantResults.length > 0) && (grantResults[0] == PackageManager.PERMISSION_GRANTED)) {
//TODO
loadData();
}
}
}
// TODO: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
}
@Override
public void onAttach(@NonNull Context context) {
super.onAttach(context);
if (context instanceof OnFragmentInteractionListener) {
mListener = (OnFragmentInteractionListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement OnFragmentInteractionListener");
}
}
@Override
public void onDetach() {
super.onDetach();
mListener = null;
}
@Override
public void onDestroyView() {
super.onDestroyView();
nativeLibrary.tryCloseLibJNI();
}
/**
* This interface must be implemented by activities that contain this
* fragment to allow an interaction in this fragment to be communicated
* to the activity and potentially other fragments contained in that
* activity.
* <p>
* See the Android Training lesson <a href=
* "http://developer.android.com/training/basics/fragments/communicating.html"
* >Communicating with Other Fragments</a> for more information.
*/
public interface OnFragmentInteractionListener {
// TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
}
}
package com.medicom.dudikov.mypaxsimulator;
import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
/**
* A simple {@link Fragment} subclass.
* Activities that contain this fragment must implement the
* {@link FragmentRoot.OnFragmentInteractionListener} interface
* to handle interaction events.
* Use the {@link FragmentRoot#newInstance} factory method to
* create an instance of this fragment.
*/
public class FragmentRoot extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;
private OnFragmentInteractionListener mListener;
public FragmentRoot() {
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment FragmentRoot.
*/
// TODO: Rename and change types and number of parameters
public static FragmentRoot newInstance(String param1, String param2) {
FragmentRoot fragment = new FragmentRoot();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_root, container, false);
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
}
// TODO: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
if (context instanceof OnFragmentInteractionListener) {
mListener = (OnFragmentInteractionListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement OnFragmentInteractionListener");
}
}
@Override
public void onDetach() {
super.onDetach();
mListener = null;
}
/**
* This interface must be implemented by activities that contain this
* fragment to allow an interaction in this fragment to be communicated
* to the activity and potentially other fragments contained in that
* activity.
* <p>
* See the Android Training lesson <a href=
* "http://developer.android.com/training/basics/fragments/communicating.html"
* >Communicating with Other Fragments</a> for more information.
*/
public interface OnFragmentInteractionListener {
// TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
}
}
package com.medicom.dudikov.mypaxsimulator;
import androidx.annotation.NonNull;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import android.Manifest;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.StrictMode;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Toast;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.view.GravityCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.fragment.app.FragmentTransaction;
import com.google.android.material.navigation.NavigationView;
import com.medicom.dudikov.mypaxsimulator.Database.ParametersRepository;
public class MainActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener, FragmentRoot.OnFragmentInteractionListener, FragmentBasic.OnFragmentInteractionListener{
private DrawerLayout drawer;
private Fragment fragment = null;
private int idxDriver;
private static Intent newIntent;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
AsyncTask.execute(new Runnable() {
@Override
public void run() {
ParametersRepository Parameters = new ParametersRepository(getApplication());
idxDriver = Integer.parseInt(Parameters.findValue("idx_driver", "0"));
}
});
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
drawer = findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
//drawer.setDrawerListener(toggle);//deprecated
drawer.addDrawerListener(toggle);
toggle.syncState();
NavigationView navigationView = findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
//navigationView.inflateHeaderView(R.layout.navigation_header_main);
if (ContextCompat.checkSelfPermission(this,
Manifest.permission.READ_PHONE_STATE)
!= PackageManager.PERMISSION_GRANTED) {
Toast.makeText(this, "Please grant permission", Toast.LENGTH_SHORT).show();
// Permission is not granted
// Should we show an explanation?
if (ActivityCompat.shouldShowRequestPermissionRationale(this,
Manifest.permission.READ_PHONE_STATE)) {
// Show an explanation to the user *asynchronously* -- don't block
// this thread waiting for the user's response! After the user
// sees the explanation, try again to request the permission.
} else {
// No explanation needed; request the permission
ActivityCompat.requestPermissions(this,
new String[]{Manifest.permission.READ_PHONE_STATE, Manifest.permission.INTERNET, Manifest.permission.WRITE_EXTERNAL_STORAGE},
1);
}
} else {
// Permission has already been granted
if (savedInstanceState == null) {
fragment = new FragmentBasic();
callFragment(fragment);
}
}
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
fragment = new FragmentRoot();
callFragment(fragment);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.menuSettings) {
onSettingClick();
return true;
}
return super.onOptionsItemSelected(item);
}
protected void onSettingClick() {
Intent i;
i = new Intent(getApplicationContext(), SettingsActivity.class);
startActivity(i);
}
// untuk mengganti isi kontainer menu yang dipiih
private void callFragment(Fragment fragment) {
String fragmentTag = fragment.getClass().getName();
Fragment oldFragment = getSupportFragmentManager().findFragmentByTag(fragmentTag);
//if oldFragment already exits in fragmentManager use it
if (oldFragment != null) {
fragment = oldFragment;
}
getSupportFragmentManager()
.beginTransaction()
.replace(R.id.frame_container, fragment, fragmentTag)
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE)
.commit();
getSupportFragmentManager().executePendingTransactions();
}
@Override
public boolean onNavigationItemSelected(MenuItem item) {
// Handle navigation view item clicks here.
int id = item.getItemId();
Bundle gateInArg = new Bundle();
gateInArg.putInt("ENGGINE_USE", idxDriver);
if (id == R.id.menuHome) {
fragment = new FragmentRoot();
fragment.setArguments(gateInArg);
callFragment(fragment);
} else if (id == R.id.menuBasic) {
fragment = new FragmentBasic();
fragment.setArguments(gateInArg);
callFragment(fragment);
}
drawer = findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
return true;
}
@Override
protected void onResume() {
super.onResume();
}
@Override
public void onFragmentInteraction(Uri uri) {
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
newIntent = intent;
Log.e("NewIntent", "true");
}
public static Intent getNewIntent(){
return newIntent;
}
}
package com.medicom.dudikov.mypaxsimulator;
import android.app.Application;
import android.content.Context;
import com.sunmi.peripheral.printer.InnerPrinterCallback;
import com.sunmi.peripheral.printer.InnerPrinterException;
import com.sunmi.peripheral.printer.InnerPrinterManager;
import com.sunmi.peripheral.printer.SunmiPrinterService;
public class MyApp extends Application {
public static Context context;
public static SunmiPrinterService sunmiPrinterService;
@Override
public void onCreate() {
super.onCreate();
context = getApplicationContext();
bindPrintService();
}
private void bindPrintService() {
try {
InnerPrinterManager.getInstance().bindService(this, new InnerPrinterCallback() {
@Override
protected void onConnected(SunmiPrinterService service) {
MyApp.sunmiPrinterService = service;
}
@Override
protected void onDisconnected() {
MyApp.sunmiPrinterService = null;
}
});
} catch (InnerPrinterException e) {
e.printStackTrace();
}
}
}
package com.medicom.dudikov.mypaxsimulator;
import android.content.Context;
import android.content.SharedPreferences;
import androidx.preference.PreferenceManager;
public class PreferenceManagers {
public static void setData(String key, String data, Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
SharedPreferences.Editor prefEditor = prefs.edit();
prefEditor.putString(key, data);
prefEditor.apply();
}
public static String getData(String key, Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
String data = prefs.getString(key, null);
return data;
}
public static void clearDataWithKey(String key, Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
SharedPreferences.Editor editor = prefs.edit();
if (prefs.contains(key)) {
editor.remove(key);
editor.apply();
}
}
public static void setDataWithSameKey(String key, String data, Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
SharedPreferences.Editor editor = prefs.edit();
if (prefs.contains(key)) {
editor.remove(key);
editor.apply();
}
editor.putString(key, data);
editor.commit();
}
public static void clear(Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
SharedPreferences.Editor editor = prefs.edit();
editor.clear();
editor.apply();
}
public static boolean hasData(String key, Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
return prefs.getString(key, null) != null;
}
}
package com.medicom.dudikov.mypaxsimulator;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.viewpager.widget.ViewPager;
import com.google.android.material.tabs.TabLayout;
import com.medicom.dudikov.mypaxsimulator.Database.ParametersRepository;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
public class SettingsActivity extends AppCompatActivity implements FragmentGeneral.OnFragmentInteractionListener, FragmentBankMandiri.OnFragmentInteractionListener,
FragmentBankBCA.OnFragmentInteractionListener, FragmentBankBNI.OnFragmentInteractionListener, FragmentBankBRI.OnFragmentInteractionListener {
private TabLayout tabLayout;
private ViewPager viewPager;
private int idxDriver;
private final int[] tabIcons = {
R.drawable.twotone_bug_report_white_48,
R.drawable.twotone_account_balance_white_48,
R.drawable.twotone_http_white_48
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_settings);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
viewPager = findViewById(R.id.viewpager);
tabLayout = findViewById(R.id.tabs);
setupViewPager(viewPager);
tabLayout.setupWithViewPager(viewPager);
setupTabIcons();
AsyncTask.execute(() -> {
ParametersRepository Parameters = new ParametersRepository(getApplication());
idxDriver = Integer.parseInt(Parameters.findValue("idx_driver", "0"));
});
}
private void setupTabIcons() {
Objects.requireNonNull(tabLayout.getTabAt(0)).setIcon(tabIcons[0]);
Objects.requireNonNull(tabLayout.getTabAt(1)).setIcon(tabIcons[1]);
Objects.requireNonNull(tabLayout.getTabAt(2)).setIcon(tabIcons[1]);
Objects.requireNonNull(tabLayout.getTabAt(3)).setIcon(tabIcons[1]);
Objects.requireNonNull(tabLayout.getTabAt(4)).setIcon(tabIcons[1]);
Objects.requireNonNull(tabLayout.getTabAt(5)).setIcon(tabIcons[2]);
Objects.requireNonNull(tabLayout.getTabAt(6)).setIcon(tabIcons[2]);
Objects.requireNonNull(tabLayout.getTabAt(7)).setIcon(tabIcons[1]);
}
private void setupViewPager(ViewPager viewPager) {
Bundle gateInArg = new Bundle();
gateInArg.putInt("ENGGINE_USE", idxDriver);
ViewPagerAdapter adapter = new ViewPagerAdapter(getSupportFragmentManager());
FragmentGeneral mGeneralFragment = new FragmentGeneral();
FragmentBankMandiri mFragmentBankMandiri = new FragmentBankMandiri();
FragmentBankBCA mFragmentBankBCA = new FragmentBankBCA();
FragmentBankBNI mFragmentBankBNI = new FragmentBankBNI();
mFragmentBankBNI.setArguments(gateInArg);
FragmentBankBRI mFragmentBankBRI = new FragmentBankBRI();
FragmentBankDKI mFragmentBankDKI = new FragmentBankDKI();
adapter.addFragment(mGeneralFragment, "GEN");
adapter.addFragment(mFragmentBankMandiri, "MDR");
adapter.addFragment(mFragmentBankBCA, "BCA");
adapter.addFragment(mFragmentBankBNI, "BNI");
adapter.addFragment(mFragmentBankBRI, "BRI");
adapter.addFragment(mFragmentBankDKI, "DKI");
viewPager.setAdapter(adapter);
}
static class ViewPagerAdapter extends FragmentPagerAdapter {
private final List<Fragment> mFragmentList = new ArrayList<>();
private final List<String> mFragmentTitleList = new ArrayList<>();
ViewPagerAdapter(FragmentManager manager) {
super(manager, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT);
}
@NonNull
@Override
public Fragment getItem(int position) {
return mFragmentList.get(position);
}
@Override
public int getCount() {
return mFragmentList.size();
}
void addFragment(Fragment fragment, String title) {
mFragmentList.add(fragment);
mFragmentTitleList.add(title);
}
@Override
public CharSequence getPageTitle(int position) {
return mFragmentTitleList.get(position);
}
}
@Override
public void onBackPressed() {
super.onBackPressed();
}
@Override
public void onFragmentInteraction(Uri uri) {
//you can leave it empty
}
}
package com.medicom.dudikov.mypaxsimulator.http;
import com.medicom.dudikov.mypaxsimulator.http.request.RequestAccessToken;
import com.medicom.dudikov.mypaxsimulator.http.request.TopupMandiriConfirmJson;
import com.medicom.dudikov.mypaxsimulator.http.request.TopupMandiriPendingJson;
import com.medicom.dudikov.mypaxsimulator.http.request.TopupMandiriReversalJson;
import com.medicom.dudikov.mypaxsimulator.http.request.TopupMandiriUpdateJson;
import com.medicom.dudikov.mypaxsimulator.http.response.ResponseToken;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Headers;
import retrofit2.http.POST;
public interface BaseApiServices {
@Headers({
"Accept: application/json",
"Content-Type: application/json"
})
// @POST("/v1/topup-mandiri/payment")
@POST("/v1/topup-mandiri/pending")
Call<String> topupMandiriPending(@Body TopupMandiriPendingJson topupMandiriPendingJson);
@Headers({
"Accept: application/json",
"Content-Type: application/json"
})
@POST("/v1/topup-mandiri/update")
Call<String> topupMandiriUpdate(@Body TopupMandiriUpdateJson topupMandiriUpdateJson);
@Headers({
"Accept: application/json",
"Content-Type: application/json"
})
@POST("/v1/topup-mandiri/confirm")
Call<String> topupMandiriupdateConfirm(@Body TopupMandiriConfirmJson topupMandiriConfirmJson);
@Headers({
"Accept: application/json",
"Content-Type: application/json"
})
@POST("/v1/topup-mandiri/reversal")
Call<String> topupMandiriReversal(@Body TopupMandiriReversalJson topupMandiriReversalJson);
@Headers({"Content-type: application/json"})
@POST("access-token")
Call<ResponseToken> getAccesToken(@Body RequestAccessToken request);
interface CallbackToken{
void onSuccess(ResponseToken response);
void onFailed();
}
}
package com.medicom.dudikov.mypaxsimulator.http;
import java.util.concurrent.TimeUnit;
import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
import retrofit2.converter.scalars.ScalarsConverterFactory;
public class RetrofitClient {
private static Retrofit retrofit = null;
public static Retrofit getClient(String baseUrl) {
HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
OkHttpClient client = new OkHttpClient.Builder()
.addInterceptor(interceptor)
.connectTimeout(10000, TimeUnit.SECONDS)
.writeTimeout(10000, TimeUnit.SECONDS)
.readTimeout(10000, TimeUnit.SECONDS)
.build();
retrofit = new Retrofit.Builder()
.baseUrl(baseUrl)
.addConverterFactory(ScalarsConverterFactory.create())
.addConverterFactory(GsonConverterFactory.create())
.client(client)
.build();
return retrofit;
}
}
package com.medicom.dudikov.mypaxsimulator.http.request;
public class RequestAccessToken {
String token;
String mid;
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
public String getMid() {
return mid;
}
public void setMid(String mid) {
this.mid = mid;
}
}
package com.medicom.dudikov.mypaxsimulator.http.request;
public class ReversalObject {
String prevCardInfo, prevStatus, updateState, prevDataToCard, prevCardNumber, prevBalance, prevApproval, prevTopUpValue, prevUID, prevApplet;
public String getPrevCardInfo() {
return prevCardInfo;
}
public void setPrevCardInfo(String prevCardInfo) {
this.prevCardInfo = prevCardInfo;
}
public String getPrevStatus() {
return prevStatus;
}
public void setPrevStatus(String prevStatus) {
this.prevStatus = prevStatus;
}
public String getUpdateState() {
return updateState;
}
public void setUpdateState(String updateState) {
this.updateState = updateState;
}
public String getPrevDataToCard() {
return prevDataToCard;
}
public void setPrevDataToCard(String prevDataToCard) {
this.prevDataToCard = prevDataToCard;
}
public String getPrevCardNumber() {
return prevCardNumber;
}
public void setPrevCardNumber(String prevCardNumber) {
this.prevCardNumber = prevCardNumber;
}
public String getPrevBalance() {
return prevBalance;
}
public void setPrevBalance(String prevBalance) {
this.prevBalance = prevBalance;
}
public String getPrevApproval() {
return prevApproval;
}
public void setPrevApproval(String prevApproval) {
this.prevApproval = prevApproval;
}
public String getPrevTopUpValue() {
return prevTopUpValue;
}
public void setPrevTopUpValue(String prevTopUpValue) {
this.prevTopUpValue = prevTopUpValue;
}
public String getPrevUID() {
return prevUID;
}
public void setPrevUID(String prevUID) {
this.prevUID = prevUID;
}
public String getPrevApplet() {
return prevApplet;
}
public void setPrevApplet(String prevApplet) {
this.prevApplet = prevApplet;
}
}
package com.medicom.dudikov.mypaxsimulator.http.request;
public class TopupMandiriConfirmJson {
/*{
"tid": "012312313",
"token": "dad3d2a0b08c46d38fd7e6a4a393f705",
"mid": "1234567abc",
"card_no": "6032984036246712",
"sam_data": "00C700003068E39B5491600E8F37A230EEA8889A09F08A67B94D8B2E4C09E6773FA5E53140A10EDC84E99C416C9F181928215A2B6B"
}*/
String tid, token, mid, card_no, sam_data, phone, email, approval_code, write_status;
public TopupMandiriConfirmJson(String tid, String token, String mid, String card_no, String sam_data, String phone, String email, String approval_code, String write_status) {
this.tid = tid;
this.token = token;
this.mid = mid;
this.card_no = card_no;
this.sam_data = sam_data;
this.phone = phone;
this.email = email;
this.approval_code = approval_code;
this.write_status = write_status;
}
@Override
public String toString() {
return "tid='" + tid + '\'' +
", token='" + token + '\'' +
", mid='" + mid + '\'' +
", card_no='" + card_no + '\'' +
", sam_data='" + sam_data + '\'' +
", phone='" + phone + '\'' +
", email='" + email + '\'' +
", approval_code='" + approval_code + '\'' +
", write_status='" + write_status + '\'';
}
public String getTid() {
return tid;
}
public void setTid(String tid) {
this.tid = tid;
}
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
public String getMid() {
return mid;
}
public void setMid(String mid) {
this.mid = mid;
}
public String getCard_no() {
return card_no;
}
public void setCard_no(String card_no) {
this.card_no = card_no;
}
public String getSam_data() {
return sam_data;
}
public void setSam_data(String sam_data) {
this.sam_data = sam_data;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getApproval_code() {
return approval_code;
}
public void setApproval_code(String approval_code) {
this.approval_code = approval_code;
}
public String getWrite_status() {
return write_status;
}
public void setWrite_status(String write_status) {
this.write_status = write_status;
}
}
package com.medicom.dudikov.mypaxsimulator.http.request;
public class TopupMandiriConfirmUpdateJson {
private String tid, token, mid, card_no, sam_data, phone, email, approval_code, write_status;
public TopupMandiriConfirmUpdateJson(String tid, String token, String mid, String card_no, String sam_data, String phone, String email, String approval_code, String write_status) {
this.tid = tid;
this.token = token;
this.mid = mid;
this.card_no = card_no;
this.sam_data = sam_data;
this.phone = phone;
this.email = email;
this.approval_code = approval_code;
this.write_status = write_status;
}
public String getTid() {
return tid;
}
public void setTid(String tid) {
this.tid = tid;
}
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
public String getMid() {
return mid;
}
public void setMid(String mid) {
this.mid = mid;
}
public String getCard_no() {
return card_no;
}
public void setCard_no(String card_no) {
this.card_no = card_no;
}
public String getSam_data() {
return sam_data;
}
public void setSam_data(String sam_data) {
this.sam_data = sam_data;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getApproval_code() {
return approval_code;
}
public void setApproval_code(String approval_code) {
this.approval_code = approval_code;
}
public String getWrite_status() {
return write_status;
}
public void setWrite_status(String write_status) {
this.write_status = write_status;
}
@Override
public String toString() {
return "tid='" + tid + '\'' +
", token='" + token + '\'' +
", mid='" + mid + '\'' +
", card_no='" + card_no + '\'' +
", sam_data='" + sam_data + '\'' +
", phone='" + phone + '\'' +
", email='" + email + '\'' +
", approval_code='" + approval_code + '\'' +
", write_status='" + write_status + '\'';
}
}
package com.medicom.dudikov.mypaxsimulator.http.request;
public class TopupMandiriPendingJson {
private String tid, token, mid, amount, card_no, phone, email, current_wallet;
public TopupMandiriPendingJson(String tid, String token, String mid, String amount, String card_no, String phone, String email, String current_wallet) {
this.tid = tid;
this.token = token;
this.mid = mid;
this.amount = amount;
this.card_no = card_no;
this.phone = phone;
this.email = email;
this.current_wallet = current_wallet;
}
public String getTid() {
return tid;
}
public void setTid(String tid) {
this.tid = tid;
}
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
public String getMid() {
return mid;
}
public void setMid(String mid) {
this.mid = mid;
}
public String getAmount() {
return amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
public String getCard_no() {
return card_no;
}
public void setCard_no(String card_no) {
this.card_no = card_no;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getCurrent_wallet() {
return current_wallet;
}
public void setCurrent_wallet(String current_wallet) {
this.current_wallet = current_wallet;
}
@Override
public String toString() {
return "tid='" + tid + '\'' +
", token='" + token + '\'' +
", mid='" + mid + '\'' +
", amount='" + amount + '\'' +
", card_no='" + card_no + '\'' +
", phone='" + phone + '\'' +
", email='" + email + '\'' +
", current_wallet='" + current_wallet + '\'';
}
}
package com.medicom.dudikov.mypaxsimulator.http.request;
public class TopupMandiriReversalJson {
private String token, tid, mid, card_no, last_balance, approval_code, amount, card_info, card_uid, mode, sam_data;
public TopupMandiriReversalJson(String token, String tid, String mid, String card_no, String last_balance, String approval_code, String amount, String card_info, String card_uid, String mode, String sam_data) {
this.token = token;
this.tid = tid;
this.mid = mid;
this.card_no = card_no;
this.last_balance = last_balance;
this.approval_code = approval_code;
this.amount = amount;
this.card_info = card_info;
this.card_uid = card_uid;
this.mode = mode;
this.sam_data = sam_data;
}
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
public String getTid() {
return tid;
}
public void setTid(String tid) {
this.tid = tid;
}
public String getMid() {
return mid;
}
public void setMid(String mid) {
this.mid = mid;
}
public String getCard_no() {
return card_no;
}
public void setCard_no(String card_no) {
this.card_no = card_no;
}
public String getLast_balance() {
return last_balance;
}
public void setLast_balance(String last_balance) {
this.last_balance = last_balance;
}
public String getApproval_code() {
return approval_code;
}
public void setApproval_code(String approval_code) {
this.approval_code = approval_code;
}
public String getAmount() {
return amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
public String getCard_info() {
return card_info;
}
public void setCard_info(String card_info) {
this.card_info = card_info;
}
public String getCard_uid() {
return card_uid;
}
public void setCard_uid(String card_uid) {
this.card_uid = card_uid;
}
public String getMode() {
return mode;
}
public void setMode(String mode) {
this.mode = mode;
}
public String getSam_data() {
return sam_data;
}
public void setSam_data(String sam_data) {
this.sam_data = sam_data;
}
@Override
public String toString() {
return "token='" + token + '\'' +
", tid='" + tid + '\'' +
", mid='" + mid + '\'' +
", card_no='" + card_no + '\'' +
", last_balance='" + last_balance + '\'' +
", approval_code='" + approval_code + '\'' +
", amount='" + amount + '\'' +
", card_info='" + card_info + '\'' +
", card_uid='" + card_uid + '\'' +
", mode='" + mode + '\'' +
", sam_data='" + sam_data + '\'';
}
}
package com.medicom.dudikov.mypaxsimulator.http.request;
public class TopupMandiriUpdateJson {
private String tid, token, mid, amount, card_no, card_attribute, last_balance, approval_code, card_info, card_uid, sam_data, phone, email;
public TopupMandiriUpdateJson(String tid, String token, String mid, String amount, String card_no, String card_attribute, String last_balance, String approval_code, String card_info, String card_uid, String sam_data, String phone, String email) {
this.tid = tid;
this.token = token;
this.mid = mid;
this.amount = amount;
this.card_no = card_no;
this.card_attribute = card_attribute;
this.last_balance = last_balance;
this.approval_code = approval_code;
this.card_info = card_info;
this.card_uid = card_uid;
this.sam_data = sam_data;
this.phone = phone;
this.email = email;
}
public String getTid() {
return tid;
}
public void setTid(String tid) {
this.tid = tid;
}
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
public String getMid() {
return mid;
}
public void setMid(String mid) {
this.mid = mid;
}
public String getAmount() {
return amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
public String getCard_no() {
return card_no;
}
public void setCard_no(String card_no) {
this.card_no = card_no;
}
public String getCard_attribute() {
return card_attribute;
}
public void setCard_attribute(String card_attribute) {
this.card_attribute = card_attribute;
}
public String getLast_balance() {
return last_balance;
}
public void setLast_balance(String last_balance) {
this.last_balance = last_balance;
}
public String getApproval_code() {
return approval_code;
}
public void setApproval_code(String approval_code) {
this.approval_code = approval_code;
}
public String getCard_info() {
return card_info;
}
public void setCard_info(String card_info) {
this.card_info = card_info;
}
public String getCard_uid() {
return card_uid;
}
public void setCard_uid(String card_uid) {
this.card_uid = card_uid;
}
public String getSam_data() {
return sam_data;
}
public void setSam_data(String sam_data) {
this.sam_data = sam_data;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
@Override
public String toString() {
return "tid='" + tid + '\'' +
", token='" + token + '\'' +
", mid='" + mid + '\'' +
", amount='" + amount + '\'' +
", card_no='" + card_no + '\'' +
", card_attribute='" + card_attribute + '\'' +
", last_balance='" + last_balance + '\'' +
", approval_code='" + approval_code + '\'' +
", card_info='" + card_info + '\'' +
", card_uid='" + card_uid + '\'' +
", phone='" + phone + '\'' +
", email='" + email + '\'';
}
}
package com.medicom.dudikov.mypaxsimulator.http.request;
public class TopupMandiriUpdateOldJson {
/*{
"tid": "012312313",
"token": "dad3d2a0b08c46d38fd7e6a4a393f705",
"mid": "1234567abc",
"card_no": "6032984036246712",
"sam_data": "00C700003068E39B5491600E8F37A230EEA8889A09F08A67B94D8B2E4C09E6773FA5E53140A10EDC84E99C416C9F181928215A2B6B"
}*/
String tid, token, mid, card_no, sam_data, phone, email, approval_code, write_status;
public TopupMandiriUpdateOldJson(String tid, String token, String mid, String card_no, String sam_data, String phone, String email, String approval_code, String write_status) {
this.tid = tid;
this.token = token;
this.mid = mid;
this.card_no = card_no;
this.sam_data = sam_data;
this.phone = phone;
this.email = email;
this.approval_code = approval_code;
this.write_status = write_status;
}
@Override
public String toString() {
return "tid='" + tid + '\'' +
", token='" + token + '\'' +
", mid='" + mid + '\'' +
", card_no='" + card_no + '\'' +
", sam_data='" + sam_data + '\'' +
", phone='" + phone + '\'' +
", email='" + email + '\'' +
", approval_code='" + approval_code + '\'' +
", write_status='" + write_status + '\'';
}
public String getTid() {
return tid;
}
public void setTid(String tid) {
this.tid = tid;
}
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
public String getMid() {
return mid;
}
public void setMid(String mid) {
this.mid = mid;
}
public String getCard_no() {
return card_no;
}
public void setCard_no(String card_no) {
this.card_no = card_no;
}
public String getSam_data() {
return sam_data;
}
public void setSam_data(String sam_data) {
this.sam_data = sam_data;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getApproval_code() {
return approval_code;
}
public void setApproval_code(String approval_code) {
this.approval_code = approval_code;
}
public String getWrite_status() {
return write_status;
}
public void setWrite_status(String write_status) {
this.write_status = write_status;
}
}
package com.medicom.dudikov.mypaxsimulator.http.response;
public class CardBalanceAPDUResponse {
private final String[] strUid;
boolean isSuccess = false;
private final int[] balance;
private final String[] cardNo;
private final String[] cardAttr;
private final String[] cardInfo;
private int[] cardType;
private final int[] error;
private int[] bankType;
public CardBalanceAPDUResponse() {
strUid = new String[1];
balance = new int[1];
cardNo = new String[1];
cardAttr = new String[1];
cardInfo = new String[1];
error = new int[1];
cardType = new int[1];
bankType = new int[1];
}
public boolean isSuccess() {
return isSuccess;
}
public void setSuccess(boolean success) {
isSuccess = success;
}
public int[] fillBalance() {
return balance;
}
public int getBalance() {
return balance[0];
}
public String[] fillCardNo() {
return cardNo;
}
public String getCardNumber() {
return cardNo[0];
}
public int getErrorCode() {
return error[0];
}
public String getErrorCodeString() {
return String.valueOf(error[0]);
}
public String[] fillCardAttr() {
return cardAttr;
}
public String[] fillCardInfo() {
return cardInfo;
}
public String[] fillCardUid() {
return strUid;
}
public int[] fillError() {
return error;
}
public String getCardUid() {
return strUid[0];
}
public String getCardInfo() {
return cardInfo[0];
}
public String getCardAttr() {
return cardAttr[0];
// return "0606170759424D79687875";
}
public boolean isMandiriNewApp() {
return getCardInfo().substring(37, 38).equalsIgnoreCase("83");
}
public boolean isMandiriAppv2() {
return getCardInfo().substring(37, 38).equalsIgnoreCase("02");
}
public boolean isMandiriOldApp() {
return getCardInfo().substring(37, 38).equalsIgnoreCase("03");
}
public int getCardType() {
return cardType[0];
}
public void setCardType(int[] cardType) {
this.cardType = cardType;
}
public int[] getBankType() {
return bankType;
}
public void setBankType(int[] bankType) {
this.bankType = bankType;
}
}
package com.medicom.dudikov.mypaxsimulator.http.response;
import com.google.gson.annotations.SerializedName;
public class Data{
@SerializedName("consumer_secret")
private String consumerSecret;
@SerializedName("type")
private String type;
@SerializedName("expires_in")
private String expiresIn;
@SerializedName("issued_at")
private String issuedAt;
@SerializedName("token")
private String token;
@SerializedName("username")
private String username;
public void setConsumerSecret(String consumerSecret){
this.consumerSecret = consumerSecret;
}
public String getConsumerSecret(){
return consumerSecret;
}
public void setType(String type){
this.type = type;
}
public String getType(){
return type;
}
public void setExpiresIn(String expiresIn){
this.expiresIn = expiresIn;
}
public String getExpiresIn(){
return expiresIn;
}
public void setIssuedAt(String issuedAt){
this.issuedAt = issuedAt;
}
public String getIssuedAt(){
return issuedAt;
}
public void setToken(String token){
this.token = token;
}
public String getToken(){
return token;
}
public void setUsername(String username){
this.username = username;
}
public String getUsername(){
return username;
}
}
\ No newline at end of file
package com.medicom.dudikov.mypaxsimulator.http.response;
public class FacadeMandiriConfirmUpdateNewAppResponse {
String apiResponse;
String confirmStatus;
String errorCode;
String dataToCard;
boolean isSuccess = false;
public FacadeMandiriConfirmUpdateNewAppResponse() {
}
public boolean isSuccess() {
return getConfirmStatus().equals("SUCCESS") && isSuccess;
}
public void setSuccess(boolean success) {
isSuccess = success;
}
public String getDataToCard() {
return dataToCard;
}
public void setDataToCard(String dataToCard) {
this.dataToCard = dataToCard;
}
public String getApiResponse() {
return apiResponse;
}
public void setApiResponse(String apiResponse) {
this.apiResponse = apiResponse;
}
public String getConfirmStatus() {
return confirmStatus;
}
public void setConfirmStatus(String confirmStatus) {
this.confirmStatus = confirmStatus;
}
public String getErrorCode() {
return errorCode;
}
public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
}
}
package com.medicom.dudikov.mypaxsimulator.http.response;
public class FacadeMandiriConfirmUpdateOldAppResponse {
String apiResponse;
String confirmStatus;
String errorCode;
String dataToCard;
boolean isSuccess = false;
public FacadeMandiriConfirmUpdateOldAppResponse() {
}
public boolean isSuccess() {
return isSuccess;
}
public void setSuccess(boolean success) {
isSuccess = success;
}
public boolean isUpdateStatusSucces() {
return this.getConfirmStatus().equals("SUCCESS");
}
public String getDataToCard() {
return dataToCard;
}
public void setDataToCard(String dataToCard) {
this.dataToCard = dataToCard;
}
public String getApiResponse() {
return apiResponse;
}
public void setApiResponse(String apiResponse) {
this.apiResponse = apiResponse;
}
public String getConfirmStatus() {
return confirmStatus;
}
public void setConfirmStatus(String confirmStatus) {
this.confirmStatus = confirmStatus;
}
public String getErrorCode() {
return errorCode;
}
public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
}
}
package com.medicom.dudikov.mypaxsimulator.http.response;
/**
* Created by Husnan on 09/08/2019
*/
public class FacadeMandiriUpdateBalanceResponse {
String dataToCard;
String appletType;
String strError;
boolean isSuccess;
public FacadeMandiriUpdateBalanceResponse() {
appletType = "";
strError = "";
dataToCard = "";
isSuccess = false;
}
public String getDataToCard() {
return dataToCard;
}
public void setDataToCard(String dataToCard) {
this.dataToCard = dataToCard;
}
public String getAppletType() {
return appletType;
}
public void setAppletType(String appletType) {
this.appletType = appletType;
}
public String getStrError() {
return strError;
}
public void setStrError(String strError) {
this.strError = strError;
}
public boolean isSuccess() {
return isSuccess;
}
public void setSuccess(boolean success) {
isSuccess = success;
}
public boolean isNewApp() {
return getAppletType().equals("NEW");
}
public boolean isOldApp() {
return getAppletType().equals("OLD");
}
}
package com.medicom.dudikov.mypaxsimulator.http.response;
public class PendingTopupResponse {
/*{"response":{"code":400,"message":"Something Went Wrong","latency":0.83272504806519},"data":{"responseHeader":{"error":{"description":"Account Limit Exceeded","code":"51005"},"status":"1"}}}*/
public Response response;
public Data data;
public Response getResponse() {
return response;
}
public void setResponse(Response response) {
this.response = response;
}
public Data getData() {
return data;
}
public void setData(Data data) {
this.data = data;
}
public class Response {
public int code;
public String message;
public double latency;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public double getLatency() {
return latency;
}
public void setLatency(double latency) {
this.latency = latency;
}
}
public class Data {
public int amount;
public String paymentId1;
public String reff_no;
public String trx_time;
public String description;
public ResponseHeader responseHeader;
public int getAmount() {
return amount;
}
public void setAmount(int amount) {
this.amount = amount;
}
public String getPaymentId1() {
return paymentId1;
}
public void setPaymentId1(String paymentId1) {
this.paymentId1 = paymentId1;
}
public String getReff_no() {
return reff_no;
}
public void setReff_no(String reff_no) {
this.reff_no = reff_no;
}
public String getTrx_time() {
return trx_time;
}
public void setTrx_time(String trx_time) {
this.trx_time = trx_time;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public ResponseHeader getResponseHeader() {
return responseHeader;
}
public void setResponseHeader(ResponseHeader responseHeader) {
this.responseHeader = responseHeader;
}
}
public class ResponseHeader {
Error error;
String status;
public Error getError() {
return error;
}
public void setError(Error error) {
this.error = error;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
}
public class Error {
String description, code;
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
}
}
package com.medicom.dudikov.mypaxsimulator.http.response;
import com.google.gson.annotations.SerializedName;
public class Response{
@SerializedName("code")
private int code;
@SerializedName("latency")
private double latency;
@SerializedName("host")
private String host;
@SerializedName("message")
private String message;
public void setCode(int code){
this.code = code;
}
public int getCode(){
return code;
}
public void setLatency(double latency){
this.latency = latency;
}
public double getLatency(){
return latency;
}
public void setHost(String host){
this.host = host;
}
public String getHost(){
return host;
}
public void setMessage(String message){
this.message = message;
}
public String getMessage(){
return message;
}
}
\ No newline at end of file
package com.medicom.dudikov.mypaxsimulator.http.response;
import com.google.gson.annotations.SerializedName;
public class ResponseToken{
@SerializedName("data")
private Data data;
@SerializedName("response")
private Response response;
public void setData(Data data){
this.data = data;
}
public Data getData(){
return data;
}
public void setResponse(Response response){
this.response = response;
}
public Response getResponse(){
return response;
}
}
\ No newline at end of file
package com.medicom.dudikov.mypaxsimulator.http.response;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class TopupMandiriReversalResponse {
@SerializedName("response")
@Expose
Response response;
@SerializedName("data")
@Expose
Data data;
public Response getResponse() {
return response;
}
public void setResponse(Response response) {
this.response = response;
}
public Data getData() {
return data;
}
public void setData(Data data) {
this.data = data;
}
public class Response {
@SerializedName("code")
@Expose
String code;
@SerializedName("message")
@Expose
String message;
@SerializedName("latency")
@Expose
String latency;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getLatency() {
return latency;
}
public void setLatency(String latency) {
this.latency = latency;
}
}
public class Data {
@SerializedName("appletType")
@Expose
String appletType;
@SerializedName("cardNo")
@Expose
String cardNo;
@SerializedName("amount")
@Expose
String amount;
@SerializedName("reversalStatus")
@Expose
String reversalStatus;
@SerializedName("reversalMessage")
@Expose
String reversalMessage;
@SerializedName("info")
@Expose
String info;
public String getAppletType() {
return appletType;
}
public void setAppletType(String appletType) {
this.appletType = appletType;
}
public String getCardNo() {
return cardNo;
}
public void setCardNo(String cardNo) {
this.cardNo = cardNo;
}
public String getAmount() {
return amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
public String getReversalStatus() {
return reversalStatus;
}
public void setReversalStatus(String reversalStatus) {
this.reversalStatus = reversalStatus;
}
public String getReversalMessage() {
return reversalMessage;
}
public void setReversalMessage(String reversalMessage) {
this.reversalMessage = reversalMessage;
}
public String getInfo() {
return info;
}
public void setInfo(String info) {
this.info = info;
}
}
}
package com.medicom.dudikov.mypaxsimulator.http.response;
public class TopupMandiriUpdateResponse {
response response;
data data;
public TopupMandiriUpdateResponse.response getResponse() {
return response;
}
public void setResponse(TopupMandiriUpdateResponse.response response) {
this.response = response;
}
public TopupMandiriUpdateResponse.data getData() {
return data;
}
public void setData(TopupMandiriUpdateResponse.data data) {
this.data = data;
}
public boolean isHttp200() {
return getResponse().getCode().equalsIgnoreCase("200");
}
public boolean isHttp400() {
return getResponse().getCode().equalsIgnoreCase("400");
}
public class response {
String code, message, latency;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getLatency() {
return latency;
}
public void setLatency(String latency) {
this.latency = latency;
}
}
public class data {
responseHeader responseHeader;
responseBalance responseBalance;
String terminalId;
String merchantId;
String code;
String description;
String dataToCard;
String confirmStatus;
String appletType;
String updateStatus;
String session;
String pendingTopup;
public String getConfirmStatus() {
return confirmStatus;
}
public void setConfirmStatus(String confirmStatus) {
this.confirmStatus = confirmStatus;
}
public String getDataToCard() {
return dataToCard;
}
public void setDataToCard(String dataToCard) {
this.dataToCard = dataToCard;
}
public String getSession() {
return session;
}
public void setSession(String session) {
this.session = session;
}
public String getPendingTopup() {
return pendingTopup;
}
public void setPendingTopup(String pendingTopup) {
this.pendingTopup = pendingTopup;
}
public String getAppletType() {
return appletType;
}
public void setAppletType(String appletType) {
this.appletType = appletType;
}
public String getUpdateStatus() {
return updateStatus;
}
public void setUpdateStatus(String updateStatus) {
this.updateStatus = updateStatus;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public TopupMandiriUpdateResponse.responseHeader getResponseHeader() {
return responseHeader;
}
public void setResponseHeader(TopupMandiriUpdateResponse.responseHeader responseHeader) {
this.responseHeader = responseHeader;
}
public TopupMandiriUpdateResponse.responseBalance getResponseBalance() {
return responseBalance;
}
public void setResponseBalance(TopupMandiriUpdateResponse.responseBalance responseBalance) {
this.responseBalance = responseBalance;
}
public String getTerminalId() {
return terminalId;
}
public void setTerminalId(String terminalId) {
this.terminalId = terminalId;
}
public String getMerchantId() {
return merchantId;
}
public void setMerchantId(String merchantId) {
this.merchantId = merchantId;
}
}
public class responseHeader {
String status, apiVersion;
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getApiVersion() {
return apiVersion;
}
public void setApiVersion(String apiVersion) {
this.apiVersion = apiVersion;
}
}
public class responseBalance {
String message;
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
}
package com.medicom.dudikov.mypaxsimulator.lib;
public class CardInfo {
private final int balance;
private final String cardNumber;
private final String bankType;
private final String cardUid;
public CardInfo(int balance, String cardNumber, String bankType, String uid) {
this.balance = balance;
this.cardNumber = cardNumber;
this.bankType = bankType;
this.cardUid = uid;
}
public int getBalance() {
return balance;
}
public String getCardNumber() {
return cardNumber;
}
public String getBankType() {
return bankType;
}
public String getCardUid() {
return cardUid;
}
}
package com.medicom.dudikov.mypaxsimulator.lib;
import com.medicom.dudikov.mybanklibrary.readerLib;
public class CardInfoCommand {
private final readerLib myReader;
public CardInfoCommand(readerLib reader) {
myReader = reader;
}
public CommandResult<CardInfo> execute(String uidFindCard) {
CommandResult<CardInfo> result = new CommandResult<>();
try {
int[] writeBalance = new int[1];
String[] writeCardNumber = new String[1];
String StrDate = "";
int[] bankType = new int[1];
int[] errorCode = new int[1];
int[] cardType = new int[1];
if (myReader.readerGetBalance(cardType[0],StrDate, bankType, writeBalance, writeCardNumber, errorCode)) {
result.setSuccess(true);
String bankName = "Unknown";
switch (bankType[0]) {
case readerLib.PROTOCOL_BANK_MANDIRI:
bankName = "MANDIRI OLD APPLET";
break;
case (readerLib.PROTOCOL_BANK_MANDIRI + 0x100):
bankName = "MANDIRI NEW APPLET";
break;
case readerLib.PROTOCOL_BANK_BCA:
bankName = "BCA";
break;
case readerLib.PROTOCOL_BANK_BNI:
bankName = "BNI";
break;
case readerLib.PROTOCOL_BANK_BRI_DESFIRE:
bankName = "BRI";
break;
case readerLib.PROTOCOL_BANK_DKI:
bankName = "DKI-OLD";
break;
case readerLib.PROTOCOL_BANK_DKI_NEW:
bankName = "DKI-NEW";
break;
case readerLib.PROTOCOL_BANK_ICONOX:
bankName = "ICONOX";
case readerLib.PROTOCOL_BANK_NOBU:
bankName = "NOBU";
break;
case readerLib.PROTOCOL_BANK_UNKNOWN:
bankName = "UNKNOWN";
break;
}
int cardBalance = writeBalance[0];
String cardNumber = writeCardNumber[0];
CardInfo cardInfo = new CardInfo(cardBalance, cardNumber, bankName, uidFindCard);
result.setResult(cardInfo);
result.setMessage("Card info apdu success");
}else{
result.setSuccess(false);
result.setMessage(String.valueOf(errorCode[0]));
}
} catch (Exception e) {
result.setSuccess(false);
result.setMessage(e.getMessage());
}
return result;
}
}
package com.medicom.dudikov.mypaxsimulator.lib;
public class CommandResult<T> {
T result;
boolean isSuccess;
String message;
public CommandResult() {
}
public void setResult(T result) {
this.result = result;
}
public void setSuccess(boolean success) {
isSuccess = success;
}
public void setMessage(String message) {
this.message = message;
}
public T getResult() {
return result;
}
public boolean isSuccess() {
return isSuccess;
}
public String getMessage() {
return message;
}
}
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeWidth="1"
android:strokeColor="#00000000">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<!-- View background color -->
<solid android:color="@android:color/darker_gray"></solid>
<!-- View border color and width -->
<stroke
android:width="1dp"
android:color="@android:color/holo_red_dark"></stroke>
<!-- The radius makes the corners rounded -->
<corners
android:radius="2dp" >
</corners>
</shape>
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M4.5,11h-2L2.5,9L1,9v6h1.5v-2.5h2L4.5,15L6,15L6,9L4.5,9v2zM7,10.5h1.5L8.5,15L10,15v-4.5h1.5L11.5,9L7,9v1.5zM12.5,10.5L14,10.5L14,15h1.5v-4.5L17,10.5L17,9h-4.5v1.5zM21.5,9L18,9v6h1.5v-2h2c0.8,0 1.5,-0.7 1.5,-1.5v-1c0,-0.8 -0.7,-1.5 -1.5,-1.5zM21.5,11.5h-2v-1h2v1z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#008577"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z"/>
</vector>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="135"
android:centerColor="#3F51B5"
android:endColor="#303F9F"
android:startColor="#303F9F"
android:type="linear" />
</shape>
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M6.29,6l5.21,-2.74L16.71,6z"
android:fillAlpha=".3"/>
<path
android:fillColor="@android:color/white"
android:pathData="M6.5,10h-2v7h2v-7zM12.5,10h-2v7h2v-7zM21,19L2,19v2h19v-2zM18.5,10h-2v7h2v-7zM11.5,1L2,6v2h19L21,6l-9.5,-5zM6.29,6l5.21,-2.74L16.71,6L6.29,6z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M15.83,9.65L15.46,9c-0.3,-0.53 -0.71,-0.96 -1.21,-1.31l-0.61,-0.42 -0.68,-0.16C12.63,7.04 12.32,7 12,7c-0.31,0 -0.63,0.04 -0.94,0.11l-0.74,0.18 -0.57,0.4c-0.49,0.34 -0.91,0.79 -1.21,1.31l-0.37,0.65 -0.1,0.65c-0.04,0.23 -0.07,0.48 -0.07,0.7v4c0,0.22 0.03,0.47 0.07,0.7l0.1,0.65 0.37,0.65c0.72,1.24 2.04,2 3.46,2s2.74,-0.77 3.46,-2l0.37,-0.64 0.1,-0.65c0.04,-0.24 0.07,-0.49 0.07,-0.71v-4c0,-0.22 -0.03,-0.47 -0.07,-0.7l-0.1,-0.65zM14,16h-4v-2h4v2zM14,12h-4v-2h4v2z"
android:fillAlpha=".3"/>
<path
android:fillColor="@android:color/white"
android:pathData="M20,8h-2.81c-0.45,-0.78 -1.07,-1.45 -1.82,-1.96L17,4.41 15.59,3l-2.17,2.17C12.96,5.06 12.49,5 12,5s-0.96,0.06 -1.41,0.17L8.41,3 7,4.41l1.62,1.63C7.88,6.55 7.26,7.22 6.81,8L4,8v2h2.09c-0.05,0.33 -0.09,0.66 -0.09,1v1L4,12v2h2v1c0,0.34 0.04,0.67 0.09,1L4,16v2h2.81c1.04,1.79 2.97,3 5.19,3s4.15,-1.21 5.19,-3L20,18v-2h-2.09c0.05,-0.33 0.09,-0.66 0.09,-1v-1h2v-2h-2v-1c0,-0.34 -0.04,-0.67 -0.09,-1L20,10L20,8zM16,12v3c0,0.22 -0.03,0.47 -0.07,0.7l-0.1,0.65 -0.37,0.65c-0.72,1.24 -2.04,2 -3.46,2s-2.74,-0.77 -3.46,-2l-0.37,-0.64 -0.1,-0.65C8.03,15.47 8,15.22 8,15v-4c0,-0.22 0.03,-0.47 0.07,-0.7l0.1,-0.65 0.37,-0.65c0.3,-0.52 0.72,-0.97 1.21,-1.31l0.57,-0.39 0.74,-0.18c0.31,-0.08 0.63,-0.12 0.94,-0.12 0.32,0 0.63,0.04 0.95,0.12l0.68,0.16 0.61,0.42c0.5,0.34 0.91,0.78 1.21,1.31l0.38,0.65 0.1,0.65c0.04,0.22 0.07,0.47 0.07,0.69v1zM10,14h4v2h-4zM10,10h4v2h-4z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M11.92,8.28c0.24,-1.4 -0.16,-2.89 -1.24,-3.96 -0.94,-0.95 -2.2,-1.39 -3.44,-1.32l3.09,3.09 -4.24,4.24L3,7.24c-0.07,1.24 0.37,2.49 1.31,3.44 1.04,1.04 2.47,1.45 3.83,1.25 0.71,-0.1 1.4,-0.38 2,-0.82l9.46,9.46 0.88,-0.88 -9.45,-9.45c0.47,-0.6 0.77,-1.26 0.89,-1.96z"
android:fillAlpha=".3"/>
<path
android:fillColor="@android:color/white"
android:pathData="M22.61,18.97L13.54,9.9c0.93,-2.34 0.45,-5.1 -1.44,-7C9.8,0.6 6.22,0.39 3.67,2.25L7.5,6.08 6.08,7.5 2.25,3.67C0.39,6.21 0.6,9.79 2.9,12.09c1.86,1.86 4.57,2.35 6.89,1.48l9.11,9.11c0.39,0.39 1.02,0.39 1.41,0l2.3,-2.3c0.4,-0.38 0.4,-1.02 0,-1.41zM19.61,20.57l-9.46,-9.46c-0.61,0.45 -1.29,0.72 -2,0.82 -1.36,0.2 -2.79,-0.21 -3.83,-1.25 -0.95,-0.94 -1.39,-2.2 -1.32,-3.44l3.09,3.09 4.24,-4.24L7.24,3c1.24,-0.07 2.49,0.37 3.44,1.31 1.08,1.08 1.49,2.57 1.24,3.96 -0.12,0.7 -0.42,1.36 -0.88,1.95l9.45,9.45 -0.88,0.9z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M4,17h16v2L4,19zM17,10.83L15.38,12 12,7.4 8.62,12 7,10.83 9.08,8L4,8v6h16L20,8h-5.08z"
android:fillAlpha=".3"/>
<path
android:fillColor="@android:color/white"
android:pathData="M20,6h-2.18c0.11,-0.31 0.18,-0.65 0.18,-1 0,-1.66 -1.34,-3 -3,-3 -1.05,0 -1.96,0.54 -2.5,1.35l-0.5,0.67 -0.5,-0.68C10.96,2.54 10.05,2 9,2 7.34,2 6,3.34 6,5c0,0.35 0.07,0.69 0.18,1L4,6c-1.11,0 -1.99,0.89 -1.99,2L2,19c0,1.11 0.89,2 2,2h16c1.11,0 2,-0.89 2,-2L22,8c0,-1.11 -0.89,-2 -2,-2zM15,4c0.55,0 1,0.45 1,1s-0.45,1 -1,1 -1,-0.45 -1,-1 0.45,-1 1,-1zM9,4c0.55,0 1,0.45 1,1s-0.45,1 -1,1 -1,-0.45 -1,-1 0.45,-1 1,-1zM20,19L4,19v-2h16v2zM20,14L4,14L4,8h5.08L7,10.83 8.62,12 12,7.4l3.38,4.6L17,10.83 14.92,8L20,8v6z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M5,19h14L19,5L5,5v14zM16.5,6c0.83,0 1.5,0.67 1.5,1.5S17.33,9 16.5,9 15,8.33 15,7.5 15.67,6 16.5,6zM16.5,15c0.83,0 1.5,0.67 1.5,1.5s-0.67,1.5 -1.5,1.5 -1.5,-0.67 -1.5,-1.5 0.67,-1.5 1.5,-1.5zM12,10.5c0.83,0 1.5,0.67 1.5,1.5s-0.67,1.5 -1.5,1.5 -1.5,-0.67 -1.5,-1.5 0.67,-1.5 1.5,-1.5zM7.5,6C8.33,6 9,6.67 9,7.5S8.33,9 7.5,9 6,8.33 6,7.5 6.67,6 7.5,6zM7.5,15c0.83,0 1.5,0.67 1.5,1.5S8.33,18 7.5,18 6,17.33 6,16.5 6.67,15 7.5,15z"
android:fillAlpha=".3"/>
<path
android:fillColor="@android:color/white"
android:pathData="M19,3L5,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM19,19L5,19L5,5h14v14z"/>
<path
android:fillColor="@android:color/white"
android:pathData="M7.5,16.5m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0"/>
<path
android:fillColor="@android:color/white"
android:pathData="M7.5,7.5m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0"/>
<path
android:fillColor="@android:color/white"
android:pathData="M12,12m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0"/>
<path
android:fillColor="@android:color/white"
android:pathData="M16.5,16.5m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0"/>
<path
android:fillColor="@android:color/white"
android:pathData="M16.5,7.5m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M17,16l-4,-4V8.82C14.16,8.4 15,7.3 15,6c0,-1.66 -1.34,-3 -3,-3S9,4.34 9,6c0,1.3 0.84,2.4 2,2.82V12l-4,4H3v5h5v-3.05l4,-4.2 4,4.2V21h5v-5h-4z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M7,17h14L21,3L7,3v14zM11,11c0,-1.11 0.9,-2 2,-2h2L15,7h-4L11,5h4c1.1,0 2,0.89 2,2v2c0,1.11 -0.9,2 -2,2h-2v2h4v2h-6v-4z"
android:fillAlpha=".3"/>
<path
android:fillColor="@android:color/white"
android:pathData="M17,13h-4v-2h2c1.1,0 2,-0.89 2,-2L17,7c0,-1.11 -0.9,-2 -2,-2h-4v2h4v2h-2c-1.1,0 -2,0.89 -2,2v4h6v-2zM21,1L7,1c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L23,3c0,-1.1 -0.9,-2 -2,-2zM21,17L7,17L7,3h14v14zM1,21c0,1.1 0.9,2 2,2h16v-2L3,21L3,5L1,5v16z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12,3L2,12h3v8h6v-6h2v6h6v-8h3L12,3zM17,18h-2v-6L9,12v6L7,18v-7.81l5,-4.5 5,4.5L17,18z"/>
<path
android:fillColor="@android:color/white"
android:pathData="M7,10.19V18h2v-6h6v6h2v-7.81l-5,-4.5z"
android:fillAlpha=".3"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M4.5,11h-2L2.5,9L1,9v6h1.5v-2.5h2L4.5,15L6,15L6,9L4.5,9v2zM7,10.5h1.5L8.5,15L10,15v-4.5h1.5L11.5,9L7,9v1.5zM12.5,10.5L14,10.5L14,15h1.5v-4.5L17,10.5L17,9h-4.5v1.5zM21.5,9L18,9v6h1.5v-2h2c0.8,0 1.5,-0.7 1.5,-1.5v-1c0,-0.8 -0.7,-1.5 -1.5,-1.5zM21.5,11.5h-2v-1h2v1z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M6,20h12L18,10L6,10v10zM12,13c1.1,0 2,0.9 2,2s-0.9,2 -2,2 -2,-0.9 -2,-2 0.9,-2 2,-2z"
android:fillAlpha=".3"/>
<path
android:fillColor="@android:color/white"
android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM9,6c0,-1.66 1.34,-3 3,-3s3,1.34 3,3v2L9,8L9,6zM18,20L6,20L6,10h12v10zM12,17c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M5,6.99h3V14h2V6.99h3L9,3zM14,10v7.01h-3L15,21l4,-3.99h-3V10z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M4,6h16v2L4,8zM4,12h16v6L4,18z"
android:fillAlpha=".3"/>
<path
android:fillColor="@android:color/white"
android:pathData="M20,4L4,4c-1.11,0 -1.99,0.89 -1.99,2L2,18c0,1.11 0.89,2 2,2h16c1.11,0 2,-0.89 2,-2L22,6c0,-1.11 -0.89,-2 -2,-2zM20,18L4,18v-6h16v6zM20,8L4,8L4,6h16v2z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M5.64,9l-0.6,3h13.92l-0.6,-3z"
android:fillAlpha=".3"/>
<path
android:fillColor="@android:color/white"
android:pathData="M4,4h16v2L4,6zM20,7L4,7l-1,5v2h1v6h10v-6h4v6h2v-6h1v-2l-1,-5zM12,18L6,18v-4h6v4zM5.04,12l0.6,-3h12.72l0.6,3L5.04,12z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.widget.DrawerLayout 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:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<include
layout="@layout/app_bar_main"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.google.android.material.navigation.NavigationView
android:id="@+id/nav_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/navigation_header_main"
app:menu="@menu/activity_main_drawer"/>
<!--<android.support.design.widget.NavigationView-->
<!--android:id="@+id/nav_view"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent"-->
<!--android:layout_gravity="start"-->
<!--android:fitsSystemWindows="true"-->
<!--app:menu="@menu/activity_main_drawer"/>-->
<!--<include layout="@layout/navigation_header_main"/>-->
</androidx.drawerlayout.widget.DrawerLayout>
\ No newline at end of file
<?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:padding="10dp"
tools:context=".PrepaidBriActivity">
<TextView
android:id="@+id/tap_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Tap your card"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.422"
tools:layout_editor_absoluteX="10dp" />
<TextView
android:id="@+id/message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Message"
android:gravity="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tap_card"
app:layout_constraintVertical_bias="0.083"
tools:layout_editor_absoluteX="16dp" />
<ProgressBar
android:id="@+id/pb_loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.726" />
<TextView
android:id="@+id/tvResult"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/message"
app:layout_constraintVertical_bias="0.135" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="scrollable"
app:tabGravity="fill"/>
</com.google.android.material.appbar.AppBarLayout>
<androidx.viewpager.widget.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout 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:fitsSystemWindows="true"
tools:context="com.medicom.dudikov.mypaxsimulator.MainActivity">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay"/>
</com.google.android.material.appbar.AppBarLayout>
<include layout="@layout/content_main" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.medicom.dudikov.mypaxsimulator.MainActivity"
tools:showIn="@layout/app_bar_main">
<FrameLayout
android:id="@+id/frame_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
\ No newline at end of file
<?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"
tools:context=".FragmentAbout" android:id="@+id/frameLayout13">
<!-- TODO: Update blank fragment layout -->
<Button
android:text="@string/strTest"
android:layout_width="0dp"
android:layout_height="wrap_content" android:id="@+id/btnTextPax" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="8dp" android:layout_marginTop="32dp"
app:layout_constraintTop_toTopOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
tools:context=".FragmentApiBNI" android:id="@+id/frameLayout11">
<!-- TODO: Update blank fragment layout -->
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edInquiry" android:layout_marginTop="32dp" app:layout_constraintTop_toTopOf="parent" android:layout_marginStart="8dp"
app:layout_constraintStart_toStartOf="parent" android:layout_marginEnd="8dp" app:layout_constraintEnd_toEndOf="parent" android:inputType="textUri"
android:hint="@string/strInQuiryPayment"/>
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edInquiryUpdate" android:layout_marginTop="8dp" app:layout_constraintTop_toBottomOf="@+id/edInquiry" android:layout_marginStart="8dp"
app:layout_constraintStart_toStartOf="parent" android:layout_marginEnd="8dp" app:layout_constraintEnd_toEndOf="parent" android:inputType="textUri"
android:hint="@string/strUpdateBalanceInquiry"/>
<Button
android:text="@string/strLoadDefault"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/btnApiLoadDefault" android:layout_marginTop="8dp" app:layout_constraintTop_toBottomOf="@+id/edInquiryUpdate" app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="16dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
tools:context=".FragmentApiMandiri" android:id="@+id/frameLayout10">
<!-- TODO: Update blank fragment layout -->
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edInquiry" android:inputType="textUri" android:layout_marginTop="8dp" app:layout_constraintTop_toTopOf="parent" android:layout_marginStart="8dp"
app:layout_constraintStart_toStartOf="parent" android:layout_marginEnd="8dp" app:layout_constraintEnd_toEndOf="parent" android:hint="@string/strInQuiryPayment"
/>
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edPending" android:layout_marginStart="8dp" app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/edInquiry" android:layout_marginEnd="8dp" app:layout_constraintEnd_toEndOf="parent" android:inputType="textUri"
android:hint="@string/strPendingPayment"/>
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edBalanceUpdateInquiry" android:layout_marginTop="32dp" app:layout_constraintTop_toBottomOf="@+id/edPending"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="8dp" android:layout_marginEnd="8dp" app:layout_constraintEnd_toEndOf="parent" android:inputType="textUri"
android:hint="@string/strUpdateBalanceInquiry"/>
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edCardCommand" android:layout_marginTop="8dp" app:layout_constraintTop_toBottomOf="@+id/edBalanceUpdateInquiry" android:layout_marginStart="8dp"
app:layout_constraintStart_toStartOf="parent" android:layout_marginEnd="8dp" app:layout_constraintEnd_toEndOf="parent" android:inputType="textUri"
android:hint="@string/strCardCommand"/>
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edUpdateBalance" android:layout_marginTop="8dp" app:layout_constraintTop_toBottomOf="@+id/edCardCommand" android:layout_marginStart="8dp"
app:layout_constraintStart_toStartOf="parent" android:layout_marginEnd="8dp" app:layout_constraintEnd_toEndOf="parent" android:inputType="textUri"
android:hint="@string/strUpdateBalance"/>
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edConfirmSession" android:layout_marginStart="8dp" app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/edUpdateBalance" android:layout_marginEnd="8dp" app:layout_constraintEnd_toEndOf="parent" android:inputType="textUri"
android:hint="@string/strConfirmSession"/>
<Button
android:text="@string/strLoadDefault"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/btnLoadDefault" app:layout_constraintEnd_toEndOf="parent"
android:layout_marginEnd="8dp" android:layout_marginTop="32dp" app:layout_constraintTop_toBottomOf="@+id/edConfirmSession"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
tools:context=".FragmentBankBCA" android:id="@+id/frameLayout7">
<!-- TODO: Update blank fragment layout -->
<TextView
android:text="@string/strTID"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView10" android:layout_marginTop="8dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="8dp"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edTID" android:layout_marginStart="8dp" app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/textView10" android:background="@drawable/my_inputborder" android:inputType="textCapCharacters" android:maxLength="8"/>
<TextView
android:text="@string/strMID"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView11" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/edTID"/>
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edMID" android:layout_marginStart="8dp" app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/textView11" android:background="@drawable/my_inputborder" android:inputType="number" android:layout_marginEnd="8dp"
app:layout_constraintEnd_toEndOf="parent" android:maxLength="15"/>
<TextView
android:text="@string/strMinBalance"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView12" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/edMID"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edMinBalance" android:layout_marginStart="8dp" app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/textView12" android:background="@drawable/my_inputborder" android:inputType="number" android:maxLength="5"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
tools:context=".FragmentBankBNI" android:id="@+id/frameLayout8">
<!-- TODO: Update blank fragment layout -->
<TextView
android:text="@string/strMerriedCode"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView13" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="8dp"
app:layout_constraintTop_toTopOf="parent"/>
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/strDefaultMerriedCode"
android:ems="10"
android:id="@+id/edMerriedCode" android:layout_marginStart="8dp" app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/textView13" android:layout_marginEnd="8dp" app:layout_constraintEnd_toEndOf="parent" android:inputType="textCapCharacters"
android:background="@drawable/my_inputborder"/>
<TextView
android:id="@+id/textView14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="32dp"
android:text="@string/strTID"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btnGetMerried" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edTid" android:layout_marginStart="8dp" app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/textView14" android:inputType="number" android:background="@drawable/my_inputborder"/>
<TextView
android:text="@string/strBniTopupC2C"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView22" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="32dp" app:layout_constraintTop_toBottomOf="@+id/edTid"/>
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/strDefaultMasterKey"
android:ems="10"
android:id="@+id/edMasterKey" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:inputType="textCapCharacters" android:layout_marginEnd="8dp"
app:layout_constraintEnd_toEndOf="parent" android:hint="@string/strMasterKey" android:background="@drawable/my_inputborder" app:layout_constraintHorizontal_bias="0.0" android:layout_marginTop="8dp" app:layout_constraintTop_toBottomOf="@+id/textView23"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/strDefaultInitialVector"
android:ems="10"
android:id="@+id/edInitialVector" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:background="@drawable/my_inputborder"
android:inputType="textCapCharacters" android:layout_marginTop="8dp" app:layout_constraintTop_toBottomOf="@+id/textView24"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:text="@string/strDefaultBNIPin"
android:ems="10"
android:id="@+id/edBNIc2cPin" android:layout_marginStart="8dp" app:layout_constraintStart_toStartOf="parent" android:background="@drawable/my_inputborder" android:layout_marginTop="8dp" app:layout_constraintTop_toBottomOf="@+id/textView25"/>
<TextView
android:text="@string/strMasterKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView23" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="8dp" app:layout_constraintTop_toBottomOf="@+id/textView22"/>
<TextView
android:text="@string/strInitialVector"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView24" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="8dp" app:layout_constraintTop_toBottomOf="@+id/edMasterKey"/>
<TextView
android:text="@string/strPin"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView25" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="8dp" app:layout_constraintTop_toBottomOf="@+id/edInitialVector"/>
<Button
android:id="@+id/btnGetMerried"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:text="@string/strGetMerriedCode"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/edMerriedCode" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
tools:context=".FragmentBankBRI" android:id="@+id/frameLayout9">
<!-- TODO: Update blank fragment layout -->
<TextView
android:text="@string/strTID"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView15" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="8dp"
app:layout_constraintTop_toTopOf="parent"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edMid" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/textView15" android:background="@drawable/my_inputborder" android:inputType="number" android:maxLength="8"/>
<TextView
android:text="@string/strMID"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView16" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/edMid"/>
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edTid" android:layout_marginStart="8dp" app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/textView16" android:background="@drawable/my_inputborder" android:layout_marginEnd="8dp"
app:layout_constraintEnd_toEndOf="parent" android:maxLength="16" android:inputType="textCapCharacters"/>
<TextView
android:text="@string/strProductionCode"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView17" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/edTid"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edProcode" android:layout_marginStart="8dp" app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/textView17" android:background="@drawable/my_inputborder" android:maxLength="6" android:inputType="number"/>
<TextView
android:text="@string/strBatchnumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView18" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/edProcode"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="number"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edBatch" android:layout_marginStart="8dp" app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/textView18" android:background="@drawable/my_inputborder" android:maxLength="2"/>
<TextView
android:text="@string/strReferenceNumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView19" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/edBatch"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edReference" android:layout_marginStart="8dp" app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/textView19" android:inputType="number" android:background="@drawable/my_inputborder"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
tools:context=".FragmentBankDKI" android:id="@+id/frameLayout7">
<!-- TODO: Update blank fragment layout -->
<TextView
android:text="@string/strTID"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView10" android:layout_marginTop="8dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="8dp"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edTID" android:layout_marginStart="8dp" app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/textView10" android:background="@drawable/my_inputborder" android:inputType="textCapCharacters" android:maxLength="8"/>
<TextView
android:text="@string/strMID"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView11" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/edTID"/>
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edMID" android:layout_marginStart="8dp" app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/textView11" android:background="@drawable/my_inputborder" android:inputType="number" android:layout_marginEnd="8dp"
app:layout_constraintEnd_toEndOf="parent" android:maxLength="15"/>
<TextView
android:text="@string/strStanStart"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView12" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/edMID"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edStanStart" android:layout_marginStart="8dp" app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/textView12" android:background="@drawable/my_inputborder" android:inputType="number" android:maxLength="5"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
tools:context=".FragmentBankMandiri" android:id="@+id/frameLayout6">
<!-- TODO: Update blank fragment layout -->
<TextView
android:text="@string/strSamPin"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView5" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="8dp"
app:layout_constraintTop_toTopOf="parent"/>
<EditText
android:id="@+id/edSamPin"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:background="@drawable/my_inputborder"
android:digits="0123456789ABCDEF"
android:ems="10"
android:importantForAutofill="no"
android:inputType="textCapCharacters"
android:maxLength="16"
android:maxLines="1"
android:text="@string/strBlank"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView5" />
<TextView
android:text="@string/strMID"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView6" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/edSamPin"/>
<EditText
android:id="@+id/edMID"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:background="@drawable/my_inputborder"
android:ems="10"
android:importantForAutofill="no"
android:inputType="number"
android:maxLength="4"
android:text="@string/strBlank"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView6" />
<TextView
android:text="@string/strTID"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView7" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/edMID"/>
<EditText
android:id="@+id/edTID"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:background="@drawable/my_inputborder"
android:ems="10"
android:inputType="number"
android:maxLength="8"
android:text="@string/strBlank"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView7" />
<TextView
android:text="@string/strKaPIN"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView8" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/edTID"/>
<EditText
android:id="@+id/edKAPin"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:background="@drawable/my_inputborder"
android:digits="0123456789ABCDEF"
android:ems="10"
android:inputType="textCapCharacters"
android:maxLength="16"
android:maxLines="1"
android:text="@string/strBlank"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView8" />
<TextView
android:text="@string/strMACTROS"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView9" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/edKAPin"/>
<EditText
android:id="@+id/edMactros"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:background="@drawable/my_inputborder"
android:digits="0123456789ABCDEF"
android:ems="10"
android:inputType="textCapCharacters"
android:maxLength="16"
android:maxLines="1"
android:text="@string/strBlank"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView9" />
<TextView
android:id="@+id/textView33"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="32dp"
android:text="@string/strPUK"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/edMactros" />
<EditText
android:id="@+id/edPuk"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="16dp"
android:ems="10"
android:inputType="textPersonName"
android:text="@string/strDefaultMimeData"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView33" />
<Button
android:id="@+id/btnUnblockPin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:text="@string/strUnblockPin"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/edPuk" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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:id="@+id/frameLayout3"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".FragmentBasic">
<!-- TODO: Update blank fragment layout -->
<Button
android:id="@+id/btnGetBalance"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/strGetBalance"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tvOpsResult"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/strBlank"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/pbProcess"
app:layout_constraintStart_toStartOf="@+id/btnGetBalance"
app:layout_constraintTop_toBottomOf="@+id/tvMimeRead" />
<ProgressBar
android:id="@+id/pbProcess"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvMimeRead" />
<Button
android:id="@+id/btnDeduct"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/strDeduct"
app:layout_constraintEnd_toEndOf="@+id/btnGetBalance"
app:layout_constraintStart_toStartOf="@+id/btnGetBalance"
app:layout_constraintTop_toBottomOf="@+id/edDeductValue" />
<EditText
android:id="@+id/edDeductValue"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:background="@drawable/my_inputborder"
android:ems="10"
android:inputType="numberSigned"
android:text="@string/strDefaultDeductValue"
android:textAlignment="textEnd"
android:textSize="24sp"
app:layout_constraintEnd_toEndOf="@+id/btnGetBalance"
app:layout_constraintStart_toStartOf="@+id/btnGetBalance"
app:layout_constraintTop_toBottomOf="@+id/btnGetBalance" />
<Button
android:id="@+id/btnGetReportMandiri"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/strMandiriGetReport"
app:layout_constraintEnd_toEndOf="@+id/btnGetBalance"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/guideline6"
app:layout_constraintTop_toBottomOf="@+id/btnDeduct" />
<EditText
android:id="@+id/edMimeWrite"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:background="@drawable/my_inputborder"
android:ems="10"
android:inputType="textPersonName"
android:text="@string/strDefaultMimeData"
android:textSize="24sp"
app:layout_constraintEnd_toEndOf="@+id/btnGetBalance"
app:layout_constraintStart_toStartOf="@+id/btnGetBalance"
app:layout_constraintTop_toBottomOf="@+id/btnResetPartial" />
<Button
android:id="@+id/btnWriteMime"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:text="@string/strWriteMime"
app:layout_constraintEnd_toStartOf="@+id/guideline6"
app:layout_constraintStart_toStartOf="@+id/btnGetBalance"
app:layout_constraintTop_toBottomOf="@+id/edMimeWrite" />
<TextView
android:id="@+id/tvMimeRead"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:background="@drawable/my_inputborder"
android:text="@string/strBlank"
android:textSize="24sp"
app:layout_constraintEnd_toEndOf="@+id/btnGetBalance"
app:layout_constraintStart_toStartOf="@+id/btnGetBalance"
app:layout_constraintTop_toBottomOf="@+id/btnWriteMime" />
<Button
android:id="@+id/btnReadMime"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/strReadMime"
app:layout_constraintEnd_toEndOf="@+id/btnGetBalance"
app:layout_constraintStart_toStartOf="@+id/guideline6"
app:layout_constraintTop_toBottomOf="@+id/edMimeWrite" />
<Button
android:id="@+id/btnResetPartial"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:text="@string/strResetPartial"
app:layout_constraintEnd_toStartOf="@+id/guideline6"
app:layout_constraintStart_toStartOf="@+id/btnGetBalance"
app:layout_constraintTop_toBottomOf="@+id/btnDeduct" />
<TextView
android:id="@+id/tvEnggineVersion"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:text="TextView"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<Button
android:id="@+id/btnDetectApplet"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:layout_marginEnd="8dp"
android:text="@string/strAppletDetector"
app:layout_constraintEnd_toStartOf="@+id/guideline6"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/btnGetBalance"
app:layout_constraintTop_toBottomOf="@+id/tvOpsResult" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.5" />
<Button
android:id="@+id/btnTransactionHist"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="32dp"
android:layout_marginEnd="16dp"
android:text="@string/strTransactionHist"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/guideline6"
app:layout_constraintTop_toBottomOf="@+id/tvOpsResult" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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:id="@+id/frameLayout3"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".FragmentBasicIsoDep">
<!-- TODO: Update blank fragment layout -->
<Button
android:id="@+id/btnGetBalance"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/strGetBalance"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tvOpsResult"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/strBlank"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/pbProcess"
app:layout_constraintStart_toStartOf="@+id/btnGetBalance"
app:layout_constraintTop_toBottomOf="@+id/tvMimeRead" />
<ProgressBar
android:id="@+id/pbProcess"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvMimeRead" />
<Button
android:id="@+id/btnDeduct"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/strDeduct"
app:layout_constraintEnd_toEndOf="@+id/btnGetBalance"
app:layout_constraintStart_toStartOf="@+id/btnGetBalance"
app:layout_constraintTop_toBottomOf="@+id/edDeductValue" />
<EditText
android:id="@+id/edDeductValue"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:background="@drawable/my_inputborder"
android:ems="10"
android:inputType="numberSigned"
android:text="@string/strDefaultDeductValue"
android:textAlignment="textEnd"
android:textSize="24sp"
app:layout_constraintEnd_toEndOf="@+id/btnGetBalance"
app:layout_constraintStart_toStartOf="@+id/btnGetBalance"
app:layout_constraintTop_toBottomOf="@+id/btnGetBalance" />
<Button
android:id="@+id/btnGetReportMandiri"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/strMandiriGetReport"
app:layout_constraintEnd_toEndOf="@+id/btnGetBalance"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/guideline6"
app:layout_constraintTop_toBottomOf="@+id/btnDeduct" />
<EditText
android:id="@+id/edMimeWrite"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:background="@drawable/my_inputborder"
android:ems="10"
android:inputType="textPersonName"
android:text="@string/strDefaultMimeData"
android:textSize="24sp"
app:layout_constraintEnd_toEndOf="@+id/btnGetBalance"
app:layout_constraintStart_toStartOf="@+id/btnGetBalance"
app:layout_constraintTop_toBottomOf="@+id/btnResetPartial" />
<Button
android:id="@+id/btnWriteMime"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:text="@string/strWriteMime"
app:layout_constraintEnd_toStartOf="@+id/guideline6"
app:layout_constraintStart_toStartOf="@+id/btnGetBalance"
app:layout_constraintTop_toBottomOf="@+id/edMimeWrite" />
<TextView
android:id="@+id/tvMimeRead"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:background="@drawable/my_inputborder"
android:text="@string/strBlank"
android:textSize="24sp"
app:layout_constraintEnd_toEndOf="@+id/btnGetBalance"
app:layout_constraintStart_toStartOf="@+id/btnGetBalance"
app:layout_constraintTop_toBottomOf="@+id/btnWriteMime" />
<Button
android:id="@+id/btnReadMime"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/strReadMime"
app:layout_constraintEnd_toEndOf="@+id/btnGetBalance"
app:layout_constraintStart_toStartOf="@+id/guideline6"
app:layout_constraintTop_toBottomOf="@+id/edMimeWrite" />
<Button
android:id="@+id/btnResetPartial"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:text="@string/strResetPartial"
app:layout_constraintEnd_toStartOf="@+id/guideline6"
app:layout_constraintStart_toStartOf="@+id/btnGetBalance"
app:layout_constraintTop_toBottomOf="@+id/btnDeduct" />
<TextView
android:id="@+id/tvEnggineVersion"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginBottom="8dp"
android:text="TextView"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<Button
android:id="@+id/btnDetectApplet"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:layout_marginEnd="8dp"
android:text="@string/strAppletDetector"
app:layout_constraintEnd_toStartOf="@+id/guideline6"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/btnGetBalance"
app:layout_constraintTop_toBottomOf="@+id/tvOpsResult" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.5" />
<Button
android:id="@+id/btnTransactionHist"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="32dp"
android:layout_marginEnd="16dp"
android:text="@string/strTransactionHist"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/guideline6"
app:layout_constraintTop_toBottomOf="@+id/tvOpsResult" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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:id="@+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".FragmentGeneral">
<!-- TODO: Update blank fragment layout -->
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:text="@string/strEdcEnggine"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tvEnggineVersion"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:text="@string/strBlank"
app:layout_constraintStart_toEndOf="@+id/textView2"
app:layout_constraintTop_toTopOf="parent" />
<Spinner
android:id="@+id/spEnggineUsed"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="64dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/spEnggineUsed">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<EditText
android:id="@+id/edDebugEnableToken"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:background="@drawable/my_inputborder"
android:text="@string/strBlank"
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView4" />
<Button
android:id="@+id/btnDecrypt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:text="Decrypt"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/edDebugEnableToken" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:text="@string/strDebugEnableToken"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tvDecryptLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:text="Decrypt result : "
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnDecrypt" />
<TextView
android:id="@+id/tvDecryptView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:text=""
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvDecryptLabel" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
<Button
android:id="@+id/btnSetRandom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:text="@string/strSetRandomString"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/spEnggineUsed" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
tools:context=".FragmentGeneral" android:id="@+id/frameLayout">
<!-- TODO: Update blank fragment layout -->
<TextView
android:text="@string/strEdcEnggine"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView2" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="16dp" android:layout_marginTop="8dp"
app:layout_constraintTop_toTopOf="parent"/>
<TextView
android:text="@string/strBlank"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/tvEnggineVersion" app:layout_constraintStart_toEndOf="@+id/textView2" android:layout_marginStart="16dp" android:layout_marginTop="8dp" app:layout_constraintTop_toTopOf="parent"/>
<Spinner
android:layout_width="0dp"
android:layout_height="wrap_content" android:id="@+id/spEnggineUsed" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="8dp" android:layout_marginTop="8dp" app:layout_constraintTop_toBottomOf="@+id/textView2"/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="64dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/spEnggineUsed">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<Button
android:id="@+id/btnUnlockAll"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Unlock All"
app:layout_constraintBottom_toBottomOf="@+id/btnPasteDebugRespons"
app:layout_constraintEnd_toStartOf="@+id/btnPasteDebugRespons" />
<Button
android:id="@+id/btnTestPrint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="testPrint"
app:layout_constraintBottom_toBottomOf="@+id/btnPasteDebugRespons"
app:layout_constraintEnd_toStartOf="@+id/btnUnlockAll" />
<Button
android:id="@+id/btnPasteDebugRespons"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:text="@string/strPasteDebugRespons"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/edCertDebugToken" />
<TextView
android:id="@+id/textView20"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="@string/strDebugExpirity"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/tvDebugExpirity" />
<EditText
android:id="@+id/edDebugEnableToken"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:background="@drawable/my_inputborder"
android:editable="false"
android:ems="10"
android:inputType="none"
android:maxLines="100"
android:singleLine="false"
android:text="@string/strBlank"
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView4" />
<Button
android:id="@+id/btnCopyDebugToken"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:text="@string/strCopyDebugToken"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/edDebugEnableToken" />
<EditText
android:id="@+id/edCertDebugToken"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:background="@drawable/my_inputborder"
android:editable="false"
android:ems="10"
android:inputType="none"
android:maxLines="100"
android:singleLine="false"
android:text="@string/strBlank"
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btnCopyDebugToken" />
<CheckBox
android:id="@+id/cbMandiriEnable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:clickable="false"
android:enabled="false"
android:text="@string/strMandiri"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView21" />
<CheckBox
android:id="@+id/cbBCAEnable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:clickable="false"
android:enabled="false"
android:text="@string/strBankBCA"
app:layout_constraintStart_toStartOf="@+id/guideline"
app:layout_constraintTop_toBottomOf="@+id/cbBRIEnable" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:text="@string/strDebugEnableToken"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="177dp" />
<TextView
android:id="@+id/textView21"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/strSupportedBank"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cbDebugEnable" />
<TextView
android:id="@+id/tvDebugExpirity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="TextView"
app:layout_constraintBottom_toBottomOf="@+id/btnPasteDebugRespons"
app:layout_constraintStart_toEndOf="@+id/textView20"
app:layout_constraintTop_toBottomOf="@+id/btnUnlockAll" />
<CheckBox
android:id="@+id/cbBNIEnable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:clickable="false"
android:enabled="false"
android:text="@string/strBankBNI"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cbMandiriEnable" />
<CheckBox
android:id="@+id/cbBRIEnable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:clickable="false"
android:enabled="false"
android:text="@string/strBankBRI"
app:layout_constraintStart_toStartOf="@+id/guideline"
app:layout_constraintTop_toBottomOf="@+id/textView21" />
<CheckBox
android:id="@+id/cbDebugEnable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:clickable="false"
android:enabled="false"
android:text="@string/strDebugEnable"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btnPasteDebugRespons" />
<CheckBox
android:id="@+id/cbDKIEnable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:enabled="false"
android:text="@string/strBankDKI"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cbBNIEnable" />
<CheckBox
android:id="@+id/cbNobu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:enabled="false"
android:text="@string/strNobuBank"
app:layout_constraintStart_toStartOf="@+id/guideline"
app:layout_constraintTop_toBottomOf="@+id/cbBCAEnable" />
<CheckBox
android:id="@+id/cbIconoxEnable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:enabled="false"
android:text="@string/strIconox"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cbDKIEnable" />
<CheckBox
android:id="@+id/cbMDDSingletrip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:enabled="false"
android:text="@string/strMDD"
app:layout_constraintStart_toStartOf="@+id/guideline"
app:layout_constraintTop_toBottomOf="@+id/cbNobu" />
<CheckBox
android:id="@+id/cbMandiriTopOff"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="32dp"
android:enabled="false"
android:text="@string/strMandiriTopOff"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cbLoketTimezoneEnable" />
<CheckBox
android:id="@+id/cbMandiriC2C"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="32dp"
android:enabled="false"
android:text="@string/strMandiriC2C"
app:layout_constraintStart_toStartOf="@+id/guideline"
app:layout_constraintTop_toBottomOf="@+id/cbMegaEnable" />
<CheckBox
android:id="@+id/cbMandiriApi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:enabled="false"
android:text="@string/strMandiriApi"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cbMandiriTopOff" />
<CheckBox
android:id="@+id/cbBNIC2C"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:enabled="false"
android:text="@string/strBNIC2C"
app:layout_constraintStart_toStartOf="@+id/guideline"
app:layout_constraintTop_toBottomOf="@+id/cbMandiriC2C" />
<CheckBox
android:id="@+id/cbBRIAPI"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:enabled="false"
android:text="@string/strBriApi"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cbMandiriApi" />
<CheckBox
android:id="@+id/cbBNIApi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:enabled="false"
android:text="@string/strBNIApi"
app:layout_constraintStart_toStartOf="@+id/guideline"
app:layout_constraintTop_toBottomOf="@+id/cbBNIC2C" />
<CheckBox
android:id="@+id/cbLoketTimezoneEnable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/strLoketEnable"
android:enabled="false"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cbIconoxEnable" />
<CheckBox
android:id="@+id/cbMegaEnable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/strBankMega"
android:enabled="false"
app:layout_constraintStart_toStartOf="@+id/guideline"
app:layout_constraintTop_toBottomOf="@+id/cbMDDSingletrip" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
<Button
android:id="@+id/btnSetRandom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:text="@string/strSetRandomString"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/spEnggineUsed" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
tools:context=".FragmentMagStripe" android:id="@+id/frameLayout15">
<!-- TODO: Update blank fragment layout -->
<Button
android:text="@string/strReadMagStripe"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/btnReadMagStripe" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="8dp" android:layout_marginTop="32dp"
app:layout_constraintTop_toTopOf="parent"/>
<TextView
android:text="@string/strBlank"
android:layout_width="0dp"
android:layout_height="wrap_content" android:id="@+id/tvMagOpsResult" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginBottom="32dp" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/pbMagOps" android:layout_marginEnd="8dp"/>
<TextView
android:text="@string/strTrack1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView29" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="32dp" app:layout_constraintTop_toBottomOf="@+id/btnReadMagStripe"/>
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:inputType="none"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edTrack1" android:layout_marginStart="8dp" app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="8dp" app:layout_constraintTop_toBottomOf="@+id/textView29" android:layout_marginEnd="8dp" app:layout_constraintEnd_toEndOf="parent"
android:editable="false"/>
<TextView
android:text="@string/strTrack2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView30" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="8dp" app:layout_constraintTop_toBottomOf="@+id/edTrack1"/>
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:inputType="none"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edTrack2" android:layout_marginStart="8dp" app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="8dp" app:layout_constraintTop_toBottomOf="@+id/textView30" android:layout_marginEnd="8dp" app:layout_constraintEnd_toEndOf="parent"
android:editable="false"/>
<TextView
android:text="@string/strTrack3"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView31" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="8dp" app:layout_constraintTop_toBottomOf="@+id/edTrack2"/>
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:inputType="none"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edTrack3" android:layout_marginStart="8dp" app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="8dp" app:layout_constraintTop_toBottomOf="@+id/textView31" android:layout_marginEnd="8dp" app:layout_constraintEnd_toEndOf="parent"/>
<ProgressBar
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/pbMagOps" app:layout_constraintBottom_toBottomOf="@+id/tvMagOpsResult" app:layout_constraintTop_toTopOf="@+id/tvMagOpsResult" app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="8dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
tools:context=".FragmentMifare" android:id="@+id/frameLayout14">
<!-- TODO: Update blank fragment layout -->
<Button
android:text="@string/strMifareWrite"
android:layout_width="0dp"
android:layout_height="49dp" android:id="@+id/btnMifareWrite" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="8dp"
app:layout_constraintHorizontal_bias="0.367" android:layout_marginTop="8dp" app:layout_constraintTop_toBottomOf="@+id/edMFWriteData"/>
<EditText
android:id="@+id/edMFWriteData"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="32dp"
android:ems="10"
android:inputType="textCapCharacters"
android:text="@string/strDefaultMimeData"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/edMifareKey" />
<TextView
android:text="@string/strBlank"
android:layout_width="0dp"
android:layout_height="wrap_content" android:id="@+id/tvMifareRead" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="8dp"
android:layout_marginTop="32dp" app:layout_constraintTop_toBottomOf="@+id/btnMifareWrite" android:background="@drawable/my_inputborder" android:textSize="18sp"/>
<Button
android:text="@string/strMifareRead"
android:layout_width="0dp"
android:layout_height="wrap_content" android:id="@+id/btnMifareRead" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="8dp" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/tvMifareRead"/>
<ProgressBar
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/pgMifareProgress" app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="32dp" app:layout_constraintBottom_toBottomOf="@+id/tvOpsMifareResult" app:layout_constraintTop_toTopOf="@+id/tvOpsMifareResult"/>
<TextView
android:text="TextView"
android:layout_width="0dp"
android:layout_height="wrap_content" android:id="@+id/tvOpsMifareResult" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@+id/pgMifareProgress" android:layout_marginEnd="8dp" android:layout_marginBottom="32dp" app:layout_constraintBottom_toBottomOf="parent" android:layout_marginStart="32dp"/>
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:inputType="textCapCharacters"
android:text="@string/strDefaultMifareKey"
android:ems="10"
android:id="@+id/edMifareKey" android:layout_marginStart="8dp" app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="8dp" app:layout_constraintTop_toBottomOf="@+id/textView26"/>
<TextView
android:text="@string/strMifareKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView26" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="8dp" app:layout_constraintTop_toTopOf="parent"/>
<Spinner
android:layout_width="0dp"
android:layout_height="wrap_content" android:id="@+id/spMifareKeyType" app:layout_constraintStart_toEndOf="@+id/edMifareKey" android:layout_marginStart="16dp" app:layout_constraintBottom_toBottomOf="@+id/edMifareKey" app:layout_constraintTop_toTopOf="@+id/edMifareKey"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="8dp" android:entries="@array/mfKey"/>
<EditText
android:id="@+id/edBlockNr"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:ems="10"
android:inputType="textPersonName"
android:text="@string/strBlockNr"
app:layout_constraintBottom_toBottomOf="@+id/edMFWriteData"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/edMFWriteData"
app:layout_constraintTop_toTopOf="@+id/edMFWriteData"
app:layout_constraintVertical_bias="0.0" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="15dp"
tools:context=".FragmentPrepaidBri">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/card_no"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Tap your card"/>
<TextView
android:id="@+id/result"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:text="Result"/>
<TextView
android:id="@+id/message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:text="Message"/>
</LinearLayout>
</FrameLayout>
\ No newline at end of file
<?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"
tools:context=".FragmentRoot" android:id="@+id/frameLayout2">
<!-- TODO: Update blank fragment layout -->
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
tools:context=".FragmentTopupApiBRI">
<Button
android:id="@+id/btnPendingTopup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:text="@string/strPendingBalance"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/edPendingValue" />
<EditText
android:id="@+id/edPendingValue"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:ems="10"
android:inputType="textPersonName"
android:text="@string/strDefaultTopupValue"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/btnUpdateBalance"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="32dp"
android:layout_marginEnd="16dp"
android:text="@string/strUpdateBalanceInquiry"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btnPendingTopup" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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:id="@+id/frameLayout18"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".FragmentTopupApiBRIIsoDep">
<Button
android:id="@+id/btnPendingTopup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:text="@string/strPendingBalance"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/edPendingValue" />
<EditText
android:id="@+id/edPendingValue"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:ems="10"
android:inputType="textPersonName"
android:text="@string/strDefaultTopupValue"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/btnUpdateBalance"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="32dp"
android:layout_marginEnd="16dp"
android:text="@string/strUpdateBalanceInquiry"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btnPendingTopup" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
tools:context=".FragmentTopupApiBNI" android:id="@+id/frameLayout16">
<!-- TODO: Update blank fragment layout -->
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="number"
android:text="@string/strDefaultTopupValue"
android:ems="10"
android:id="@+id/edBniTopupApiAmount" android:layout_marginTop="8dp" app:layout_constraintTop_toTopOf="parent" android:layout_marginEnd="8dp" app:layout_constraintEnd_toEndOf="parent"/>
<Button
android:text="@string/strInQuiryPayment"
android:layout_width="0dp"
android:layout_height="wrap_content" android:id="@+id/btnBniTopupApiPayment" app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="8dp" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="16dp"
app:layout_constraintTop_toBottomOf="@+id/edBniTopupApiAmount"/>
<TextView
android:text="TextView"
android:layout_width="0dp"
android:layout_height="wrap_content" android:id="@+id/tvOpsResultApi" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="16dp" android:layout_marginBottom="32dp" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/pbApiBniProgress" android:layout_marginEnd="8dp"/>
<ProgressBar
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/pbApiBniProgress" app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="8dp" app:layout_constraintBottom_toBottomOf="@+id/tvOpsResultApi" app:layout_constraintTop_toTopOf="@+id/tvOpsResultApi"/>
<Button
android:text="@string/strUpdateBalance"
android:layout_width="0dp"
android:layout_height="wrap_content" android:id="@+id/btnBniTopupApiUpdate" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginTop="32dp" app:layout_constraintTop_toBottomOf="@+id/btnBniTopupApiPayment"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="8dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
tools:context=".FragmentTopupApiDKI">
<Button
android:id="@+id/btnPendingTopup"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:text="@string/strPendingBalance"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/edPendingValue" />
<EditText
android:id="@+id/edPendingValue"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:ems="10"
android:inputType="textPersonName"
android:text="@string/strDefaultTopupValue"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/btnUpdateBalance"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="32dp"
android:layout_marginEnd="16dp"
android:text="@string/strUpdateBalanceInquiry"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/edServerLoadRespons" />
<TextView
android:id="@+id/textView27"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/strServerRespons"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/edBit48" />
<EditText
android:id="@+id/edServerLoadRespons"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:editable="false"
android:ems="10"
android:gravity="start|top"
android:inputType="textMultiLine"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView27"
android:importantForAutofill="no" />
<TextView
android:id="@+id/textView28"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:text="@string/strBit48"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btnPendingTopup" />
<EditText
android:id="@+id/edBit48"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:editable="false"
android:ems="10"
android:inputType="textPersonName"
android:text="@string/strBlank"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView28" />
<TextView
android:id="@+id/textView32"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/strLoadRespons"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btnUpdateBalance" />
<EditText
android:id="@+id/edLoadRespons"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:editable="false"
android:ems="10"
android:importantForAutofill="no"
android:inputType="textPersonName"
android:text="@string/strBlank"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView32" />
<Button
android:id="@+id/btnConfirmSuccess"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:text="@string/strConfirmSession"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/edLoadRespons" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
tools:context=".FragmentTopupApiMandiri" android:id="@+id/frameLayout5">
<!-- TODO: Update blank fragment layout -->
<TextView
android:text="@string/strBlank"
android:layout_width="0dp"
android:layout_height="wrap_content" android:id="@+id/tvOpsResultApi" app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="32dp" android:layout_marginBottom="32dp" app:layout_constraintBottom_toBottomOf="parent"
android:textStyle="bold" android:layout_marginEnd="8dp" app:layout_constraintEnd_toStartOf="@+id/guideline3"/>
<Button
android:text="@string/strPendingBalance"
android:layout_width="0dp"
android:layout_height="wrap_content" android:id="@+id/btnPendingBalance" app:layout_constraintEnd_toEndOf="parent"
android:layout_marginEnd="16dp" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="16dp"
app:layout_constraintHorizontal_bias="1.0" android:layout_marginTop="16dp" app:layout_constraintTop_toBottomOf="@+id/edMandiriTopupApiValue"/>
<Button
android:text="@string/strUpdateBalance"
android:layout_width="0dp"
android:layout_height="wrap_content" android:id="@+id/btnUpdateBalance" app:layout_constraintEnd_toEndOf="parent"
android:layout_marginEnd="16dp" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="16dp" android:layout_marginTop="32dp"
app:layout_constraintTop_toBottomOf="@+id/btnPendingBalance"/>
<ProgressBar
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/pgProcess"
android:layout_marginEnd="16dp" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/tvOpsResultApi" app:layout_constraintBottom_toBottomOf="@+id/tvOpsResultApi"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/strDefaultTopupValue"
android:ems="10"
android:id="@+id/edMandiriTopupApiValue" android:layout_marginTop="8dp" app:layout_constraintTop_toTopOf="parent" android:layout_marginEnd="16dp" app:layout_constraintEnd_toEndOf="parent" android:inputType="number"/>
<androidx.constraintlayout.widget.Guideline android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/guideline3" app:layout_constraintGuide_begin="319dp" android:orientation="vertical"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<ScrollView 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:id="@+id/frameLayout5"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".FragmentTopupC2C">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/frameLayout4"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- TODO: Update blank fragment layout -->
<EditText
android:id="@+id/edOfflinemandiriTopupValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="16dp"
android:ems="10"
android:inputType="number"
android:text="@string/strDefaultTopupValue"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/guideline2"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/btnTopupOffline"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:text="@string/strTopup"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/edOfflinemandiriTopupValue" />
<Button
android:id="@+id/btnTopupCorrection"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/strTopupCorrection"
app:layout_constraintEnd_toEndOf="@+id/btnTopupOffline"
app:layout_constraintStart_toStartOf="@+id/btnTopupOffline"
app:layout_constraintTop_toBottomOf="@+id/btnTopupOffline" />
<Button
android:id="@+id/btnGetBalanceDepositNew"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/strGetBalanceDeposit"
app:layout_constraintEnd_toEndOf="@+id/btnTopupOffline"
app:layout_constraintStart_toStartOf="@+id/btnTopupOffline"
app:layout_constraintTop_toBottomOf="@+id/btnTopupCorrection" />
<Button
android:id="@+id/btnGetReportDirect"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="Get Report (Direct)"
app:layout_constraintEnd_toEndOf="@+id/btnTopupOffline"
app:layout_constraintStart_toStartOf="@+id/btnTopupOffline"
app:layout_constraintTop_toBottomOf="@+id/btnGetBalanceDepositNew" />
<EditText
android:id="@+id/edRq1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:background="@drawable/my_inputborder"
android:ems="10"
android:inputType="textCapCharacters"
android:text="@string/strBlank"
app:layout_constraintEnd_toEndOf="@+id/btnTopupOffline"
app:layout_constraintStart_toStartOf="@+id/btnTopupOffline"
app:layout_constraintTop_toBottomOf="@+id/btnGenerateRq1New" />
<EditText
android:id="@+id/edRsp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:ems="10"
android:inputType="textCapCharacters"
android:text="@string/strBlank"
app:layout_constraintEnd_toEndOf="@+id/btnTopupOffline"
app:layout_constraintStart_toStartOf="@+id/btnTopupOffline"
app:layout_constraintTop_toBottomOf="@+id/edRq1" />
<Button
android:id="@+id/btnGenerateRq1Old"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/strGetFeeOld"
app:layout_constraintEnd_toEndOf="@+id/btnGetReportDirect"
app:layout_constraintStart_toStartOf="@+id/guideline2"
app:layout_constraintTop_toBottomOf="@+id/btnGetReportDirect" />
<Button
android:id="@+id/btnGenerateRq1New"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:text="@string/strGetFeeNew"
app:layout_constraintEnd_toStartOf="@+id/guideline2"
app:layout_constraintStart_toStartOf="@+id/btnGetReportDirect"
app:layout_constraintTop_toBottomOf="@+id/btnGetReportDirect" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.50121653" />
<TextView
android:id="@+id/tvOpsResult"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:text="@string/strBlank"
app:layout_constraintTop_toBottomOf="@id/btnForceSettlementNew"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/pbProgressTopup"
app:layout_constraintStart_toStartOf="parent" />
<ProgressBar
android:id="@+id/pbProgressTopup"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
app:layout_constraintTop_toBottomOf="@id/btnForceSettlementNew"
app:layout_constraintBottom_toBottomOf="@+id/tvOpsResult"
app:layout_constraintEnd_toEndOf="parent" />
<Button
android:id="@+id/btnSetFeeUpdateNew"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:text="@string/strSetFeeUpdateNew"
app:layout_constraintEnd_toStartOf="@+id/guideline2"
app:layout_constraintStart_toStartOf="@+id/btnTopupOffline"
app:layout_constraintTop_toBottomOf="@+id/edRsp" />
<Button
android:id="@+id/btnSetFeeOld"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/strSetFeeUpdateOld"
app:layout_constraintEnd_toEndOf="@+id/edRsp"
app:layout_constraintStart_toStartOf="@+id/guideline2"
app:layout_constraintTop_toBottomOf="@+id/edRsp" />
<Button
android:id="@+id/btnForceSettlementNew"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:text="@string/strForceSettlementNew"
app:layout_constraintEnd_toStartOf="@+id/guideline2"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/btnGetBalanceDepositNew"
app:layout_constraintTop_toBottomOf="@+id/btnSetFeeUpdateNew" />
<Button
android:id="@+id/btnForceSettlementOld"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/strForceSettlementOld"
app:layout_constraintEnd_toEndOf="@+id/btnGetBalanceDepositNew"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/guideline2"
app:layout_constraintTop_toBottomOf="@+id/btnSetFeeOld" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
\ No newline at end of file
<?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:id="@+id/frameLayout17"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".FragmentTopupC2CDKI">
<!-- TODO: Update blank fragment layout -->
<TextView
android:id="@+id/tvMessage"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="32dp"
android:text="@string/strMenuHome"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<EditText
android:id="@+id/edTopupDkiValue"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:ems="10"
android:inputType="number"
android:text="@string/strDefaultTopupValue"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/btnDkiTopup"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:text="@string/strTopup"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/edTopupDkiValue" />
<Button
android:id="@+id/btnDkiDepositBalance"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="32dp"
android:layout_marginEnd="16dp"
android:text="@string/strGetBalanceDeposit"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btnDkiTopup" />
<Button
android:id="@+id/btnLsamInitializeLoad"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:text="@string/strLsamInitializeLoad"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btnDkiDepositBalance" />
<EditText
android:id="@+id/edServerLoadRespons"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:ems="10"
android:inputType="textPersonName"
android:text="@string/strBlank"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btnLsamInitializeLoad" />
<Button
android:id="@+id/btnLsamLoad"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:text="@string/strLsamLoad"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/edServerLoadRespons" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
tools:context=".FragmentTopupC2CBNI" android:id="@+id/frameLayout12">
<!-- TODO: Update blank fragment layout -->
<Button
android:text="@string/strTopupInit"
android:layout_width="0dp"
android:layout_height="wrap_content" android:id="@+id/btnInitTopupC2CBNI" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="8dp" android:layout_marginTop="32dp"
app:layout_constraintTop_toTopOf="parent"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/strDefaultTopupValue"
android:ems="10"
android:id="@+id/edBNITopupValue" android:layout_marginTop="32dp" app:layout_constraintTop_toBottomOf="@+id/btnInitTopupC2CBNI" android:layout_marginEnd="16dp" app:layout_constraintEnd_toEndOf="parent" android:inputType="number"/>
<Button
android:text="@string/strTopup"
android:layout_width="0dp"
android:layout_height="wrap_content" android:id="@+id/btnBNITopupC2C" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="8dp" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/edBNITopupValue"/>
<TextView
android:text="@string/strBlank"
android:layout_width="0dp"
android:layout_height="wrap_content" android:id="@+id/tvBNITopupC2CResult" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp" android:layout_marginBottom="32dp" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/guideline5" android:layout_marginEnd="8dp"/>
<ProgressBar
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/pbBNITopupC2Cprogress" app:layout_constraintBottom_toBottomOf="@+id/tvBNITopupC2CResult" app:layout_constraintTop_toTopOf="@+id/tvBNITopupC2CResult" app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="8dp"/>
<androidx.constraintlayout.widget.Guideline android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/guideline5" app:layout_constraintGuide_begin="327dp" android:orientation="vertical"/>
<Button
android:id="@+id/btnBNIRefillC2C"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="32dp"
android:layout_marginEnd="8dp"
android:text="@string/strRefill"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btnBNITopupC2C" />
<Button
android:id="@+id/btnBNIDepositBalanceC2C"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:text="@string/strGetBalanceDeposit"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btnBNIRefillC2C" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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:id="@+id/frameLayout17"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textInputLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/txtInputAmount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/amount"
android:inputType="number" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:id="@+id/linearLayout3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textInputLayout">
<Button
android:id="@+id/btnPendingTopup"
style="@style/Widget.Design.BottomNavigationView"
android:layout_width="130dp"
android:layout_height="55dp"
android:text="@string/pending_topup" />
<Button
android:id="@+id/btnUpdateBalance"
style="@style/Widget.Design.BottomNavigationView"
android:layout_width="130dp"
android:layout_height="55dp"
android:text="@string/strUpdateBalance" />
</LinearLayout>
<TextView
android:id="@+id/tvResponse"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="Reponse"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
tools:context=".FragmentTopupOfflineMandiri">
<EditText
android:id="@+id/edOfflinemandiriTopupValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="32dp"
android:layout_marginEnd="16dp"
android:ems="10"
android:importantForAutofill="no"
android:inputType="number"
android:text="@string/strDefaultTopupValue"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.718"
app:layout_constraintStart_toStartOf="@+id/guideline2"
app:layout_constraintTop_toBottomOf="@+id/btnMutualAuth" />
<Button
android:id="@+id/btnTopupOffline"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/strTopup"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintHorizontal_bias="0.0"
android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/edOfflinemandiriTopupValue" />
<Button
android:text="@string/strTopupCorrection"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/btnTopupCorrection"
app:layout_constraintStart_toStartOf="@+id/btnTopupOffline"
app:layout_constraintEnd_toEndOf="@+id/btnTopupOffline"
android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/btnTopupOffline" />
<Button
android:id="@+id/btnGetBalanceDepositNew"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginEnd="8dp"
android:text="@string/strGetBalanceDeposit"
app:layout_constraintEnd_toStartOf="@+id/guideline2"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/btnTopupOffline"
app:layout_constraintTop_toBottomOf="@+id/btnTopupCorrection" />
<EditText
android:id="@+id/edRq1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:background="@drawable/my_inputborder"
android:ems="10"
android:inputType="textCapCharacters"
android:text="@string/strBlank"
app:layout_constraintEnd_toEndOf="@+id/btnTopupOffline"
app:layout_constraintStart_toStartOf="@+id/btnTopupOffline"
app:layout_constraintTop_toBottomOf="@+id/btnGenerateRq1New"
android:importantForAutofill="no" />
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/strBlank"
android:ems="10"
android:id="@+id/edRsp"
app:layout_constraintStart_toStartOf="@+id/btnTopupOffline"
app:layout_constraintEnd_toEndOf="@+id/btnTopupOffline"
android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/edRq1"
android:inputType="textCapCharacters"
android:importantForAutofill="no" />
<Button
android:id="@+id/btnGenerateRq1Old"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:text="@string/strGenerateRq1Old"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/guideline2"
app:layout_constraintTop_toBottomOf="@+id/btnGetBalanceDepositOld" />
<Button
android:id="@+id/btnGenerateRq1New"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:text="@string/strGenerateRQ1New"
app:layout_constraintEnd_toStartOf="@+id/guideline2"
app:layout_constraintStart_toStartOf="@+id/btnGetBalanceDepositNew"
app:layout_constraintTop_toBottomOf="@+id/btnGetBalanceDepositNew" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.50121653" />
<TextView
android:id="@+id/tvOpsResult"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="16dp"
android:text="@string/strBlank"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/pbProgressTopup"
app:layout_constraintStart_toStartOf="parent" />
<ProgressBar
android:id="@+id/pbProgressTopup"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
app:layout_constraintBottom_toBottomOf="@+id/tvOpsResult"
app:layout_constraintEnd_toEndOf="parent" />
<Button
android:id="@+id/btnGetBalanceDepositOld"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="16dp"
android:text="@string/strGetBalanceDeposit"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/guideline2"
app:layout_constraintTop_toTopOf="@+id/btnGetBalanceDepositNew" />
<Button
android:id="@+id/btnUpdateRSPNew"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:text="@string/strUpdateRSPNew"
app:layout_constraintEnd_toStartOf="@+id/guideline2"
app:layout_constraintStart_toStartOf="@+id/btnTopupOffline"
app:layout_constraintTop_toBottomOf="@+id/edRsp" />
<Button
android:id="@+id/btnUpdateRSPOld"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:text="@string/strUpdateRSPOld"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/guideline2"
app:layout_constraintTop_toBottomOf="@+id/edRsp" />
<Button
android:id="@+id/btnMutualAuth"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/strMutualAuth"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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="125dp"
android:background="@drawable/side_nav_bar"
android:gravity="bottom"
android:theme="@style/ThemeOverlay.AppCompat.Dark" android:id="@+id/linearLayout">
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/ic_launcher_round"
android:paddingTop="@dimen/nav_header_vertical_spacing"
android:layout_marginTop="32dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="16dp"
android:layout_marginBottom="8dp" app:layout_constraintBottom_toBottomOf="parent" android:scaleType="fitCenter"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingTop="@dimen/nav_header_vertical_spacing"
android:text="User Name"
android:id="@+id/textView3"
app:layout_constraintStart_toEndOf="@+id/imageView" android:layout_marginStart="32dp"
android:layout_marginEnd="8dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="@+id/imageView"/>
<TextView
android:id="@+id/textView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Company Name"
app:layout_constraintStart_toEndOf="@+id/imageView" android:layout_marginStart="32dp" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/textView3" app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="8dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:title="@string/strMenuHome" android:id="@+id/menuHome" android:icon="@drawable/twotone_home_black_48"/>
<item android:title="@string/strMenuBasic" android:id="@+id/menuBasic" android:icon="@drawable/twotone_payment_black_48"/>
<item android:title="@string/strMenuBasicIsoDep" android:id="@+id/menuBasicIsoDep" android:icon="@drawable/twotone_payment_black_48"/>
<item android:title="@string/strMifareClassic" android:id="@+id/menuMifare" android:icon="@drawable/twotone_casino_black_48"/>
<group
android:checkableBehavior="none">
<item android:title="@string/strMandiriTopup">
<menu>
<item android:title="@string/strMandiriTopupDeposit" android:id="@+id/menuTopUpDeposit" android:icon="@drawable/twotone_filter_2_black_48"/>
<item android:title="@string/strTopupOffline" android:id="@+id/menuTopUpOffline" android:icon="@drawable/twotone_filter_2_black_48"/>
<item android:title="@string/strTopupC2C" android:id="@+id/menuTopUpC2C" android:icon="@drawable/twotone_filter_2_black_48"/>
<item android:title="@string/strMandiriTopupApi" android:id="@+id/menuTopUpApi" android:icon="@drawable/twotone_http_black_48"/>
</menu>
</item>
</group>
<group android:checkableBehavior="none">
<item android:title="@string/strBniTopup">
<menu>
<item android:title="@string/strBniTopupC2C" android:id="@+id/menuTopupC2CBNI" android:icon="@drawable/twotone_filter_2_black_48"/>
<item android:title="@string/strBniTopupApi" android:id="@+id/menuTopupApiBNI" android:icon="@drawable/twotone_http_black_48"/>
<item android:title="@string/strPaymentModule" android:id="@+id/menuPmBNI" android:icon="@drawable/twotone_store_black_48"/>
</menu>
</item>
</group>
<group android:checkableBehavior="none">
<item android:title="@string/strBriTopup">
<menu>
<item android:title="@string/strBriTopupApi" android:id="@+id/menuTopupApiBRI" android:icon="@drawable/twotone_http_black_48"/>
<item android:title="@string/prepaid_brizzi" android:id="@+id/menuPrepaidBrizzi" android:icon="@drawable/twotone_http_black_48"/>
</menu>
</item>
</group>
<group android:checkableBehavior="none">
<item android:title="@string/strDkiTopup">
<menu>
<item android:title="@string/strDkiTopupC2C" android:id="@+id/menuTopupC2CDKI" android:icon="@drawable/twotone_filter_2_black_48"/>
<item android:title="@string/strDkiTopupApi" android:id="@+id/menuTopupApiDKI" android:icon="@drawable/twotone_http_black_48"/>
</menu>
</item>
</group>
<group>
<item android:title="@string/strMisc">
<menu
>
<item android:title="Decrypt Function" android:id="@+id/menuDecryot" android:icon="@drawable/twotone_payment_black_48"/>
<item android:title="@string/strMagneticStripeTest" android:id="@+id/menuMagneticStripe" android:icon="@drawable/twotone_payment_black_48"/>
<item android:title="@string/strAbout" android:id="@+id/menuAbout" android:icon="@drawable/twotone_device_hub_black_48"/>
</menu>
</item>
</group>
</menu>
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:title="@string/strMenuSettings" android:id="@+id/menuSettings" android:icon="@drawable/twotone_build_white_48" app:showAsAction="always"/>
</menu>
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<resources>>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
<style name="MyMaterialTheme" parent="MyMaterialTheme.Base">
<item name="android:windowContentTransitions">true</item>
<item name="android:windowAllowEnterTransitionOverlap">true</item>
<item name="android:windowAllowReturnTransitionOverlap">true</item>
<item name="android:windowSharedElementEnterTransition">@android:transition/move</item>
<item name="android:windowSharedElementExitTransition">@android:transition/move</item>
</style>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#008577</color>
<color name="colorPrimaryDark">#00574B</color>
<color name="colorAccent">#D81B60</color>
</resources>
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="nav_header_vertical_spacing">16dp</dimen>
<dimen name="nav_header_height">160dp</dimen>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="fab_margin">16dp</dimen>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="tab_max_width">264dp</dimen>
<dimen name="tab_padding_bottom">16dp</dimen>
<dimen name="tab_label">14sp</dimen>
<dimen name="custom_tab_layout_height">72dp</dimen>
</resources>
<resources>
<string name="app_name">MULTIDEV SIMULATOR</string>
<string name="navigation_drawer_open">Open navigation drawer</string>
<string name="navigation_drawer_close">Close navigation drawer</string>
<string name="strFindCard">FindCard</string>
<string name="strMenuSettings">Settings</string>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
<string name="strMenuHome">Home</string>
<string name="strMenuBasic">Basic Operational</string>
<string name="strMenuBasicIsoDep">Basic Operational (IsoDep)</string>
<string name="strGetBalance">Get Balance</string>
<string name="strBlank" />
<string name="strDeduct">DEDUCT</string>
<string name="strDefaultDeductValue">10</string>
<string name="strMandiriGetReport">Get Report (Mandiri)</string>
<string name="strTopupOffline">Mandiri Topup Offline</string>
<string name="strTopupC2C">Mandiri Topup C2C</string>
<string name="strMandiriTopupApi">Mandiri Topup API</string>
<string name="strWriteMime">Write Mime</string>
<string name="strReadMime">Read Mime</string>
<string name="strTopup">TOPUP</string>
<string name="strTopupCorrection">CORRECTION</string>
<string name="strGetBalanceDeposit">GET BALANCE (DEPOSIT)</string>
<string name="strGetFeeNew">GET FEE (NEW)</string>
<string name="strGetFeeOld">GET FEE (OLD)</string>
<string name="strSetFeeUpdateNew">SET FEE (NEW)</string>
<string name="strSetFeeUpdateOld">SET FEE (OLD)</string>
<string name="strEdcEnggine">EDC Enggine</string>
<string name="strSamPin">SAM PIN</string>
<string name="strMID">MID</string>
<string name="strTID">TID</string>
<string name="strKaPIN">KA PIN</string>
<string name="strMACTROS">MACTROS</string>
<string name="strMinBalance">Minumum Balance</string>
<string name="strMerriedCode">MERRIED CODE</string>
<string name="strDefaultMerriedCode">53F1D59BB4DF1120A4E16DF4DDF340B5</string>
<string name="strProductionCode">PRODUCTION CODE</string>
<string name="strBatchnumber">BATCH NUMBER</string>
<string name="strReferenceNumber">REFERENCE NUMBER</string>
<string name="strBniTopupC2C">BNI Topup C2C</string>
<string name="strBniTopupApi">BNI Topup Api</string>
<string name="strMandiriTopup">Mandiri Topup</string>
<string name="strBniTopup">BNI Topup</string>
<string name="strBriTopup">BRI Topup</string>
<string name="strBriTopupApi">BRI Topup Api</string>
<string name="strDkiTopup">DKI Topup</string>
<string name="strDkiTopupC2C">DKI Topup C2C</string>
<string name="strDkiTopupApi">DKI Topup Api</string>
<string name="strDefaultMimeData">0123456789ABCDEF</string>
<string name="strTest">Test Button</string>
<string name="strInQuiryPayment">Inquiry Payment</string>
<string name="strPendingPayment">Pending Payment</string>
<string name="strUpdateBalanceInquiry">Update Balance Inquiry</string>
<string name="strCardCommand">Card Command</string>
<string name="strUpdateBalance">Update Balance</string>
<string name="strConfirmSession">Confirm Session</string>
<string name="strPendingBalance">Pending Balance</string>
<string name="strPaymentModule">Payment Module</string>
<string name="strLoadDefault">Load Default</string>
<string name="strDebugEnableToken">Debug Enable token</string>
<string name="strCopyDebugToken">Copy Debug Token</string>
<string name="strPasteDebugRespons">Paste Debug Respons</string>
<string name="strResetPartial">Reset Partial</string>
<string name="strDebugExpirity">Expirity</string>
<string name="strMandiri">Bank Mandiri</string>
<string name="strBankBNI">Bank BNI</string>
<string name="strBankBRI">Bank BRI</string>
<string name="strBankBCA">Bank BCA</string>
<string name="strSupportedBank">Enabled Bank</string>
<string name="strDebugEnable">Debug Enable</string>
<string name="strMasterKey">Master Key</string>
<string name="strDefaultMasterKey">404142434445464748494A4B4C4D4E4F</string>
<string name="strDefaultInitialVector">0000000000000000</string>
<string name="strDefaultBNIPin">1234560000000000</string>
<string name="strInitialVector">Initial Vector</string>
<string name="strPin">PIN</string>
<string name="strTopupInit">TOPUP C2C INIT</string>
<string name="strAbout">About</string>
<string name="strMifareClassic">Mifare Classic</string>
<string name="strMisc">Misc</string>
<string name="strMifareRead">Mifare Read</string>
<string name="strMifareWrite">Mifare Write</string>
<string name="strMifareKey">Mifare Key</string>
<string name="strDefaultMifareKey">FFFFFFFFFFFF</string>
<string name="strMagneticStripeTest">Magnetic Stripe Test</string>
<string name="strReadMagStripe">Read Mag Stripe</string>
<string name="strTrack1">Track 1</string>
<string name="strTrack2">Track 2</string>
<string name="strTrack3">Track 3</string>
<string name="strDefaultTopupValue">5000</string>
<string name="strStanStart">STAN Start</string>
<string name="strForceSettlementOld">F Sett Old</string>
<string name="strForceSettlementNew">F Sett New</string>
<string name="strAppletDetector">Applet Detector</string>
<string name="strBankDKI">Bank DKI</string>
<string name="strNobuBank">Nobu Bank</string>
<string name="strIconox">Iconox UI Card</string>
<string name="strMDD">MDD Singletrip</string>
<string name="strMandiriTopOff">Mandiri Topup Offline</string>
<string name="strMandiriC2C">Mandiri Topup C2C</string>
<string name="strMandiriApi">Mandiri Topup API</string>
<string name="strBNIC2C">BNI Topup C2C</string>
<string name="strBriApi">BRI Topup API</string>
<string name="strBNIApi">BNI TopupApi</string>
<string name="strLoketEnable">Loket Timezone</string>
<string name="strBankMega">Bank Mega</string>
<string name="strBlockNr">12</string>
<string name="strGetMerriedCode">Get Merried Code</string>
<string name="strTransactionHist">Transaction Hist</string>
<string name="strServerRespons">Server Respons</string>
<string name="strBit48">Bit48</string>
<string name="strLoadRespons">Load Respons</string>
<string name="strGenerateRQ1New">Generate RQ1 New</string>
<string name="strGenerateRq1Old">Generate RQ1 OLD</string>
<string name="strUpdateRSPNew">Update RSP New</string>
<string name="strUpdateRSPOld">Update RSP Old</string>
<string name="strMutualAuth">Mutual Auth</string>
<string name="strPUK">PUK</string>
<string name="strUnblockPin">Unblock PIN</string>
<string name="strSuccess">Success</string>
<string name="strFailed">Failed</string>
<string name="strTimeout">Timeout</string>
<string name="strProcessing">Processing.....</string>
<string name="strSetRandomString">Set Random String</string>
<string name="strLsamInitializeLoad">LSAM Initialize Load</string>
<string name="strLsamLoad">LSAM Load</string>
<string name="strRefill">Refill Deposit</string>
<string name="strMandiriTopupDeposit">Mandiri Topup Deposit</string>
<string name="pending_topup">Pending Topup</string>
<string name="amount">Amount</string>
<string name="prepaid_brizzi">Prepaid Brizzi</string>
<string-array name="mfKey">
<item>Key A</item>
<item>Key B</item>
</string-array>
</resources>
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="MyMaterialTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="MyMaterialTheme" parent="MyMaterialTheme.Base">
<item name="android:windowContentTransitions">true</item>
<item name="android:windowAllowEnterTransitionOverlap">true</item>
<item name="android:windowAllowReturnTransitionOverlap">true</item>
<item name="android:windowSharedElementEnterTransition">@android:transition/move</item>
<item name="android:windowSharedElementExitTransition">@android:transition/move</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>
package com.medicom.dudikov.mypaxsimulator;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.3'
// classpath 'com.android.tools.build:gradle:4.0.1'
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.7.5"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven {
url "http://mobile-repo.mdd.co.id:8081/artifactory/libs-release-local/"
credentials {
username = "admin"
password = "Mddcoid*123#"
}
}
maven {
url "http://mobile-repo.mdd.co.id:8081/artifactory/android-libs/"
credentials {
username = "admin"
password = "Mddcoid*123#"
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
ext {
roomVersion = '1.1.1'
archLifecycleVersion = '1.1.1'
}
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Remove this line
#android.useDeprecatedNdk = true
artifactory_url = http://mobile-repo.mdd.co.id:8081/artifactory
artifactory_key = android-libs
artifactory_username = admin
artifactory_password = Mddcoid*123#
\ No newline at end of file
#Fri May 29 10:58:20 ICT 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
include ':PayLib-release-1.4.43'
include ':app'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment