B4J Question [ABMaterial]: Detect browser and inform end user?

Mashiane

Expert
Licensed User
Longtime User
Hi

ABM works best best with Google Chrome. My reality is that some end users i have still use IE and Edge, this has broken things. I'm thinking of a way to detect the browser being used and thus if its not chrome indicate to the user to change the browser.

This is a challenging change management scenario as its a mindset thing and people seldom change their minds especially when they are used to something.

Question is. How do I detect which browser is being used in ABM?

Thanks
 

alwaysbusy

Expert
Licensed User
Longtime User
If something does not work in Edge or another browser, you should report it in the feedback app. Pure ABM (without your own controls) is meant to work on all browsers. If one of your own components does not work, those are your responsibility. Depending your app on a browser is BAD. The next update the browser does, your could be back to square one.
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
If something does not work in Edge or another browser, you should report it in the feedback app. Pure ABM (without your own controls) is meant to work on all browsers. If one of your own components does not work, those are your responsibility. Depending your app on a browser is BAD. The next update the browser does, your could be back to square one.
Thanks AB, I'm not using any custom component, the error has to do with core.4.25.min.js. I am not able to upload the file on the feedback app, it gives a toast that file not uploaded. Tried a couple of times, so here is what I was emailed. This does not happen with Chrome and personally for me, the experience in chrome is much more better and richer than the other browsers, firefox distorts the fonts at times, ie does a cleartype

Error.png
 
Upvote 0

alwaysbusy

Expert
Licensed User
Longtime User
which version of IE is that? Old versions are not supported by ABM (actually by Materialize CSS). I think only the latest update of IE 11 is supported. Don't get any errors in e.g. the ABMaterial demo so finding out what exactly doesn't work is key. However, if it is pre IE 11, then it will not work and will never work. People should realy upgrade to edge, IE is dead.
 
Upvote 0

alwaysbusy

Expert
Licensed User
Longtime User
You may try this (untested) by adding this code to core js:

B4X:
$.fn.onAutoFill = function(callback) {
   var me = this;
   var last = "";
   var infunc = function() {
       var text = $(me).val();
       if(text != last) {
           last = text;
           callback(me);
       }
       setTimeout(infunc, 100);
   }
   setTimeout(infunc, 100);
};

$('input').onAutoFill(function(input) {
   $(input).siblings('label').addClass('active');
});
 
Upvote 0
Top