Skip to main content

Posts

Showing posts from 2016

YouTube API V3 for Android

Official Website for YouTube API V3 https://developers.google.com/youtube/v3/getting-started In YouTube API we can load videos with authentication or credential.   Google Sample for getting credential in android  https://github.com/googlesamples/android-credentials , but we will modify it for our sample application step by step. Create a OAuth 2.0 client IDs in Google API Console with your application package name for API for Android and this API key is not needed to be copied or pasted in your application its just to register your project for OAuth 2.0.   Add these library in your gradle file: compile 'com.google.android.gms:play-services-auth:9.0.2'  compile 'com.google.api-client:google-api-client-android:1.22.0'  compile 'com.google.apis:google-api-services-youtube:v3-rev171-1.22.0' compile 'com.github.bumptech.glide:glide:3.6.1' compile 'com.android.support:design:23.4.0' compile 'com.android.support:cardview-v7:23

Twitch API v3 for Android

Official website for Twitch API v3 https://dev.twitch.tv/docs Twitch gives API to access some data with and without authentication : Blocks Channels Channel Feed Chat Follows Games Ingests Search Streams Teams Users Videos In this post we will work on how to get the channels basic data like status,name,language,banner,profile banner,videos,streams and other things. There is a library for calling API callbacks called Java Twitch API Wrapper https://github.com/urgrue/Java-Twitch-Api-Wrapper  this library is for Java projects not for Android. So what we will do is first we will create a Android application called TwitchApp: Next create a package named its as " twitchapis " and copy all the package from the "Java Twitch API Wrapper" project and paste it in " twitchapis " package. Add these library in your build.gradle: compile 'com.github.bumptech.glide:glide:3.6.1' compile 'com.loopj.android:android-async-

Android Marshmallow 6.0 permissions

Before Marshmallow, permissions were handled at install-time and specified in the AndroidManifest.xml within the project. Full list of permissions can be found here . After Marshmallow, permissions must now be requested at runtime before being used. There are a number of libraries available to make runtime permissions easier. Dangerous Permissions First, we need to recognize the dangerous permissions that require us to request runtime permissions. This includes but is not limited to the following common permissions: Name      Description Manifest.permission.READ_CALENDAR     Read calendar events Manifest.permission.WRITE_CALENDAR     Write calendar events Manifest.permission.CAMERA     Access camera object Manifest.permission.READ_CONTACTS     Read phone contacts Manifest.permission.WRITE_CONTACTS     Write phone contacts Manifest.permission.ACCESS_FINE_LOCATION     Access precise location Manifest.permission.ACCESS_COARSE_LOCATION     Access general location Ma

Android SwipeCalendar

In this you can add the Event for the particular day with different color of tags. You can get the Source code from Github : SwipeCalendar  

Android RecyclerView and StaggeredGridLayoutManager with Picasso/Glide

This project is there in GitHub https://github.com/yuvaraj119/Picasso-RecyclerView-StaggeredGridLayoutManager You can download and start customizing it for your project also. How to use with Picasso Picasso + RecyclerView + StaggeredGridLayoutManager Its the enhanced version of this project https://github.com/pohh/slotmachinepicasso were there was a problem with Picasso + RecyclerView + StaggeredGridLayoutManager shuffles resizable recycler views infinitely issue posted on github https://github.com/square/picasso/issues/918 I have made some changes now it works with Picasso and Glide without any shuffles and position change Currently this project is done with Picasso If you want to use it with Glide How to use with Glide Glide + RecyclerView + StaggeredGridLayoutManager Add dependencies for Glide https://github.com/bumptech/glide Remove Picasso library from dependency and remove all the codes of Picasso from MyGridAdapter.java and also from other p