Instead of Chrome Custom Tabs in Samsung S6 Edge device opens its own Internet browser app - chrome-custom-tabs

We use Chrome custom tabs in our app to open links. We have issue on Samsung S6 Edge. When we click on the link in our app, this device opens its own browser(called Internet) instead of Chrome custom tabs. When you press back button, sometimes instead of returning back to our app it will open Internet app from stack(if you already used this Internet app for browsing recently). If you didn't use recently Internet app for browsing, press back will correctly open you your app.

Custom Tabs is an open specification and other browsers besides Chrome may support it.
Having said that, it seems that there's a bug on the current Samsung's Internet Browser implementation (4.0.10-51) that causes the mentioned behaviour.
A temporary workaround would be to ignore the Samsung IB package when opening a Custom Tab. You can check how to discover which browsers support Custom Tabs on the getPackageNameToUse method on the Github Demo.
Modify the method to ignore the com.sec.android.app.sbrowser package. Then, force the package you want to use to open the Custom Tab like this:
customTabsIntent.intent.setPackage(packageName);
customTabsIntent.launchUrl(activity, uri);
I would also recommend taking a look on the Custom Tabs Best Practices to see how to prepare for the scenarios where more than one browser that supports Custom Tabs are installed in the system.
UPDATE: It seems that the latest version from Samsung's Internet Browser (4.2) has those issues fixed. The improved solution would be to check if the version of the installed browser is a compatible one. Something like the answer on this StackOverflow question can be used.

I checked with many Custom Tab client in Samsung latest phones.
I see that this issue is not observed in Samsung phones like Note 7 which has the latest version of their default Browser i.e Version 4.2 (Procedure to check version Menu options -> Settings -> About Internet)
So above solution of ignoring or bypassing "com.sec.android.app.sbrowser" package name is not necessary for their latest phones.

Workaround in Googles example code for custom tabs: CustomTabsHelper.java
// Get all apps that can handle VIEW intents.
List<ResolveInfo> resolvedActivityList = pm.queryIntentActivities(activityIntent, 0);
List<String> packagesSupportingCustomTabs = new ArrayList<>();
for (ResolveInfo info : resolvedActivityList) {
Intent serviceIntent = new Intent();
serviceIntent.setAction(ACTION_CUSTOM_TABS_CONNECTION);
serviceIntent.setPackage(info.activityInfo.packageName);
if (pm.resolveService(serviceIntent, 0) != null) {
//If the packagename is not the samsung thing, add it to the list
if (! info.activityInfo.packageName.equals("com.sec.android.app.sbrowser")) {
packagesSupportingCustomTabs.add(info.activityInfo.packageName);
}
}
}

Related

Facebook Pixel doesn't work on mobile browser (but works on desktop browser)

I'm implementing Facebook Pixel on my WordPress website. Everything works fine on the desktop. The pixel is activated is and working fine.
I installed the Facebook Pixel Helper plug in for Chrome, and it detects the pixel on my page
I test the events by opening my website on desktop browser, the page view event is detected on the dashboard. The pixel can also detect other events I set, like contact, content view, etc. All works fine.
Problem: when I open my website from mobile browser (I tried mobile Chrome, Kiwi Browser, Samsung Browser), the dashboard didn't detect the page view event, as well as other events. I tried to open from another mobile phones, same result. I tried to deactivate all my WordPress plug-in to check if one of them is conflicting, but still same result. I inspected my website from mobile browser, it has the Facebook pixel script on the header part, just like on desktop browser, so it should be working fine.
Anyone knows the solution? I don't know what causes this problem. I use Hestia theme and Elementor for my WordPress website.
Try this steps:
1 ° Mobile usually has cache (I don't think so), but try to clear the caches and try again.
2 ° If there are cache plugins please clear all caches please (I don't think so)
3 ° Some themes are available in several headers and some of them are different for mobile and desktop, check if the headers are different and insert the tag manually if necessary in each header.
4 ° To check if everything is ok, with google chrome if you press f12 you have the option to choose a device for testing. Choose an Android or IOS phone from the emulators and reload the screen to test. In cell phones can be false / positive information received sometimes.
Try these options and update your question with new information to try to help you.

Firefox DevTools - "CSS Grid is not in use on this page"

I'm building my first application using CSS Grids.
Using Firefox's DevTools, I'm able to to highlight the Grid's tracks by clicking "# grid" next to an element in the "Rules" pane :
But when I click the "Layout" pane, it always shows "CSS Grid is not in use on this page":
Why is that?
(I'm using the latest Firefox version available today, "62.0.2")
UPDATE: Here's an example project.
UPDATE 2: It does work when I create a new, fresh, profile! But it doesn't work with my current profile, even when I start in safe mode, with all add-ons disabled... I guess I'll customize a new profile!
I agree with you indeed this is a bug in Firefox, I'm using the latest version of developer edition 85.0b9, I faced the same issue. You can clearly see, I've display as Grid still it says CSS Grid not in use on this page.
Issue - It happens when you open it in the default or the 1st Tab, it's not setting some tab-value there. The bug is still not fixed by Bugzilla's dev team, open from past 2 years. Let's hope they fix in future.
Issue Link - https://bugzilla.mozilla.org/show_bug.cgi?id=1492370
Solution - Just duplicate your tab, it'll work like a charm.

Autocomplete works in Chrome not IE

OK, so here is my situation. I recently rewrote an ancient .asp website running ProvideX into a new VB.Net platform. I am receiving complaints from my users (which are running older versions of IE) that their auto fill stopped working on the new system. For example if I type "Apple" in a field over and over again eventually the browser should start recommending "Apple" in a list so I don't have to type it again when I click in that box. This works perfectly in Chrome on the new website. For whatever reason IE is not making any suggestions. I am able to replicate these results on my IE browser as well and I am also able to confirm that my browser is auto filling on some of our other websites. Does anybody have any ideas as to why this is happening?

SDL Tridion 2011 Paste Special Function

The paste special function in SDL Tridion 2011 doesn't work in any current web browsers. Is anyone aware if this issue will be addressed in Tridion 2013? It was a real time-saver when it was functional, and prevented a lot of reformatting that's now unavoidable when pasting from Microsoft Word or any similar programs.
Mark - For me this does work i've just looked with both IE7 and FF18.
In IE the focus of the paste special pop-up dialog sometimes is never to the front, so I sometimes have to minimise the SDL Tridion edit window to find it.
Perhaps you could provide some additional information about the browsers and errors you receive?
Also fyi the supported browsers from the official SDL documentation shows:
Web browser Supported:
Internet Explorer 9.0 Safari 5.1 for the Mac Google Chrome, latest
version Mozilla Firefox, latest version
Paste Special works properly for us in Internet Explorer but not in Chrome or Firefox.
With the 2011 upgrade we’ve been pushing users toward Google Chrome because it is so much faster than IE or Firefox and paste special not working properly in Chrome has turned into one of the biggest usability issues our editors and producers are having with Tridion 2011 (not surprisingly they like to write primarily in msword.) We'veraised the issue of Paste Special not working iwht Chrom with Tridion support back in November and received two conflicting responses from them.
In both cases Tridion acknowledged knowing about the issue and in both cases they stated they would not fix the issue in Tridion 2011. The place the difference comes in is that in the first response we received from them they said they would be fixing the issue in Tridion 2013 and in the second response we received they said they had no plans on fixing the issue.
We did look into what was going on with the code to see if it was something we could fix by hacking the UI and what we found for Chrome was the following snippet which enables/disables the paste buttons:
if ($dom.isWebkit) // couldn't get it to work in Chrome
{
delete allowedActions["Paste"];
}
So basically it would seem like Tridion tried but gave up on implementing Paste Special in Chrome
Likewise in Firefox the buttons are enabled but when you try to paste special, nothing happens. Our development manager debugged and it turned out the paste method is throwing a silent exception -> NS_ERROR_DOM_XPCONNECT_ACCESS_DENIED in the following code when executing lDocument.execCommand:
var lPasteFailed = false;
try
{
pastingWithFlag = iProcessingFlag;
if (lPasteFailed = (!lDocument.execCommand("paste", false, null) || lDocument.body.innerHTML == ""))
{
throw Error("paste had no result - possibly clipboard data unaccessible");
}
if (pastingWithFlag == undefined)
{
lPasteFailed = true; // in certain cases lDocument.execCommand("paste"...) will cause paste into the main area in IE, which will be handled in the onpaste event handler -> do not paste again
}
}
catch (err)
{
$fa.canAccessClipboard = false;
lPasteFailed = true;
self.fireEvent("warning", { source: "paste()", message: err.message });
}
We are getting a lot of internal pressure to get this issue resolved so we’re going to be re-opening the issue with Tridion support and I am planning on getting in touch with my account rep sometime in the next couple days to raise this as a critical issue with him as well.
We re-opened this issue with SDL and here is their response with regards to where/when Paste Special should work in Tridion:
IE: supported and works. Any issues can be reported and we will look into fixing it.
Chrome: not supported (Chrome does not give access to clipboard)
Firefox: There are steps here to enable clipboard access (http://sdllivecontent.sdl.com/LiveContent/content/en-US/SDL_Tridion_2011_SPONE/task_RECON43B1609144D94562A394BB51FAC884B9),
although we have seen evidence of Firefox closing off clipboard access
similar to Chrome
Building an extension to enable paste special is outside of R&D
current scope.
On February 13, 2013 SDL will be announcing a contest during the
community webinar (http://webinars.julianwraith.com/).
The contest will challenge the community to create paste special
extensions for both the CME and XPM.
The contest will have prices to incentivize community participation.
People are frequently landing on this page, just want to let know, there is an extension available on Community now.
http://www.sdltridionworld.com/community/2011_extensions/pastespecial.aspx

Is there an easy way to force the user to use Internet Explorer, ideally without installing anything new?

I am working on 4 internal websites, everyone should be using IE but not everyone is.
Is there an easy way to force the user to use IE, ideally without installing anything new like JQuery?
Cheers,
Kohan
Addendum
I really shouldn't have to justify why i'm wanting to do this, but here goes.
This site is totally internal and 98% of the users do not have the rights to install a new browser... however there are a select few that do. This is fine for most of our sites, but since these sites are very old, they do not work in anything but IE. I could fix it for all browsers... but it is a better use of my time to just put a "hot-fix" in for now as it will likely all get rewritten next year. The site itself is also only used once a year. It's simply not worth the time investment in this case.
Thanks
Kohan.
If you really wanted to do this you could check the user agent of each request and if it's not IE redirect to a holding page explaining that they need to change browsers.
var userAgent = HttpContext.Current.Request.UserAgent;
Alternatively use the Request.Browser property.
if(HttpContext.Current.Request.Browser.Browser != "IE")
{
// do stuff...
}
You could find the browser type, and if its not IE, then do a Response.Redirect() to a generic "Use IE" page.
if (!(Request.Browser=="IE")){
Response.Redirect("UseIE.aspx");
}
You'll have to check the return values of Request.Browser though as I'm not certain without testing
I'll suggest something eretical: instead of fighting against Internet Explorer, force the users to use the Google Chrome Frame It's a "plugin" for Internet Explorer that make the page work as if they were in Chrome.
I'll quote from that page:
Google Chrome Frame is an open source plug-in that seamlessly brings
Google Chrome's open web technologies and speedy JavaScript engine to
Internet Explorer. With Google Chrome Frame, you can:
Start using open
web technologies - like the HTML5 canvas tag - right away, even
technologies that aren't yet supported in Internet Explorer 6, 7, 8,
or 9.
Take advantage of JavaScript performance improvements to make
your apps faster and more responsive.
Now your users can have IE 6.0 to work with their obsolete internal web applications AND you can work against a "unified" (you are programming only against Chrome) "modern" web browser.

Resources