Profile cover photo
Profile photo
Anuj Sharma
111 followers -
You treat me good, I'll treat you better :)
You treat me good, I'll treat you better :)

111 followers
About
Posts

Post has attachment

Post has attachment
hahaha

Post has attachment
This is an app where user can store and share instagram pics,
This is beta version of application.
https://play.google.com/apps/testing/com.anuj.sharememories/

Post has attachment

Post has shared content
hahaha... Jealousy in Artificial Intelligence :P

Post has attachment

Hey guys, I need help. I an newbie to CardBoard SDK in Android.
Want to make video player and wanna play video inside it.
Please provide useful links.

Thanks in advance.

Post has shared content
This is great feature for all android developers.
Custom Tabs for a seamless web experience in your app
Pro-tip by +Ian Lake

Ideally, the transition between your app content and web content should be seamless. Custom Tabs (http://goo.gl/eFWSsv) give you the tools to make it seamless by prefetching web content, customizing the look and feel, and adding custom actions while taking advantage of the cookies and features in the user’s existing browser.

Getting started with Custom Tabs is straightforward with the com.android.support:customtabs:23.1.1 Gradle dependency and CustomTabsIntent.Builder (https://goo.gl/TVfocF):
new CustomTabsIntent.Builder()
  .setShowTitle(true)
  .enableUrlBarHiding()
  .setToolbarColor(ContextCompat.getColor(activity,R.color.theme_primary))
  .build()
  .launchUrl(activity, uri);

Browsers, such as Chrome 45 and higher, can then read the extras provided by CustomTabsIntent to customize the toolbar color and update their UI to respect your options on whether the title is shown and whether the URL bar hides when scrolling down. This system allows progressive enhancement: if the user’s browser of choice doesn’t use the extras, it’ll still work but they’ll just get the default behavior of launching the browser.

But that’s just the beginning. Custom menu items in the overflow can be added with addMenuItem() and an action button can be added to the toolbar with setActionButton(). This makes it possible to trigger custom functionality in your app while the user is on the web, making the web a seamless part of your app. Not to mention additional look and feel customizations you can make with start and exit animations and a custom back button.

Taking advantage of warming up the browser or preloading URIs requires connecting to the browser itself using the static CustomTabsClient.bindCustomTabsService() method (https://goo.gl/YB89CS). Consider using code similar to our demo app’s getPackageNameToUse() method (https://goo.gl/fAzCpK) to respect the user’s choice in default browser when finding the appropriate package name to connect to.

The CustomTabClient you get back can then warm up the browser with customTabClient.warmup(0L) (https://goo.gl/Rf1ZBG) and you can start a CustomTabSession (https://goo.gl/5uQnD2) with the aptly named newSession() method, passing in an optional callback for getting navigation events. That’s where the preloading comes in with mayLaunchUrl(). It also allows you to update the icon and description of your action button (perfect for toggle style buttons such as favorite, like, or saving it for later).

Just make sure to pass on your CustomTabSession along to your CustomTabsIntent.Builder with the alternate constructor that takes a CustomTabSession (https://goo.gl/o1bAc1) or you won’t get any callbacks and updates to the action button won’t be reflected.

So any time you’re linking out to web content, use a CustomTabsIntent to make it a seamless part of your app and use CustomTabClient if loading time is critical - both important parts in your quest to #BuildBetterApps .  

Post has attachment
Awesome moments spent with my #officemates :)

Post has attachment
My Cute Angel :) playing with her bucket :P
Photo
Wait while more posts are being loaded