public void OnNdefPushComplete(NfcEvent e) { Intent intent = new Intent(this, typeof(MenuActivity)); intent.PutExtra("status", "Attendance registerd"); StartActivity(intent); }
public void OnNdefPushComplete(NfcEvent evt) { Padbook friendBook = pm.GetPadbookForUsername(contactName); friendBook.AppendPads(keys.ToArray()); _Handler.ObtainMessage(MESSAGE_SENT).SendToTarget(); }
public NdefMessage CreateNdefMessage(NfcEvent e) { NdefRecord txt = NdefRecord.CreateTextRecord("token", token); NdefMessage message = new NdefMessage(new[] { txt }); return(message); }
public NdefMessage CreateNdefMessage(NfcEvent e) { DateTime time = DateTime.Now; string text = code; NdefMessage msg = new NdefMessage(new NdefRecord[] { CreateMimeRecord("sending code", Encoding.UTF8.GetBytes(text)) }); return(msg); }
public NdefMessage CreateNdefMessage(NfcEvent evt) { DateTime time = DateTime.Now; var text = _user.stripeToken; NdefMessage msg = new NdefMessage( new NdefRecord[] { CreateMimeRecord( "application/nfc_app.nfc_app", Encoding.UTF8.GetBytes(text)) }); return(msg); }
public void OnNdefPushComplete(NfcEvent e) { try { // A handler is needed to send messages to the activity when this // callback occurs, because it happens from a binder thread mHandler.ObtainMessage(MESSAGE_SENT).SendToTarget(); } catch (Exception exc) { Helpers.LoggerHelper.LogException(exc); } }
//NFC EVENTS public NdefMessage CreateNdefMessage(NfcEvent evt) { if (myName == null) { Identity.LoadUsername(GetExternalFilesDir(null).ToString()); myName = Identity.Username; } string datagram = myName + ","; foreach (string e in keys) { datagram += e + "#"; } NdefRecord mimeRec = new NdefRecord( NdefRecord.TnfMimeMedia, Encoding.UTF8.GetBytes(Mime), new byte[0], Encoding.UTF8.GetBytes(datagram)); NdefMessage msg = new NdefMessage(new NdefRecord[] { mimeRec }); return(msg); }
public NdefMessage CreateNdefMessage(NfcEvent evt) { DateTime time = DateTime.Now; var text = ("Beam me up!\n\n" + "Beam Time: " + time.ToString("HH:mm:ss")); NdefMessage msg = new NdefMessage( new NdefRecord[] { CreateMimeRecord( "application/com.example.android.beam", Encoding.UTF8.GetBytes(text)) /** * The Android Application Record (AAR) is commented out. When a device * receives a push with an AAR in it, the application specified in the AAR * is guaranteed to run. The AAR overrides the tag dispatch system. * You can add it back in to guarantee that this * activity starts when receiving a beamed message. For now, this code * uses the tag dispatch system. */ //,NdefRecord.CreateApplicationRecord("com.example.android.beam") }); return(msg); }
public NdefMessage CreateNdefMessage(NfcEvent e) { try { DateTime time = DateTime.Now; var text = (Global.WriteMessage); if (string.IsNullOrEmpty(text)) { text = "Blank Message"; } NdefMessage msg = new NdefMessage( new NdefRecord[] { CreateMimeRecord( Helpers.ConstantsHelper.DataMimeType, Encoding.UTF8.GetBytes(text)) }); return(msg); } catch (Exception exc) { Helpers.LoggerHelper.LogException(exc); return(null); } }
/// <summary> /// Creates the ndef message. /// </summary> /// <param name="e">The e.</param> /// <returns>NdefMessage.</returns> public NdefMessage CreateNdefMessage(NfcEvent e) { InRange.Invoke <INfcDevice>(this, this); return(new NdefMessage(_published.Values.ToArray())); }
public void OnNdefPushComplete(NfcEvent arg0) { // A handler is needed to send messages to the activity when this // callback occurs, because it happens from a binder thread mHandler.ObtainMessage(MESSAGE_SENT).SendToTarget(); }
public void OnNdefPushComplete(NfcEvent e) { SetBeamAktive(false); EnableBackground(); }
public NdefMessage CreateMessage(NfcEvent e) { return(getTestMessage()); }