I am using Firebase to populate my BlogRecycleadapter with blog post and get Likes from Like Buttons but when device is offline and user press Like Button , then app crashes
Without sending parameter you can achecive the same thing when you are calling your network checking method use your method like below
isNetworkStatusAvialable( holder.blogLikeBtn.getContext())
Instead of passing getApplicationContext() method you can get the context from any view that you have.
By using above approach, I am passing context of the same button that was clicked. Hope that helps you as well.