Commit 7496aa08 authored by ganda@mdd.co.id's avatar ganda@mdd.co.id

Dev env

parent 09961c26
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
</set> </set>
</option> </option>
<option name="resolveModulePerSourceSet" value="false" /> <option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings> </GradleProjectSettings>
</option> </option>
</component> </component>
......
...@@ -31,42 +31,49 @@ android { ...@@ -31,42 +31,49 @@ android {
dependencies { dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3' implementation 'com.android.support.constraint:constraint-layout:2.0.4'
implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation "androidx.preference:preference:1.1.0" implementation "androidx.preference:preference:1.1.1"
implementation 'com.google.android.material:material:1.1.0' implementation 'com.google.android.material:material:1.2.1'
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation fileTree(include: ['*.aar'], dir: 'libs') implementation fileTree(include: ['*.aar'], dir: 'libs')
implementation 'com.squareup.okhttp3:okhttp:3.10.0' implementation 'com.squareup.okhttp3:okhttp:4.1.1'
implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0' implementation 'com.squareup.okhttp3:logging-interceptor:4.1.1'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0' implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0' implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
//retrofit //retrofit
implementation 'com.squareup.retrofit2:retrofit:2.5.0' implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0' implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.1' implementation 'com.squareup.okhttp3:logging-interceptor:4.1.1'
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0' implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
// implementation project(path: ':mdd-service-release')
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1' implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'io.reactivex.rxjava2:rxjava:2.2.10' implementation 'io.reactivex.rxjava2:rxjava:2.2.19'
implementation 'com.jakewharton:butterknife:10.2.0' implementation 'com.jakewharton:butterknife:10.2.0'
implementation 'com.bugfender.sdk:android:3.+' implementation 'com.bugfender.sdk:android:3.0.8'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0' annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
implementation(group: 'com.mdd.payment', name: 'brizzilib-release', version: '1.1.1', ext: 'aar')
implementation(group: 'com.mdd.library', name: 'brizzi-release-sbox', version: '1.3', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'aar-deviceid-release', version: '2.0.5', ext: 'aar') implementation(group: 'com.mdd.payment', name: 'aar-deviceid-release', version: '2.0.5', ext: 'aar')
implementation(group: 'com.mdd.service', name: 'partner-connect', version: '2.5.0', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'mybanklibrary-release', version: '3.7.0', ext: 'aar')
implementation(group: 'com.mdd.topup', name: 'update-balance', version: '3.0.4', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'z91library-release', version: '2.1.2', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'organicdrv-release', version: '2.1.2', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'wepoylibrary-release', version: '2.2.6', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'paxlibrary-release', version: '2.1.3', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'nativecripto-release', version: '2.0.1', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'isodeplibrary-release', version: '2.1.2', ext: 'aar')
implementation(group: 'com.mdd.service', name: 'partner-connect', version: '2.3.4', ext: 'aar') implementation(group: 'com.mdd.payment', name: 'sunmilibrary-release', version: '2.2.1', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'mybanklibrary-release', version: '3.6.7', ext: 'aar') implementation 'com.sunmi:printerlibrary:1.0.9'
implementation(group: 'com.mdd.topup', name: 'update-balance', version: '2.8.6', ext: 'aar') implementation 'com.sunmi:sunmiui:1.1.27'
implementation(group: 'com.mdd.payment', name: 'z91library-release', version: '2.1.0', ext: 'aar') implementation(group: 'com.mdd.payment', name: 'paylib-release', version: '1.0.1', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'organicdrv-release', version: '2.1.0', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'wepoylibrary-release', version: '2.2.0', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'paxlibrary-release', version: '2.1.1', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'nativecripto-release', version: '2.0.0', ext: 'aar')
implementation(group: 'com.mdd.payment', name: 'isodeplibrary-release', version: '2.1.1', ext: 'aar')
} }
\ No newline at end of file
package id.mdd.implementationpartnerconnect;
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("id.mdd.implementationpartnerconnect", appContext.getPackageName());
}
}
\ No newline at end of file
...@@ -18,11 +18,11 @@ ...@@ -18,11 +18,11 @@
android:allowBackup="true" android:allowBackup="true"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:networkSecurityConfig="@xml/network_security_config" android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
<activity android:name=".MainActivity"> <activity android:name=".NewMainActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
......
...@@ -237,7 +237,7 @@ public class MainActivity extends AppCompatActivity implements MDDUpdateBalanceV ...@@ -237,7 +237,7 @@ public class MainActivity extends AppCompatActivity implements MDDUpdateBalanceV
@Override @Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults); super.onRequestPermissionsResult(requestCode, permissions, grantResults);
Log.e("requestPermissionResult", "reqCode "+requestCode +" permission "+permissions +" grantResults "+grantResults); Log.e("requestPermissionResult", "reqCode " + requestCode + " permission " + permissions + " grantResults " + grantResults);
((MyApp) getApplication()).initAar(this); ((MyApp) getApplication()).initAar(this);
} }
...@@ -457,7 +457,7 @@ public class MainActivity extends AppCompatActivity implements MDDUpdateBalanceV ...@@ -457,7 +457,7 @@ public class MainActivity extends AppCompatActivity implements MDDUpdateBalanceV
private void execute(Tag tag) { private void execute(Tag tag) {
Log.d("Execute", "--> execute"); Log.d("Execute", "--> execute");
if (reader != null){ if (reader != null) {
cardProcessor = new MainCardProcessor(MainActivity.this, reader, new UpdateBalanceView() { cardProcessor = new MainCardProcessor(MainActivity.this, reader, new UpdateBalanceView() {
@Override @Override
public void onUpdateBalanceSuccess(SuccessUpdateBalance successUpdateBalance) { public void onUpdateBalanceSuccess(SuccessUpdateBalance successUpdateBalance) {
...@@ -488,26 +488,26 @@ public class MainActivity extends AppCompatActivity implements MDDUpdateBalanceV ...@@ -488,26 +488,26 @@ public class MainActivity extends AppCompatActivity implements MDDUpdateBalanceV
runOnUiThread(this::onNfcCardFound); runOnUiThread(this::onNfcCardFound);
CardInfoCommand command = new CardInfoCommand(reader.myReader); CardInfoCommand command = new CardInfoCommand(reader.myReader);
Log.e("myReader", "Myreader : "+reader.myReader); Log.e("myReader", "Myreader : " + reader.myReader);
final CommandResult<CardInfo> execute = command.execute(cardUid); final CommandResult<CardInfo> execute = command.execute(cardUid);
CardInfo detectedCardInfo = execute.getResult(); CardInfo detectedCardInfo = execute.getResult();
Log.d("executeSuccess", "executeIsSuccess = " + execute.isSuccess()); Log.d("executeSuccess", "executeIsSuccess = " + execute.isSuccess());
if (execute.isSuccess()) { if (execute.isSuccess()) {
if (detectedCardInfo.getBankType().toLowerCase().contains("dki") if (detectedCardInfo.getBankType().toLowerCase().contains("dki")
|| detectedCardInfo.getBankType().toLowerCase().contains("bca")){ || detectedCardInfo.getBankType().toLowerCase().contains("bca")) {
runOnUiThread(() -> { runOnUiThread(() -> {
MainActivity.this.onBalanceInfoAvailable(detectedCardInfo); MainActivity.this.onBalanceInfoAvailable(detectedCardInfo);
mProgress.setVisibility(View.GONE); mProgress.setVisibility(View.GONE);
mOpsResult.setText(R.string.tap_card); mOpsResult.setText(R.string.tap_card);
}); });
}else { } else {
cardProcessor.getBalance(detectedCardInfo); cardProcessor.getBalance(detectedCardInfo, null);
cardProcessor.updateBalance(detectedCardInfo, 1); cardProcessor.updateBalance(detectedCardInfo, 1, null);
} }
} else { } else {
runOnUiThread(() -> { runOnUiThread(() -> {
Log.e("error", "Messagenya : "+execute.getMessage()); Log.e("error", "Messagenya : " + execute.getMessage());
MainActivity.this.onUpdateBalanceError("Kartu tidak terdeteksi"); MainActivity.this.onUpdateBalanceError("Kartu tidak terdeteksi");
cardProcessor.unlockIsoDepCard(); cardProcessor.unlockIsoDepCard();
}); });
......
...@@ -101,13 +101,15 @@ ...@@ -101,13 +101,15 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingLeft="16dp" android:paddingLeft="16dp"
android:paddingRight="16dp"> android:paddingRight="16dp">
<ProgressBar <ProgressBar
android:id="@+id/pgProcess" android:id="@+id/pgProcess"
android:layout_width="28dp" android:layout_width="28dp"
android:layout_height="28dp" android:layout_height="28dp"
android:layout_marginRight="4dp" /> android:layout_marginRight="4dp"
android:visibility="gone" />
<TextView <TextView
android:id="@+id/txtStatus" android:id="@+id/txtStatus"
...@@ -233,10 +235,11 @@ ...@@ -233,10 +235,11 @@
android:text="1.0.1" android:text="1.0.1"
android:textColor="#dcdcdc" /> android:textColor="#dcdcdc" />
</LinearLayout> </LinearLayout>
<ProgressBar <ProgressBar
android:id="@+id/pbloading" android:id="@+id/pbloading"
android:layout_width="75dp" android:layout_width="75dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center" android:layout_gravity="center"
android:visibility="visible"/> android:visibility="gone" />
</LinearLayout> </LinearLayout>
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