Month: April 2016

Volley

http://developer.android.com/training/volley/index.html
https://github.com/mcxiaoke/android-volley
https://android.googlesource.com/platform/frameworks/volley/

Advertisements

NFC

YouTube link
Book Link
http://developer.android.com/guide/topics/connectivity/nfc/nfc.html
http://code.tutsplus.com/tutorials/reading-nfc-tags-with-android–mobile-17278
http://www.tutorialspoint.com/android/android_nfc_guide.htm

First steps with NFC in Android – Android NFC App tutorial

https://github.com/nadam/nfc-reader
http://stackoverflow.com/questions/5762234/nfc-tutorial-for-android-other-than-api-demo

Alarm

http://developer.android.com/training/scheduling/alarms.html
http://www.compiletimeerror.com/2015/02/how-to-make-alarm-repeat-in-android-code.html#.Vxc-6UJ97IU

Some Example Code: For Set and Cancel with Boot Receiver
// BEGIN_INCLUDE(set_alarm)
/**
* Sets a repeating alarm that runs once a day at approximately 8:30 a.m. When the
* alarm fires, the app broadcasts an Intent to this WakefulBroadcastReceiver.
* @param context
*/
public void setAlarm(Context context) {

alarmMgr = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
Intent intent = new Intent(context, AutoMovementGPSReceiver.class);
alarmIntent = PendingIntent.getBroadcast(context, 0, intent, 0);

Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
// Set the alarm’s trigger time to tomorrow 08:30 a.m.
calendar.set(Calendar.DAY_OF_MONTH, getCurrentDay()+1);
calendar.set(Calendar.HOUR_OF_DAY, 8);
calendar.set(Calendar.MINUTE, 30);

/*
* If you don’t have precise time requirements, use an inexact repeating alarm
* the minimize the drain on the device battery.
*
* The call below specifies the alarm type, the trigger time, the interval at
* which the alarm is fired, and the alarm’s associated PendingIntent.
* It uses the alarm type RTC_WAKEUP (“Real Time Clock” wake up), which wakes up
* the device and triggers the alarm according to the time of the device’s clock.
*
* Alternatively, you can use the alarm type ELAPSED_REALTIME_WAKEUP to trigger
* an alarm based on how much time has elapsed since the device was booted. This
* is the preferred choice if your alarm is based on elapsed time–for example, if
* you simply want your alarm to fire every 60 minutes. You only need to use
* RTC_WAKEUP if you want your alarm to fire at a particular date/time. Remember
* that clock-based time may not translate well to other locales, and that your
* app’s behavior could be affected by the user changing the device’s time setting.
*
* Here are some examples of ELAPSED_REALTIME_WAKEUP:
*
* // Wake up the device to fire a one-time alarm in one minute.
* alarmMgr.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,
* SystemClock.elapsedRealtime() +
* 60*1000, alarmIntent);
*
* // Wake up the device to fire the alarm in 30 minutes, and every 30 minutes
* // after that.
* alarmMgr.setInexactRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP,
* AlarmManager.INTERVAL_HALF_HOUR,
* AlarmManager.INTERVAL_HALF_HOUR, alarmIntent);
*/

// Set the alarm to fire at approximately 8:30 a.m., according to the device’s
// clock, and to repeat once a day.
alarmMgr.setInexactRepeating(AlarmManager.RTC_WAKEUP,
calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY, alarmIntent);

// Enable {@code SampleBootReceiver} to automatically restart the alarm when the
/* device is rebooted.
ComponentName receiver = new ComponentName(context, AutoMovementGPSBootReceiver.class);
PackageManager pm = context.getPackageManager();

pm.setComponentEnabledSetting(receiver,
PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
PackageManager.DONT_KILL_APP); */
}
// END_INCLUDE(set_alarm)

/**
* Cancels the alarm.
* @param context
*/
// BEGIN_INCLUDE(cancel_alarm)
public void cancelAlarm(Context context) {
// If the alarm has been set, cancel it.
if (alarmMgr!= null) {
alarmMgr.cancel(alarmIntent);
}else{
alarmMgr = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
Intent intent = new Intent(context, AutoMovementGPSReceiver.class);
alarmIntent = PendingIntent.getBroadcast(context, 0, intent, 0);
alarmMgr.cancel(alarmIntent);
}

// Disable {@code SampleBootReceiver} so that it doesn’t automatically restart the
/* alarm when the device is rebooted.
ComponentName receiver = new ComponentName(context, AutoMovementGPSBootReceiver.class);
PackageManager pm = context.getPackageManager();

pm.setComponentEnabledSetting(receiver,
PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
PackageManager.DONT_KILL_APP); */

}
// END_INCLUDE(cancel_alarm)

PubNub

# Blog — Get Started
https://www.pubnub.com/blog/2015-10-13-build-android-webrtc-video-voice-chat-app/
http://realtimeweekly.co/android-webrtc-tutorial-pubnub/
https://github.com/pubnub/pubnub-android-chat
https://github.com/pubnub/pubnub-chat-channel-presence
https://github.com/pubnub/pubnub-api
https://github.com/GleasonK/pubnub-android-lolli-chat

https://www.pubnub.com/docs/android-java/pubnub-java-sdk

Youtube Link
Link 2

https://www.pubnub.com/blog/tag/android/
https://www.pubnub.com/tutorials/android/mapping-geolocation-tracking/

Simple Android Chat App

Youtube Link 1  Linke2  Link3 Link4
https://www.pubnub.com/docs/android-java/pubnub-java-sdk
https://github.com/codepath/android_guides/wiki/Building-Simple-Chat-Client-with-Parse
https://github.com/pubnub/java/tree/master/android

Build An Android Chat App With Pusher

https://github.com/Pirngruber/AndroidIM

https://www.androidtutorialpoint.com/firebase/real-time-android-chat-application-using-firebase-tutorial/

Building Apps for Android Geofencing

http://developer.android.com/training/location/geofencing.html

Geofences on Android with GoogleApiClient

https://github.com/googlesamples/android-play-location/tree/master/Geofencing
http://mobisoftinfotech.com/resources/blog/android/geofencing-solution-with-android/
https://github.com/googlesamples/android-Geofencing
https://github.com/googlesamples/android-play-location/tree/master/Geofencing/app/src/main/java/com/google/android/gms/location/sample/geofencing

IsGooglePlayServicesAvailable(Android.Content.Context) deprecated
https://forums.xamarin.com/discussion/58614/isgoogleplayservicesavailable-android-content-context-deprecated
https://developers.google.com/android/reference/com/google/android/gms/common/GooglePlayServicesUtil#public-methods