Skip to content

Instantly share code, notes, and snippets.

View rameshvoltella's full-sized avatar
😉
Will have small delay in response as am working on a main module @_work

Ramesh M Nair rameshvoltella

😉
Will have small delay in response as am working on a main module @_work
View GitHub Profile
@rameshvoltella
rameshvoltella / Adding Dynamic Marker in googlemap from web Exapleclass.java
Last active August 29, 2015 14:04
Add dynamic Marker in google map from web using Lazyloading
//Use Lazyloading libarary by Fedor Vlasov from here https://github.com/thest1/LazyList
ImageLoader mImageLoader=new ImageLoader();//imagloader class from the libraray thest1/LazyList
SupportMapFragment supportMapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
GoogleMap googleMap = supportMapFragment.getMap();
googleMap.setMyLocationEnabled(true);
@rameshvoltella
rameshvoltella / LocalBroadcastManager ActivityA.java
Last active August 29, 2015 14:04
LocalBroadcastManager  which used to update the one activity or fragment data from another one,Example if we have two activity A and B, from activity A navgate to activity B and if i do some change in activty b and if those changes should reflect on activity A the we can use the following Methord.the Advantage is that we can do this from any cla…
//ActivityA.java
@Override
public void onCreate(Bundle savedInstanceState) {
// Register to receive messages.
.
LocalBroadcastManager.getInstance(this).registerReceiver(mReceiver,
@rameshvoltella
rameshvoltella / AsyncHttp.java
Last active August 29, 2015 14:04
Working of interface for beginners Android
public class AsyncHttp extends AsyncTask<String, String, String> {
CallbackToActivity mCallback;//Interface class for callback
public AsyncHttp(CallbackToActivity mCallback) {
this.mCallback = mCallback;
}
@rameshvoltella
rameshvoltella / GoogleMap NoClassDefFoundError
Created August 4, 2014 07:06
NoClassDefFoundError at Google Play Services V2 library
NoClassDefFoundError at Google Play Services V2 library i have answerd this in stackoverflow plz check the link below
http://stackoverflow.com/questions/13691028/noclassdeffounderror-at-google-play-services-v2-library/14686856#14686856
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnCompletionListener;
import android.media.MediaPlayer.OnErrorListener;
import android.media.MediaPlayer.OnPreparedListener;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.webkit.WebChromeClient;
import android.widget.FrameLayout;
import android.widget.VideoView;
@rameshvoltella
rameshvoltella / StatusBar
Created November 5, 2015 14:00 — forked from csdear/StatusBar
Notifications : StatusBar With CustomView
package course.examples.Notification.StatusBarWithCustomView;
import android.app.Activity;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
@rameshvoltella
rameshvoltella / ApiModule.java
Created October 8, 2016 09:44 — forked from billynyh/ApiModule.java
Android integration of retrofit, signpost, twitter api
public class ApiModule {
private TwitterApi mApi;
public void init(String token, String tokenSecret) {
OAuthConsumer consumer = new DefaultOAuthConsumer(
Config.TWEET_API_KEY,
Config.TWEET_API_SECRET);
consumer.setTokenWithSecret(token, tokenSecret);
@rameshvoltella
rameshvoltella / DrawableBitmapResourceDecoder.java
Created October 24, 2016 15:09 — forked from TWiStErRob/DrawableBitmapResourceDecoder.java
Glide 3.6.0 proof of concept for loading a Drawable as Bitmap through Glide
class DrawableBitmapResourceDecoder implements ResourceDecoder<Drawable, Bitmap> {
private final BitmapPool pool;
public DrawableBitmapResourceDecoder(Context context) {
this(Glide.get(context).getBitmapPool());
}
public DrawableBitmapResourceDecoder(BitmapPool pool) {
this.pool = pool;
}
@Override public Resource<Bitmap> decode(Drawable drawable, int width, int height) throws IOException {
@rameshvoltella
rameshvoltella / BitmapBitmapResourceDecoder.java
Created October 24, 2016 15:09 — forked from TWiStErRob/BitmapBitmapResourceDecoder.java
Glide 3.6.0 proof of concept for loading a Bitmap as Bitmap through Glide
class BitmapBitmapResourceDecoder implements ResourceDecoder<Bitmap, Bitmap> {
private final BitmapPool pool;
public BitmapBitmapResourceDecoder(Context context) {
this(Glide.get(context).getBitmapPool());
}
public BitmapBitmapResourceDecoder(BitmapPool pool) {
this.pool = pool;
}
@Override public Resource<Bitmap> decode(Bitmap source, int width, int height) throws IOException {
/*
* Copyright (C) 2008 The Android Open Source Project
*
* 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