Skip to content

Instantly share code, notes, and snippets.

@dhruvikn
Last active April 25, 2022 07:11
Show Gist options
  • Save dhruvikn/ecc44226c64a056a90860c58745ae897 to your computer and use it in GitHub Desktop.
Save dhruvikn/ecc44226c64a056a90860c58745ae897 to your computer and use it in GitHub Desktop.
--- a/./old.java
+++ b/./new.java
@@ -6,13 +6,13 @@ public void initKawaMap(boolean isValid) {
* ----------
*/
// Set large button colors
- KawaMap.setFooterBtnBgColorAndTextColor(Color.BLUE, Color.WHITE);
+ KawaMap.setFooterBtnBgColorAndTextColor(this,R.color.blue, R.color.white);
//Set small button colors
- KawaMap.setInnerBtnBgColorAndTextColor(R.color.white, Color.BLACK);
+ KawaMap.setInnerBtnBgColorAndTextColor(this,R.color.white, R.color.black);
// Set header message box colors
- KawaMap.setHeaderBgColorAndTextColor(Color.BLUE, Color.WHITE);
+ KawaMap.setHeaderBgColorAndTextColor(this,R.color.blue, R.color.white);
/*
* Flags to toggle features
@@ -69,8 +69,22 @@ public void onkawaSubmit(String data) {
Log.e(TAG, "SubmitJson>>>>: " + data);
}
-// This callback is called when the user presses the "Close Map" button at the end.
+// This callback is called when the user presses the
+// "Close Map" button at the end.
@Override
public void onkawaDestroy() {
KawaMap.exitKawaSDK(this, <ACTIVITY_NAME_YOU_WANT_TO_REDIRECT_TO>.class.getName());
+}
+
+@Override
+public void onkawaDestroy() {
+ // Use any ONE of the following methods
+ // 1. exitKawaSDKAndGoBack
+ // - To go to the previous activity without creating a new intent.
+ // 2. exitKawaSDKAndGoToActivity
+ // - To go to a particular activity.
+
+ KawaMap.exitKawaSDKAndGoBack(this);
+ // OR
+ KawaMap.exitKawaSDKAndGoToActivity(this, <ACTIVITY_NAME_YOU_WANT_TO_REDIRECT_TO>.class.getName());
}
\ No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment