Skip to content

Instantly share code, notes, and snippets.

View karthiks's full-sized avatar
🎯
Focusing

Karthik Sirasanagandla karthiks

🎯
Focusing
View GitHub Profile
@karthiks
karthiks / NotificationUtils.java
Created August 24, 2017 18:37
Create Notification object using Builder
public class NotificationUtils extends ContextWrapper {
public static final String ANDROID_CHANNEL_ID = "com.androidstuff.tutsplustalerts.ANDROID";
public static final String IOS_CHANNEL_ID = "com.androidstuff.tutsplustalerts.IOS";
public static final String ANDROID_CHANNEL_NAME = "ANDROID CHANNEL";
public static final String IOS_CHANNEL_NAME = "IOS CHANNEL";
private NotificationManager notificationManager;
public NotificationUtils(Context base) {
super(base);
@karthiks
karthiks / NotificationUtils.java
Last active August 22, 2018 13:15
Create NotificationChannel object per Channel, with the desired options
public class NotificationUtils extends ContextWrapper {
public static final String ANDROID_CHANNEL_ID = "com.androidstuff.tutsplustalerts.ANDROID";
public static final String IOS_CHANNEL_ID = "com.androidstuff.tutsplustalerts.IOS";
public static final String ANDROID_CHANNEL_NAME = "ANDROID CHANNEL";
public static final String IOS_CHANNEL_NAME = "IOS CHANNEL";
private NotificationManager notificationManager;
//..
public NotificationUtils(Context base) {
@karthiks
karthiks / NotificationUtil.java
Last active August 24, 2017 18:52
Create NotificationManager from SystemService
public class NotificationUtils extends ContextWrapper {
private NotificationManager notificationManager;
public NotificationManager getNotificationManager() {
if (notificationManager == null) {
notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
}
return notificationManager;
}
}
@karthiks
karthiks / README.md
Created May 19, 2017 07:27 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed


@karthiks
karthiks / MyApp.java
Created January 17, 2017 11:17
CleverTap-Validator-Issue-1
public class MyApp extends Application {
@Override
public void onCreate() {
ActivityLifecycleCallback.register(this); //Must be called before super.onCreate()
super.onCreate();
if (BuildConfig.DEBUG) {
// During development, we set the SDK to debug mode,
// in order to log warnings or other important messages to Android logging system.
CleverTapAPI.setDebugLevel(1); // optional
}
@karthiks
karthiks / permissions.txt
Created January 8, 2017 18:32 — forked from Rainer-Lang/permissions.txt
A list of all Android permissions...
android.permission.ACCESS_ALL_DOWNLOADS
android.permission.ACCESS_BLUETOOTH_SHARE
android.permission.ACCESS_CACHE_FILESYSTEM
android.permission.ACCESS_CHECKIN_PROPERTIES
android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY
android.permission.ACCESS_DOWNLOAD_MANAGER
android.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED
android.permission.ACCESS_DRM_CERTIFICATES
android.permission.ACCESS_EPHEMERAL_APPS
android.permission.ACCESS_FM_RADIO
@karthiks
karthiks / activity_android_ui_1.xml
Created April 17, 2016 08:03
Lesson Learnt playing with RelativeLayout in Android UI
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="${relativePackage}.${activityClass}" >
<ScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
@karthiks
karthiks / LearningResources.md
Last active September 27, 2015 18:45
Learning Resources

Quotes

"The more we see, the more we are capable of seeing." –Maria Mitchell

Learning Resources

  • edX free online courses from the world's best universities.
  • Degreed turn learning into skills
  • Skillshare a learning community for creators.
  • Highbrow bite-sized courses delivered to your inbox every morning.
  • Coursera free online classes from 120+ top universities and educational organisations.
  • 99U education that you didn’t get in school, highlighting real-world best practices for making ideas happen.
@karthiks
karthiks / webapp_android.java
Last active May 17, 2020 13:32
Convert HTML5 into standalone Android App
//Ref. http://stackoverflow.com/questions/12840977/convert-html5-into-standalone-android-app
//Ref. http://gamedev.stackexchange.com/questions/8599/packaging-html5-games-as-applications-for-iphone-android
//1. Create an Android app using Eclipse.
//2. Create a layout that has a <WebView> control.
public class WebApp extends Activity {
protected void onCreate(Bundle savedInstanceState) {
WebView wv = new WebView(this);
wv.loadUrl("http://www.myapp.com/");
@karthiks
karthiks / Heroku-CheatSheet.md
Created March 13, 2015 18:51
Heroku CheatSheet When You Have Several Apps In Your Account

Heroku CheatSheet When You Have Several Apps In Your Account

Restart App in Heroku

heroku restart -a my-app-name

Fetch Environment configuration for a particular app

heroku config --app my-app-name

Set Environment key/value pair for a particular app

heroku config:set key1=value1 key2=value2 key3=value3 --app my-app-name