Giter Site home page Giter Site logo

android-webui-sdk's People

Contributors

bloderxd avatar bret-queueit avatar frwiqueueit avatar ista-queueit avatar kevinrob avatar mbp avatar mohammadmq avatar mproqueueit avatar queueitdevs avatar reza-0 avatar sarooghi avatar sp0x avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-webui-sdk's Issues

Back Button Failure After Extended Background Inactivity in App

Initial activation of the back button through the SDK works successfully, with the button functioning correctly during normal background-foreground transitions. However, it has been observed that after a period of prolonged inactivity in the background, the back button ceases to respond.

After some investigation we discovered that you forget to save/restore the state of back button in/from the bundle:

// save the state
public void saveInstanceState(Bundle outState) {
       outState.putString("queueUrl", queueUrl);
       outState.putString("targetUrl", targetUrl);
       outState.putString("userId", uriOverrider.getUserId());
}

// restore the state
  private void readActivityExtras(Bundle savedInstanceState) {
       if (savedInstanceState == null) {
           Bundle extras = _context.getIntent().getExtras();
           if (extras == null) {
               queueUrl = null;
               targetUrl = null;
           } else {
               queueUrl = extras.getString("queueUrl");
               targetUrl = extras.getString("targetUrl");
               uriOverrider.setUserId(extras.getString("userId"));
               options = (QueueItEngineOptions)extras.getParcelable("options");
           }
       } else {
           queueUrl = (String) savedInstanceState.getSerializable("queueUrl");
           targetUrl = (String) savedInstanceState.getSerializable("targetUrl");
           uriOverrider.setUserId((String) savedInstanceState.getSerializable("userId"));
       }
       uriOverrider.setTarget(Uri.parse(targetUrl));
       uriOverrider.setQueue(Uri.parse(queueUrl));
 }


Instead of:

 // save the state
   public void saveInstanceState(Bundle outState) {
       outState.putString("queueUrl", queueUrl);
       outState.putString("targetUrl", targetUrl);
       outState.putString("userId", uriOverrider.getUserId());
       outState.putParcelable("options", options);          <-- HERE
   }

// restore the state
private void readActivityExtras(Bundle savedInstanceState) {
   if (savedInstanceState == null) {
      ...
   } else {
       queueUrl = (String) savedInstanceState.getSerializable("queueUrl");
       targetUrl = (String) savedInstanceState.getSerializable("targetUrl");
        uriOverrider.setUserId((String) savedInstanceState.getSerializable("userId"));
        options = (QueueItEngineOptions) savedInstanceState.getParcelable("options");        <-- HERE
   }

   ...
}

i can't use library for androidx.

I follow sample use implementation 'com.queue_it.androidsdk:library-androidx:2.0.25' for include sdk

The Android Studio error report:

截圖 2020-12-10 下午3 45 40

I can find queue-it SDK library for androidx

JSONException: Value <!--

Sometimes the app is crashing with the following logs

Fatal Exception: java.lang.RuntimeException: org.json.JSONException: Value <!-- of type java.lang.String cannot be converted to JSONObject at com.queue_it.androidsdk.QueueService$1.onResponse(QueueService.java:115) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:133) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818) Caused by org.json.JSONException: Value <!-- of type java.lang.String cannot be converted to JSONObject at org.json.JSON.typeMismatch(JSON.java:111) at org.json.JSONObject.<init>(JSONObject.java:160) at org.json.JSONObject.<init>(JSONObject.java:173) at com.newrelic.agent.android.instrumentation.JSONObjectInstrumentation.init(JSONObjectInstrumentation.java:22) at com.queue_it.androidsdk.QueueService$1.onResponse(QueueService.java:102) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:133) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)

Seems like that HTML is coming instead of JSON in the response

onQueuePassed does not return a queueit token

Please document clearly to ensure that the connector token type in the waiting room settings is set to v3 or higher, not JavaScript. The mobile SDK searches for the 'queueittoken' parameter to extract the token value. However, if JavaScript is used, the 'qitq' parameter conveys the value, leading to issues with the token retrieval process.

Missing WebView package

The following exception happens in the app which uses QueueIt SDK. I believe that SDK should handle the missing WebView package gracefully. Maybe propagate the error through an error callback.

We are using 2.0.35 version of SDK.

Caused by android.webkit.WebViewFactory$MissingWebViewPackageException
Failed to load WebView provider: No WebView installed

android.webkit.WebViewFactory.getWebViewContextAndSetProvider (WebViewFactory.java:339)
android.webkit.WebViewFactory.getProviderClass (WebViewFactory.java:402)
android.webkit.WebViewFactory.getProvider (WebViewFactory.java:252)
android.webkit.WebView.getFactory (WebView.java:2576)
android.webkit.WebView.ensureProviderCreated (WebView.java:2570)
android.webkit.WebView.setOverScrollMode (WebView.java:2638)
android.view.View. (View.java:5328)
android.view.View. (View.java:5474)
android.view.ViewGroup. (ViewGroup.java:697)
android.widget.AbsoluteLayout. (AbsoluteLayout.java:56)
android.webkit.WebView. (WebView.java:413)
android.webkit.WebView. (WebView.java:355)
android.webkit.WebView. (WebView.java:337)
android.webkit.WebView. (WebView.java:324)
android.webkit.WebView. (WebView.java:314)
com.queue_it.androidsdk.UserAgentManager.initialize (UserAgentManager.java:2)
com.queue_it.androidsdk.QueueITEngine. (QueueITEngine.java:77)

Strict requirement for Activity context seems unnecessary

There is a constructor for QueueITEngine that has a parameter Activity applicationContext, which is misleading in its name, and seems like an unnecessary type restriction. The only places I saw in the code that the context is used is for fetching various resources and system services. This restriction to Activity contexts prevents one from running a queue in a global context from the Application class. Is there a reason for restricting the type to Activity? It seems like there was an issue a few years ago where it was changed to the more generic Context, but was then changed back in 5a3262e without renaming it from applicationContext.

Migrate to AndroidX

Would it be possible to migrate to the AndroidX libraries?

I am hoping to turn off the Jetifier tool (as this is blocking us from updating other tooling) and this is the only library in my project that still uses the support libraries.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.