Disable Chrome Options Menu - Android - android

I am trying to do SSO using Chrome Tabs in my Android Application.
Whenever the chrome comes in it also has options menu of chrome - Is there a way to disable this options menu.
Attached is a screenshot

No, currently is not possibile: you can add items but not remove the button.
https://developer.chrome.com/multidevice/android/customtabs

Simply use a WebView instead of CustomTabs - then there is nothing to hide away, to begin with.

In cases like this you should use phonegap instead of use chrome browser as webview read the docs
basically it runs chrome webview on android, and safari webview on IOS but without all chrome/safari options.

Hey there so in my opinion you should use simple Android webview if you don't want your user to access these options.
Just create a new activity/fragment that contains webview and open your website or any url within it.
This might help you from android developer docs.
Also try this example that might be useful.

Related

Is it possible to display the Google Chrome browser from within an Android app?

I want my app to launch chrome but also monitor the user's actions on chrome, such as navigating, back, etc. I think I can launch chrome using Intents, but I'm not sure about monitoring user input.
With chrome application is not possible. For do that you must implement a webview within your own app.
Well you can try Custom Tabs
With Custom Tabs you can get instance of browser which support CustomTabs like chrome without creating a web view. As it provide navigation awareness, the browser delivers a callback to the application upon an external navigation. You can modify and update following -
Custom menu
Color of the address bar
Custom action button
Custom enter and exit animations
Check Custom Tabs Implementation Guide
You need to use Web view or create your own browser then you can achieve your goal.

How can android app (Intent.ACTION_VIEW) opens url in browser, with named window

How can I, in Android APP, open a URL in browser with a named window?
There are many good solutions for, from Android APP, opening a URL in a browser window with the Intent.ACTION_VIEW, but is there a way to specify a target name?
The reason I need this is because there is a specific step that needs to done is a browser, instead of in my APP. If a new browser window is opened every time, there will be multiple browser windows open. What I need is just using one fixed browser window.
To make it clear, below are two similar situations when open another browser window with a link. What I need is the latter one.
< href="url" target='_blank'> Pop open a new window each time clicked.</>;
< href="url" target='MyWindow'> always open in the same window</>;
Thanks.
The behaviour you're trying to achieve is only possible through a custom webview or a 3rd party library. I would recommend Chrome Custom Tabs though because many mobile browsers actually do implement those and they offer much flexibility. Also some websites block features when they're shown in webview. For example you cannot use Google login in a Webview. You need to launch a browser or a custom chrome tab.

WebChromeClient Integrate in Android App

I'm trying to solve a problem in integrating WebChromeClient and try to achieve this one below (If possible).
Mine:
Steps that I made: I create an Activity with WebView in it. And just reflect the Url in the toolbar as title.
How can we somehow fuse (Fuse maybe not the right word) this to our App? The onCreateOptionsMenu is from Chrome Browser as I noticed.
EDIT: I don't know the name of it, I thought it is webChromeClient.
I don't know the exact name for this, I thought it was webChromeClient - but it is Chrome Custom Tabs. The documentation for implementations is found here:
https://developer.chrome.com/multidevice/android/customtabs#whatarethey
Gradle: compile 'com.android.support:customtabs:24.2.1'
Chrome Custom Tabs is faster than Google Chrome Browser and WebView.
Customization is also included
The WebView is good solution if you are hosting your own content inside your app. If your app directs people to URLs outside your domain, It is recommend that you use Chrome Custom Tabs for these reasons:
NOTE:
If there is no default browser set, it will pop up BottomSheet to complete action using. I think this should not be. We must check if Chrome browser is installed and launched that instead of other browser.
For kotlin users, equivalent is implementation 'androidx.browser:browser:1.0.0'
Sample code can be found at https://github.com/anandwana001/mindorks-cct

How do I create a android webview mobile app with jquery mobile

I am pretty new to jQuery.I have heard of building mobile web apps with jquery mobile. I plan to open up a list view in jquery with horizontal navigation to sublists and further to a detailed page , sort of like a menu to submenu to a detailed page with images and text. Is there a way I can acheieve this in jquery? Also planning to add the jquery index.html? file in my android project and call it via webview. I just need some demo apps regarding listview and sublist navigation to detailed pages as reference. Anyone has any idea regarding the same?
Thanks!
Justin.
Well, for a start, you could check the demo API in here. You'll get a pretty demonstration of the listview, different widget you could use in JQM. For Android Webview, I can't help though

Android webview to work like native browser

I experimenting with WebView in Android and I can't figure out how to make it work like the native browser.
I have an example for this:
Go to deviantART.com in native browser. Press Menu button. At the bottom of the menu there will be a link to disable mobile view and it works as expected. This exact same thing doesn't work in WebView. It simply turns the menu off and that is all, mobil CSS still stays intact.
I need to make users disable deviantART's mobile CSS, so I need the WebView to work like this.
JavaScript and DOMStorage are enabled.
I need the proper code or an workaround, but after hours of searching I didn't find anything that connected to this problem.
Thank you in advance.
If all you want is to turn off the mobile view you can set the user-agent string on the WebView using setUserAgentString (String ua).

Categories

Resources