Skip to content

Instantly share code, notes, and snippets.

View firecatmusic's full-sized avatar
💤

Ade Fajar firecatmusic

💤
View GitHub Profile
lateinit var manager: ReviewManager
var reviewInfo: ReviewInfo? = null
// Call this method asap, for example in onCreate()
private fun initReviews() {
manager = ReviewManagerFactory.create(this)
manager.requestReviewFlow().addOnCompleteListener { request ->
if (request.isSuccessful) {
reviewInfo = request.result
} else {
@ssaurel
ssaurel / MainActivity.java
Created August 22, 2018 11:39
Main Activity for the GPS Tutorial on the SSaurel's Blog
package com.ssaurel.fusedlocation;
import android.Manifest;
import android.content.DialogInterface;
import android.content.pm.PackageManager;
import android.location.Location;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
@aqua30
aqua30 / HideShowScrollParallaxActivity.java
Last active April 29, 2024 20:02
Show/Hide view on up/down scroll in android - Using ScrollView
/**
* Created by Saurabh(aqua) in 2017.
*/
public class ScrollActivity extends BaseActivity {
/* view binding */
@BindView(R.id.scrollView)ScrollView scrollView;
@BindView(R.id.parallax_image)ImageView parallaxImage;
@BindView(R.id.tv_perhour)TextView textView;
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active May 16, 2024 21:35
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings