PendingIntent send - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for PendingIntent send method.

This code example shows how to use the following methods:send
    if (broadcast==null) {
      PendingIntent pi=(PendingIntent)intent.getParcelableExtra(PENDING_RESULT);
       
      if (pi!=null) {
        try { 
          pi.send(this, Activity.RESULT_OK, data);
        } 
        catch (PendingIntent.CanceledException e) {
          // no-op -- client must be gone 
        } 
      } 
    } 
    else { 
      data.setPackage(intent.getStringExtra(BROADCAST_PACKAGE));
      data.setAction(broadcast);
 
      sendBroadcast(data);
    } 
  } 
} 
7
CodeRank
This code example shows how to use the following methods:send
        } else { 
            // This is on Android version 1.6. The in-app buy page activity must be on its 
            // own separate activity stack instead of on the activity stack of 
            // the application. 
            try { 
                pendingIntent.send(mActivity, 0 /* code */, intent);
            } catch (CanceledException e) {
                Log.e(TAG, "error starting activity", e);
            } 
        } 
    } 
 
    /** 
     * Updates the UI after the database has been updated.  This method runs 
     * in a background thread so it has to post a Runnable to run on the UI 
     * thread. 
     * @param purchaseState the purchase state of the item 
     * @param itemId a string identifying the item 
     * @param quantity the quantity of items in this purchase 
     */ 
7
CodeRank
This code example shows how to use the following methods:send
    if (broadcast==null) {
      PendingIntent pi=(PendingIntent)intent.getParcelableExtra(PENDING_RESULT);
       
      if (pi!=null) {
        try { 
          pi.send(this, Activity.RESULT_OK, data);
        } 
        catch (PendingIntent.CanceledException e) {
          // no-op -- client must be gone 
        } 
      } 
    } 
    else { 
      data.setPackage(intent.getStringExtra(BROADCAST_PACKAGE));
      data.setAction(broadcast);
 
      sendBroadcast(data);
    } 
  } 
   
7
CodeRank
This code example shows how to use the following methods:send
        } else { 
	 
			// Android 1.6 
            try { 
	 
                pendingIntent.send ( mActivity, 0, intent );
            } catch ( CanceledException e ) {
	 
                MoaiLog.e ( "MoaiGoogleBillingPurchaseObserver startBuyPageActivity: error sending intent to activity", e );
            } 
        } 
    } 
} 
6
CodeRank
This code example shows how to use the following methods:send
    if (broadcast==null) {
      PendingIntent pi=(PendingIntent)intent.getParcelableExtra(PENDING_RESULT);
       
      if (pi!=null) {
        try { 
          pi.send(this, Activity.RESULT_OK, data);
        } 
        catch (PendingIntent.CanceledException e) {
          // no-op -- client must be gone 
        } 
      } 
    } 
    else { 
      data.setPackage(intent.getStringExtra(BROADCAST_PACKAGE));
      data.setAction(broadcast);
 
      sendBroadcast(data);
    } 
  } 
   
6
CodeRank
This code example shows how to use the following methods:send
        } else { 
	 
			// Android 1.6 
            try { 
	 
                pendingIntent.send ( mActivity, 0, intent );
            } catch ( CanceledException e ) {
	 
                MoaiLog.e ( "MoaiGoogleBillingPurchaseObserver startBuyPageActivity: error sending intent to activity", e );
            } 
        } 
    } 
} 
6
CodeRank
This code example shows how to use the following methods:send
            @Override void doUpdate(final View view) {
                view.setOnClickListener(new View.OnClickListener() {
                    @Override 
                    public void onClick(View v) {
                        try { 
                            pendingIntent.send(view.getContext(), 0, null);
                        } catch (PendingIntent.CanceledException e) {
                            throw new RuntimeException(e);
                        } 
                    } 
                }); 
            } 
        }); 
    } 
 
    @Implementation 
    public void setViewVisibility(int viewId, final int visibility) {
        viewUpdaters.add(new ViewUpdater(viewId) {
            @Override 
            public void doUpdate(View view) {
5
CodeRank
This code example shows how to use the following methods:send
        } 
    } 
 
    private boolean launchPendingIntent(PendingIntent pending, Intent fillIn) {
        try { 
            pending.send(this, Activity.RESULT_OK, fillIn);
            return true; 
        } catch (PendingIntent.CanceledException ex) {
            Log.i(TAG, "Pending intent cancelled: " + pending);
            return false; 
        } 
    } 
 
} 
6
CodeRank
This code example shows how to use the following methods:send
        } else { 
            // This is on Android version 1.6. The in-app buy page activity must be on its 
            // own separate activity stack instead of on the activity stack of 
            // the application. 
            try { 
                pendingIntent.send(mActivity, 0 /* code */, intent);
            } catch (CanceledException e) {
                Log.e(TAG, "error starting activity", e);
            } 
        } 
    } 
 
    /** 
     * Updates the UI after the database has been updated.  This method runs 
     * in a background thread so it has to post a Runnable to run on the UI 
     * thread. 
     * @param purchaseState the purchase state of the item 
     * @param itemId a string identifying the item 
     * @param quantity the quantity of items in this purchase 
     */ 
6
CodeRank
This code example shows how to use the following methods:send
        } else { 
            // This is on Android version 1.6. The in-app buy page activity must be on its 
            // own separate activity stack instead of on the activity stack of 
            // the application. 
            try { 
                pendingIntent.send(mActivity, 0 /* code */, intent);
            } catch (CanceledException e) {
                Log.e(TAG, "error starting activity", e);
            } 
        } 
    } 
 
    /** 
     * Updates the UI after the database has been updated. This method runs in a background thread 
     * so it has to post a Runnable to run on the UI thread. 
     *  
     * @param purchaseState 
     *            the purchase state of the item 
     * @param itemId 
     *            a string identifying the item 
5
CodeRank

Related PendingIntent send Questions & Answers:

send Method Overview
Perform the operation associated with this PendingIntent.
See Code Examples for other Android PendingIntent Methods: