Skip to content

Instantly share code, notes, and snippets.

View haykgalstyan's full-sized avatar

Hayk Galstyan haykgalstyan

  • Yerevan
View GitHub Profile
@first087
first087 / MainActivity.java
Last active February 14, 2024 00:22
Android Application : In-app Billing Example. Test app at https://play.google.com/store/apps/details?id=com.ethanf.in_app_billing_ex
package com.ethanf.in_app_billing_ex;
import java.util.ArrayList;
import org.json.JSONException;
import org.json.JSONObject;
import com.android.vending.billing.IInAppBillingService;
import android.os.Bundle;
@anry200
anry200 / ScalableVideoView.java
Created January 16, 2014 13:40
Android : How to stretch video to use whole area of VideoView (code snippets)
import android.content.Context;
import android.util.AttributeSet;
import android.widget.VideoView;
public class ScalableVideoView extends VideoView {
private int mVideoWidth;
private int mVideoHeight;
private DisplayMode displayMode = DisplayMode.ORIGINAL;
@KamilLelonek
KamilLelonek / CopyFileActivity.java
Created August 30, 2013 12:46
[Android] Activity used for copying selected files from anywhere on device to local data isolated storage.
package com.example.copy;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;