Example usage for android.content Intent toString

List of usage examples for android.content Intent toString

Introduction

In this page you can find the example usage for android.content Intent toString.

Prototype

@Override
    public String toString() 

Source Link

Usage

From source file:com.jameswolfeoliver.pigeon.Utilities.Utils.java

public static String intentToString(Intent intent) {
    if (intent == null) {
        return null;
    }//from  w  w w  . ja v  a2 s  .c  o m

    return intent.toString() + " " + bundleToString(intent.getExtras());
}

From source file:com.keylesspalace.tusky.util.LinkHelper.java

/**
 * opens a link in the browser via Intent.ACTION_VIEW
 *
 * @param uri the uri to open// w  w  w  .j  av a 2  s . c  o m
 * @param context context
 */
public static void openLinkInBrowser(Uri uri, Context context) {
    Intent intent = new Intent(Intent.ACTION_VIEW, uri);
    intent.putExtra(Browser.EXTRA_APPLICATION_ID, context.getPackageName());
    try {
        context.startActivity(intent);
    } catch (ActivityNotFoundException e) {
        Log.w("URLSpan", "Actvity was not found for intent, " + intent.toString());
    }
}

From source file:org.symptomcheck.capstone.gcm.GcmBroadcastReceiver.java

@Override
public void onReceive(Context context, Intent intent) {
    Log.i(TAG, "GcmRx;" + intent.toString());
    // Explicitly specify that GcmIntentService will handle the intent.
    ComponentName comp = new ComponentName(context.getPackageName(), GcmIntentService.class.getName());
    // Start the service, keeping the device awake while it is launching.
    startWakefulService(context, (intent.setComponent(comp)));
    setResultCode(Activity.RESULT_OK);//  w  w w.  j a v  a2 s  .  c  om
}

From source file:org.openchaos.android.buildmessage.GcmBroadcastReceiver.java

@Override
public void onReceive(Context context, Intent intent) {
    Log.d(TAG, "Received broadcast: " + intent.toString());

    // Explicitly specify that GcmIntentService will handle the intent.
    ComponentName comp = new ComponentName(context.getPackageName(), GcmIntentService.class.getName());

    // Start the service, keeping the device awake while it is launching.
    startWakefulService(context, (intent.setComponent(comp)));
    setResultCode(Activity.RESULT_OK);/*from  w  w  w. jav a 2  s .  c o  m*/
}

From source file:com.amlcurran.messages.telephony.SmsManagerOutputPort.java

@Override
protected void onHandleIntent(Intent intent) {
    MessagesLog.d(this, intent.toString());
    if (isSendRequest(intent)) {

        InFlightSmsMessage message;//w  w w.j a v a2 s.c om
        if (isFromWear(intent)) {
            message = extractInFlightFromWear(intent);
        } else {
            message = intent.getParcelableExtra(EXTRA_MESSAGE);
        }
        SmsMessage smsMessage = messageRepository.send(message, getContentResolver());
        sendToApi(smsMessage);

    } else if (ACTION_RESEND.equals(intent.getAction())) {

        SingletonManager.getNotifier(this).clearFailureToSendNotification();
        InFlightSmsMessage message = intent.getParcelableExtra(EXTRA_MESSAGE);
        SmsMessage smsMessage = messageRepository.send(message, getContentResolver());
        sendToApi(smsMessage);

    }
}

From source file:uk.ac.horizon.ug.exploding.client.logging.ActivityLogger.java

public void logOnNewIntent(Intent intent) {
    log("onNewIntent", "intent", intent.toString());
}

From source file:uk.ac.horizon.ug.exploding.client.logging.ActivityLogger.java

public void logStartActivity(Intent intent) {
    log("startActivity", "intent", intent.toString());
}

From source file:com.feigdev.fourcolumngv.FourColumnGridViewActivity.java

protected void onNewIntent(Intent intent) {
    super.onNewIntent(intent);
    Log.d(TAG, "onNewIntent called: " + intent.toString());
    Uri uri = intent.getData();//w w w  . j a v a  2  s  .  c o m
    if (uri != null) {
        String uriVar = uri.getQueryParameter("var");
        if (uriVar != null) {
            Log.d(TAG, uriVar);
        }
    }
}

From source file:com.androidzeitgeist.dashwatch.DashWatchService.java

@Override
public int onStartCommand(Intent intent, int flags, int startId) {
    Log.d(TAG, "onStartCommand: " + (intent != null ? intent.toString() : "no intent"));

    if (intent != null) {
        updateExtensions();/*from  w ww. j  a v a  2s.co m*/

        // If started by a wakeful broadcast receiver, release the wake lock it acquired.
        WakefulBroadcastReceiver.completeWakefulIntent(intent);
    }

    return START_STICKY;
}

From source file:com.moto.miletus.application.ble.neardevice.NearDeviceNotification.java

@Override
public void onReceive(final Context context, final Intent intent) {
    Log.i(TAG, intent.toString());

    if (!intent.getAction().equals(Strings.NEAR_DEVICE)) {
        return;/*from  ww w .  j  a va 2 s .c  o m*/
    }

    this.context = context;
    this.systemService = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);

    findDevice();
}