Android Open Source - bodyguard Common Utilities






From Project

Back to project page bodyguard.

License

The source code is released under:

GNU General Public License

If you think the Android project bodyguard listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.example.bodyguard;
/*from  w  ww  .j  a v a  2s . c  om*/
import android.content.Context;
import android.content.Intent;

public final class CommonUtilities {

    // give your server registration url here
    static final String SERVER_URL       = "http://10.0.2.2/gcm_server_php/register.php";

    // Google project id
    static final String SENDER_ID        = "903913289319";

    /**
     * Tag used on log messages.
     */
    static final String TAG        = "AndroidHive GCM";

    static final String DISPLAY_MESSAGE_ACTION = "com.androidhive.pushnotifications.DISPLAY_MESSAGE";

    static final String EXTRA_MESSAGE    = "message";

    /**
     * Notifies UI to display a message.
     * <p>
     * This method is defined in the common helper because it's used both by the
     * UI and the background service.
     * 
     * @param context
     *            application's context.
     * @param message
     *            message to be displayed.
     */
    static void displayMessage(Context context, String message)
  {
      Intent intent = new Intent(DISPLAY_MESSAGE_ACTION);
      intent.putExtra(EXTRA_MESSAGE, message);
      context.sendBroadcast(intent);
  }
}




Java Source Code List

.BodyGuardActivity.java
com.example.bodyguard.AlertDialogManager.java
com.example.bodyguard.CommonUtilities.java
com.example.bodyguard.ConnectionDetector.java
com.example.bodyguard.CustomGeoCoding.java
com.example.bodyguard.DirectionsJSONParser.java
com.example.bodyguard.GPSTracker.java
com.example.bodyguard.GcmBroadcastReceiver.java
com.example.bodyguard.GcmIntentService.java
com.example.bodyguard.MainActivity.java
com.example.bodyguard.PlaceAutoComplete.java
com.example.bodyguard.PlaceDetails.java
com.example.bodyguard.Place.java
com.example.bodyguard.PlacesAutoCompleteAdapter.java
com.example.bodyguard.PlacesList.java
com.example.bodyguard.PollQRT.java
com.example.bodyguard.ResultActivity.java
com.example.bodyguard.SendLocationActivity.java
com.example.bodyguard.SplashScreen.java
com.example.bodyguard.StartActivity.java
com.example.bodyguard.UserInformation.java
com.example.bodyguard.WakeLocker.java