Skip to content

Commit

Permalink
Merge pull request #25 from d3x773r/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
williaanlopes committed Oct 22, 2020
2 parents bdba175 + fae84ed commit 63adb58
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 12 deletions.
16 changes: 16 additions & 0 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,28 @@
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>
</config-file>

<edit-config file="AndroidManifest.xml" target="/manifest/application" mode="merge">
<application android:name="com.gurpster.cordova.pagarme.mpos.withinterface.App" />
</edit-config>

<config-file target="AndroidManifest.xml" parent="/manifest/application">
<service
android:name="com.gurpster.cordova.pagarme.mpos.MposPluginService"
android:exported="false"
android:enabled="true"/>
<service android:enabled="true" android:exported="false" android:name="com.gurpster.cordova.pagarme.mpos.withinterface.MposService" />
<activity android:name="com.gurpster.cordova.pagarme.mpos.withinterface.FinishActivity"
android:label=""
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
<activity android:name="com.gurpster.cordova.pagarme.mpos.withinterface.ChargeActivity"
android:label=""
android:theme="@style/AppTheme.Charge"/>
<activity android:name="com.gurpster.cordova.pagarme.mpos.withinterface.ProcessActivity"
android:label=""
android:theme="@style/AppTheme.Process"/>
<activity android:name="com.gurpster.cordova.pagarme.mpos.withinterface.PairingActivity"
android:label=""
android:theme="@style/AppTheme.Pairing"/>
</config-file>

<config-file target="res/xml/config.xml" parent="/*">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

import com.airbnb.lottie.LottieAnimationView;

import com.leve.ai.R;

/**
* Created by Williaan Souza (dextter) on 16/10/2020
* Contact [email protected]
Expand Down Expand Up @@ -85,7 +87,8 @@ void error() {
title.setTextColor(color);
description.setText(getIntent().getStringExtra("message"));
description.setTextColor(color);
animationView.setAnimationFromUrl("https://assets10.lottiefiles.com/packages/lf20_KWZHHd.json");
animationView.setVisibility(View.GONE);
// animationView.setAnimationFromUrl("https://assets10.lottiefiles.com/packages/lf20_KWZHHd.json");

action.setTextColor(ContextCompat.getColor(
getApplicationContext(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@

import me.pagar.mposandroid.Mpos;

import com.leve.ai.R;

public class PairingActivity extends AppCompatActivity {

public static final int PAIRING_REQUEST_CODE = 0x985;
Expand Down Expand Up @@ -269,18 +271,22 @@ public void onClick(View v) {
waitingHandler.postDelayed(new Runnable() {
@Override
public void run() {
waitingDialog.dismiss();
waitingHandler.removeCallbacks(this);
ModalUtils.showTextDialog(
PairingActivity.this,
R.layout.dialog_text,
getString(R.string.error),
getString(R.string.not_device_paired_error_default),
false,
true
).show();
try {
waitingDialog.dismiss();
waitingHandler.removeCallbacks(this);
ModalUtils.showTextDialog(
PairingActivity.this,
R.layout.dialog_text,
getString(R.string.error),
getString(R.string.not_device_paired_error_default),
false,
true
).show();
} catch (Exception e) {
e.printStackTrace();
}
}
}, 50000);
}, 40000);
service.connect();
} catch (IOException e) {
waitingDialog.dismiss();
Expand Down

0 comments on commit 63adb58

Please sign in to comment.