Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
I
Implementation Partner Connect
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gandha Ryanto
Implementation Partner Connect
Commits
7496aa08
Commit
7496aa08
authored
Feb 08, 2021
by
ganda@mdd.co.id
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dev env
parent
09961c26
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
405 additions
and
63 deletions
+405
-63
gradle.xml
.idea/gradle.xml
+0
-1
build.gradle
app/build.gradle
+31
-24
ExampleInstrumentedTest.java
...implementationpartnerconnect/ExampleInstrumentedTest.java
+0
-26
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+2
-2
MainActivity.java
...ava/id/mdd/implementationpartnerconnect/MainActivity.java
+8
-8
NewMainActivity.java
.../id/mdd/implementationpartnerconnect/NewMainActivity.java
+359
-0
activity_main.xml
app/src/main/res/layout/activity_main.xml
+5
-2
No files found.
.idea/gradle.xml
View file @
7496aa08
...
...
@@ -16,7 +16,6 @@
</set>
</option>
<option
name=
"resolveModulePerSourceSet"
value=
"false"
/>
<option
name=
"useQualifiedModuleNames"
value=
"true"
/>
</GradleProjectSettings>
</option>
</component>
...
...
app/build.gradle
View file @
7496aa08
...
...
@@ -31,42 +31,49 @@ android {
dependencies
{
implementation
fileTree
(
include:
[
'*.jar'
],
dir:
'libs'
)
implementation
'androidx.appcompat:appcompat:1.2.0'
implementation
'com.android.support.constraint:constraint-layout:
1.1.3
'
implementation
'androidx.appcompat:appcompat:1.
1
.0'
implementation
'androidx.constraintlayout:constraintlayout:
1.1.3
'
implementation
"androidx.preference:preference:1.1.
0
"
implementation
'com.google.android.material:material:1.
1.0
'
testImplementation
'junit:junit:4.1
2
'
implementation
'com.android.support.constraint:constraint-layout:
2.0.4
'
implementation
'androidx.appcompat:appcompat:1.
2
.0'
implementation
'androidx.constraintlayout:constraintlayout:
2.0.4
'
implementation
"androidx.preference:preference:1.1.
1
"
implementation
'com.google.android.material:material:1.
2.1
'
testImplementation
'junit:junit:4.1
3.1
'
androidTestImplementation
'com.android.support.test:runner:1.0.2'
androidTestImplementation
'com.android.support.test.espresso:espresso-core:3.0.2'
implementation
fileTree
(
include:
[
'*.aar'
],
dir:
'libs'
)
implementation
'com.squareup.okhttp3:okhttp:
3.10.0
'
implementation
'com.squareup.okhttp3:logging-interceptor:
3.10.0
'
implementation
'com.squareup.okhttp3:okhttp:
4.1.1
'
implementation
'com.squareup.okhttp3:logging-interceptor:
4.1.1
'
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
implementation
'com.squareup.retrofit2:retrofit:2.
5
.0'
implementation
'com.squareup.retrofit2:converter-gson:2.
4
.0'
implementation
'com.squareup.okhttp3:logging-interceptor:
3.12
.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.1
.1'
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:rxjava:2.2.1
0
'
implementation
'io.reactivex.rxjava2:rxjava:2.2.1
9
'
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'
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.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:
'mybanklibrary-release'
,
version:
'3.6.7'
,
ext:
'aar'
)
implementation
(
group:
'com.mdd.topup'
,
name:
'update-balance'
,
version:
'2.8.6'
,
ext:
'aar'
)
implementation
(
group:
'com.mdd.payment'
,
name:
'z91library-release'
,
version:
'2.1.0'
,
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'
)
implementation
(
group:
'com.mdd.payment'
,
name:
'sunmilibrary-release'
,
version:
'2.2.1'
,
ext:
'aar'
)
implementation
'com.sunmi:printerlibrary:1.0.9'
implementation
'com.sunmi:sunmiui:1.1.27'
implementation
(
group:
'com.mdd.payment'
,
name:
'paylib-release'
,
version:
'1.0.1'
,
ext:
'aar'
)
}
\ No newline at end of file
app/src/androidTest/java/id/mdd/implementationpartnerconnect/ExampleInstrumentedTest.java
deleted
100644 → 0
View file @
09961c26
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
app/src/main/AndroidManifest.xml
View file @
7496aa08
...
...
@@ -18,11 +18,11 @@
android:allowBackup=
"true"
android:icon=
"@mipmap/ic_launcher"
android:label=
"@string/app_name"
android:roundIcon=
"@mipmap/ic_launcher_round"
android:networkSecurityConfig=
"@xml/network_security_config"
android:roundIcon=
"@mipmap/ic_launcher_round"
android:supportsRtl=
"true"
android:theme=
"@style/AppTheme"
>
<activity
android:name=
".MainActivity"
>
<activity
android:name=
".
New
MainActivity"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
app/src/main/java/id/mdd/implementationpartnerconnect/MainActivity.java
View file @
7496aa08
...
...
@@ -237,7 +237,7 @@ public class MainActivity extends AppCompatActivity implements MDDUpdateBalanceV
@Override
public
void
onRequestPermissionsResult
(
int
requestCode
,
@NonNull
String
[]
permissions
,
@NonNull
int
[]
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
);
}
...
...
@@ -457,7 +457,7 @@ public class MainActivity extends AppCompatActivity implements MDDUpdateBalanceV
private
void
execute
(
Tag
tag
)
{
Log
.
d
(
"Execute"
,
"--> execute"
);
if
(
reader
!=
null
){
if
(
reader
!=
null
)
{
cardProcessor
=
new
MainCardProcessor
(
MainActivity
.
this
,
reader
,
new
UpdateBalanceView
()
{
@Override
public
void
onUpdateBalanceSuccess
(
SuccessUpdateBalance
successUpdateBalance
)
{
...
...
@@ -488,26 +488,26 @@ public class MainActivity extends AppCompatActivity implements MDDUpdateBalanceV
runOnUiThread
(
this
::
onNfcCardFound
);
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
);
CardInfo
detectedCardInfo
=
execute
.
getResult
();
Log
.
d
(
"executeSuccess"
,
"executeIsSuccess = "
+
execute
.
isSuccess
());
if
(
execute
.
isSuccess
())
{
if
(
detectedCardInfo
.
getBankType
().
toLowerCase
().
contains
(
"dki"
)
||
detectedCardInfo
.
getBankType
().
toLowerCase
().
contains
(
"bca"
)){
||
detectedCardInfo
.
getBankType
().
toLowerCase
().
contains
(
"bca"
))
{
runOnUiThread
(()
->
{
MainActivity
.
this
.
onBalanceInfoAvailable
(
detectedCardInfo
);
mProgress
.
setVisibility
(
View
.
GONE
);
mOpsResult
.
setText
(
R
.
string
.
tap_card
);
});
}
else
{
cardProcessor
.
getBalance
(
detectedCardInfo
);
cardProcessor
.
updateBalance
(
detectedCardInfo
,
1
);
}
else
{
cardProcessor
.
getBalance
(
detectedCardInfo
,
null
);
cardProcessor
.
updateBalance
(
detectedCardInfo
,
1
,
null
);
}
}
else
{
runOnUiThread
(()
->
{
Log
.
e
(
"error"
,
"Messagenya : "
+
execute
.
getMessage
());
Log
.
e
(
"error"
,
"Messagenya : "
+
execute
.
getMessage
());
MainActivity
.
this
.
onUpdateBalanceError
(
"Kartu tidak terdeteksi"
);
cardProcessor
.
unlockIsoDepCard
();
});
...
...
app/src/main/java/id/mdd/implementationpartnerconnect/NewMainActivity.java
0 → 100644
View file @
7496aa08
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/activity_main.xml
View file @
7496aa08
...
...
@@ -101,13 +101,15 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingLeft=
"16dp"
android:paddingRight=
"16dp"
>
<ProgressBar
android:id=
"@+id/pgProcess"
android:layout_width=
"28dp"
android:layout_height=
"28dp"
android:layout_marginRight=
"4dp"
/>
android:layout_marginRight=
"4dp"
android:visibility=
"gone"
/>
<TextView
android:id=
"@+id/txtStatus"
...
...
@@ -233,10 +235,11 @@
android:text=
"1.0.1"
android:textColor=
"#dcdcdc"
/>
</LinearLayout>
<ProgressBar
android:id=
"@+id/pbloading"
android:layout_width=
"75dp"
android:layout_height=
"match_parent"
android:layout_gravity=
"center"
android:visibility=
"
visible"
/>
android:visibility=
"
gone"
/>
</LinearLayout>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment