Skip to content

Instantly share code, notes, and snippets.

View smyykb's full-sized avatar

Sümeyye Ortagedik smyykb

  • Ziraat Teknoloji
View GitHub Profile
@smyykb
smyykb / DeCryptor.java
Created March 14, 2018 08:08 — forked from JosiasSena/DeCryptor.java
Encryptor and Decryptor for data encryption.decryption using the Android KeyStore.
/**
_____ _____ _
| __ \ / ____| | |
| | | | ___| | _ __ _ _ _ __ | |_ ___ _ __
| | | |/ _ \ | | '__| | | | '_ \| __/ _ \| '__|
| |__| | __/ |____| | | |_| | |_) | || (_) | |
|_____/ \___|\_____|_| \__, | .__/ \__\___/|_|
__/ | |
|___/|_|
*/
@smyykb
smyykb / components-action.csv
Created March 14, 2018 06:45 — forked from AkshayChordiya/components-action.csv
Android Architecture Guidelines Cheatsheet
Component Action
UI Controllers (Activity and Fragment) Only UI related logic
ViewModel Container for data required by UI
Repository Single source of truth for data
Room Local Database
Retrofit Web Service
@smyykb
smyykb / android_studio_shortcuts.md
Created February 2, 2018 11:30 — forked from stkent/android_studio_shortcuts.md
Android Studio Shortcuts (Mac)

Android Studio Shortcuts (Mac)

Notes:

  • Two of the most useful shortcuts utilize the Fn (function) keys. It is therefore recommended that you enable the "Use all F1, F2, etc. keys as standard function keys" option [System Preferences > Keyboard].
  • Be sure to enable the Mac OS X 10.5+ keymap in Android Studio [Preferences > Keymap].
  • A fairly complete shortcut list can be found here.

Useful symbols:

@smyykb
smyykb / volley-POST-example.java
Created October 24, 2017 17:59 — forked from mombrea/volley-POST-example.java
Example of performing a POST request using Google Volley for Android
public static void postNewComment(Context context,final UserAccount userAccount,final String comment,final int blogId,final int postId){
mPostCommentResponse.requestStarted();
RequestQueue queue = Volley.newRequestQueue(context);
StringRequest sr = new StringRequest(Request.Method.POST,"http://api.someservice.com/post/comment", new Response.Listener<String>() {
@Override
public void onResponse(String response) {
mPostCommentResponse.requestCompleted();
}
}, new Response.ErrorListener() {
@Override
@smyykb
smyykb / Foreground.java
Created October 6, 2017 13:21 — forked from steveliles/Foreground.java
Class for detecting and eventing the foreground/background state of an Android app - API-level 14+
package com.sjl.util;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import java.util.List;