omise / omise-android

Omise Android SDK
https://docs.opn.ooo
Other
50 stars 32 forks source link

How to not open expected result url #40

Closed j2emanue closed 6 years ago

j2emanue commented 6 years ago

EXTRA_EXPECTED_RETURN_URLSTRING_PATTERNS i set to https://www.mywebsite.com

but the problem is i am using a native app and i do not want to leave the application after i get the authorization call back of either success/failure in the acitivityResult. I tried setting the EXTRA_EXPECTED_RETURN_URLSTRING_PATTERNS to an empty array but its not helping. What i want to accomplish is that after the user authenticates your activity then closes and sends me a result code, i'll open a native window depending on that result. How can i accomplish this ?

when i try to send an empty string for return URL i get the following stack trace error:


java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equalsIgnoreCase(java.lang.String)' on a null object reference
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err:     at co.omise.android.ui.AuthorizingPaymentActivity$a.a(SourceFile:75)
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err:     at co.omise.android.ui.AuthorizingPaymentActivity$1.shouldOverrideUrlLoading(SourceFile:110)
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err:     at com.android.webview.chromium.WebViewContentsClientAdapter.shouldOverrideUrlLoading(WebViewContentsClientAdapter.java:331)
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err:     at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(AwContentsClientBridge.java:265)
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err:     at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err:     at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:53)
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:102)
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err:     at android.os.Looper.loop(Looper.java:148)
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:5417)
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
03-09 03:23:29.990 3196-3196/com.mobile.myapp.labs W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
j2emanue commented 6 years ago

after i actually caught the activityResult it allows me to handle the URL myself. this works. closing issue.

nuxzero commented 6 years ago

@j2emanue Do you still have any issues? If not, I'm going to close this issue.

j2emanue commented 6 years ago

Close it. Thanks

Get Outlook for Androidhttps://aka.ms/ghei36


From: Natthawut Hemathulin notifications@github.com Sent: Friday, March 9, 2018 1:59:28 PM To: omise/omise-android Cc: j2emanue; Mention Subject: Re: [omise/omise-android] How to not open expected result url (#40)

@j2emanuehttps://github.com/j2emanue Do you still have any issues? If not, I'm going to close this issue.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/omise/omise-android/issues/40#issuecomment-371730268, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AEuvOkEbw4r_tJ8wC1a1t_Qtlnu5UoPnks5tcihQgaJpZM4SjCE4.