-2

I am developing app for Android and IPhone using IBM MobileFirst Platform Foundation 7.1.0.

WL.Client.Connect is used inside wlcommoninit().

Still in few cases, I am able to see the below error dialog.

enter image description here

I am not able to exactly reproduce when I am getting this error dialog.

The logcat is attached here.

But is there any way that we can block showing this dialog to the user?

sasi
  • 512
  • 4
  • 27
  • Why not actually sure what you're referring to? – Idan Adar Nov 04 '16 at 06:48
  • Please be clear with your question. – S.A.Norton Stanley Nov 04 '16 at 06:58
  • @S.A.NortonStanley: The question is very simple. How to stop displaying the Error Dialog? I am able to see the dialog even after using WL.Client.Connect in wlcommoninit(). – sasi Nov 04 '16 at 07:05
  • @IdanAdar Please refer the question. – sasi Nov 04 '16 at 07:05
  • 1
    Add a photo of the error and clear reproduction steps. – Idan Adar Nov 04 '16 at 07:06
  • @IdanAdar Edited the question with screen shot. But still not able to reproduce the exact scenario – sasi Nov 04 '16 at 07:46
  • Is the issue happening on both Android and iOS ? That might point to a server issue? Are you trying a simple WL.Client.connect() and that gives this issue? What does the server log say when this issue happens? – Vivin K Nov 07 '16 at 11:08
  • @VivinK I have tested only in Android. The log says the app is not connected to server. The onFailure method of WL.Client.Connect got triggered. – sasi Nov 07 '16 at 12:08
  • Post the Logcat from the Android device when you recreate the issue. – Vivin K Nov 08 '16 at 11:58
  • @VivinK Logcat is attached in question. Please find it. – sasi Nov 09 '16 at 09:10
  • Logcat shows: 11-09 14:20:36.527: D/HttpPostRequestSender(23133): WLHybridRequestSender.run in WLHybridRequestSender.java:42 :: Sending request http://192.9.200.105:10080/Sample/apps/services/api/Sample/android/init 11-09 14:20:37.387: E/NONE(23133): [/apps/services/api/Sample/android/init] failure. state: 404, response: The server was unable to process the request from the application. Please try again later. Verify the URL and connectivity. It could be intermittent connectivity loss – Vivin K Nov 09 '16 at 12:45
  • @VivinK URL is proper and the app is able to connect as my worklight server is down. But my point is when the app is not able to connect to the server it should trigger only onFailure of WL.Client.Connect but instead it calls onFailure method at the same time it displays the default error dialog from server too. How do we stop displaying the error dialog? – sasi Nov 10 '16 at 13:13

1 Answers1

0

You could debug the application code to see which function is triggered when this specific dialog is displayed and then override the function by declaring it in your own code and simply keep it empty. In theory this should then not display it.

There is no built-in/provided option to simply not display it.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89