Skip to content

Instantly share code, notes, and snippets.

@huteri
huteri / database.java
Last active January 2, 2016 11:49
Export database file
public Uri exportDatabase() {
String dbName = DATABASE_NAME;
File dbFile = new File(DATABASE_NAME);
File desti = new File(Environment.getExternalStorageDirectory(),
"backup/");
File file = new File(desti, dbName);
if (!desti.exists())
desti.mkdirs();
/*
* ******************************************************************************
* Copyright (c) 2013 Roman Nurik, 2013-2014 Gabriele Mariotti.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@huteri
huteri / IabHelper.java
Last active August 29, 2015 14:19
IabHelper
/* Copyright (c) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,