Chrome custom tabs in sketchware

Chrome Custom Tabs in sketchware. Chrome Custom Tabs with Custom colour. And this is the original chrome custom tab and not a webview. 



Hi guys 
Today i am posting here very common but most useful post. It is very useful for the person who want to link his website with his app or project.


Where can we use Chrome Custom Tabs
As I was making a games app and then I get to know about it. So for me the main use of this was the games tab for game app. But you can use it for Adding your blog or website, or if you are making a chat app then you can use it to make handle links. Or you can add a google search option inside your app so that user need not to go out of your app. And there are thousands of possibilities that how can you use Chrome Custom Tabs. 

Can I use Admob ads in chrome custom tabs.
The Answer is no. Because as I told above you are not going to add any webview or view inside your app. All things are readymade in library. Only you can do is customising it with codes. 


What if chrome not installed in user's phone
This library is so smart because it is made by Google. This library automatically detects if chrome is installed or not. If it found chrome not installed then it automatically opens url into custom tab of default browser. If default browser or android os  not supports custom tabs then it'll automatically open the link normally. 
So overall there is no chances of crashing of app.



How to use Chrome Custom Tabs

First of all make a new project

Click on 3 dots. 
click on library

click on appcompact and design

turn it on and come back to project.


View area
There is no need of adding any special widget or view. You can handle link as you normally do with intent. But also there is no need of intent. Also there is no need of special components.

Event area 
Here I given link for block files of Chrome Custom Tabs. 

Import these blocks and if you not know how to install blocks then I had also written tutorials about it.
Link: To be updated soon

Go to onclick event from where you want to load url by onclick. I am pretty sure that you'll do it without any help. Open onclick and add both of the blocks. 
Add both these blocks in same order.  In the url block insert your url or add any string. 

Only this was the thing you need to do. 




Library
Download the library zip file and extract it to 
 .sketchware/libs/local_libs/
After that go to your project and go to library and turn it on. 
You can download the library from given link

After downloading library import it from your project and you're finished.




Thanks for reading the post. This blog is completely dedicated to sketchware pro so if you're a sketchware pro developer then visit this blog regularly.
Previous Post Next Post