Skip to content
This repository was archived by the owner on Jan 12, 2019. It is now read-only.

[Android] Fixed guideColor being parsed as a boolean #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion android/src/main/java/io/card/react/ReactCardIOModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import android.util.Log;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;

import org.json.JSONArray;
import org.json.JSONException;
Expand Down Expand Up @@ -63,7 +64,7 @@ public void scan(ReadableMap options, Promise promise) {
scanIntent.putExtra(CardIOActivity.EXTRA_NO_CAMERA, this.getOptionBoolean(options, "noCamera", false)); // default: false
scanIntent.putExtra(CardIOActivity.EXTRA_SCAN_EXPIRY, this.getOptionBoolean(options, "scanExpiry", false)); // default: false
scanIntent.putExtra(CardIOActivity.EXTRA_LANGUAGE_OR_LOCALE, this.getOptionString(options, "languageOrLocale", null)); // default: false
scanIntent.putExtra(CardIOActivity.EXTRA_GUIDE_COLOR, this.getOptionBoolean(options, "guideColor", false)); // default: false
scanIntent.putExtra(CardIOActivity.EXTRA_GUIDE_COLOR, Color.parseColor(this.getOptionString(options, "guideColor", "green"))); // default: green
scanIntent.putExtra(CardIOActivity.EXTRA_SUPPRESS_CONFIRMATION, this.getOptionBoolean(options, "suppressConfirmation", false)); // default: false
scanIntent.putExtra(CardIOActivity.EXTRA_HIDE_CARDIO_LOGO, this.getOptionBoolean(options, "hideCardIOLogo", false)); // default: false

Expand Down