Skip to content

Instantly share code, notes, and snippets.

View atetc's full-sized avatar
🎯
Focusing

Rustem Saitkulov atetc

🎯
Focusing
View GitHub Profile
@atetc
atetc / PermissionUtils
Last active December 11, 2015 04:12
Helpful util class template for Android M Permissions
package ***.***.android.utils;
import android.Manifest;
import android.app.Activity;
import android.app.Fragment;
import android.content.Context;
import android.content.pm.PackageManager;
import android.support.v13.app.FragmentCompat;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
@atetc
atetc / OkSettings
Last active August 28, 2015 10:45
save inner to DB
@SQLiteObject("templates")
public class OkSettings {
@SuppressWarnings("unused")
@SQLitePk
private long mId;
@SQLiteColumn(Column.BASE_URL)
@SerializedName("templatesBaseUrl")
private String mBaseUrl;
android.content.ReceiverCallNotAllowedException: BroadcastReceiver components are not allowed to register to receive intents
at android.app.ReceiverRestrictedContext.registerReceiver(ContextImpl.java:212)
at android.app.ReceiverRestrictedContext.registerReceiver(ContextImpl.java:201)
at com.google.android.gms.common.api.c$2.onConnectionSuspended()
at com.google.android.gms.internal.jm.aE()
at com.google.android.gms.internal.jl$a.handleMessage()
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5376)
at java.lang.reflect.Method.invoke(Method.java)
RequestChatResponse requestChatResponse = null;
try {
requestChatResponse = mChatService.requestChat(
((AppDelegate) getContext().getApplicationContext()).getSecureToken(),
gmsUser,
mSettings.fixedAgentLogin().get(),
String.format(getContext().getString(R.string.clientDeviceOsPattern), Build.VERSION.RELEASE),
BuildConfig.VERSION_NAME,
"msc",
gmsUser,
@atetc
atetc / dabblet.html
Created October 17, 2014 11:57
Untitled
<!DOCTYPE html>
<html>
<head>
<link type="text/css" href="../stylesheets/all.3fc9a786d560b5113b1e518a5c523a26.css" rel="stylesheet">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<script type="text/javascript" type="text/javascript" src="../js/all.486c0c62b8a4e94343b9573c434521e7.js"></script>
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){