Package org.nfctools.ndefpush

Examples of org.nfctools.ndefpush.NdefPushLlcpService


  }

  public void run() {
    final SnepServer snepServer = new SnepServer(new LoggingNdefListener());
    final SnepClient snepClient = new SnepClient();
    ndefPushLlcpService = new NdefPushLlcpService(ndefListener);
    LlcpOverNfcip llcpOverNfcip = new LlcpOverNfcip(new LlcpConnectionManagerFactory() {

      @Override
      protected void configureConnectionManager(LlcpConnectionManager connectionManager) {
        connectionManager.registerWellKnownServiceAccessPoint(LlcpConstants.COM_ANDROID_NPP,
View Full Code Here


      e.printStackTrace();
    }
  }

  public void run2() {
    ndefPushLlcpService = new NdefPushLlcpService(ndefListener);
    String content = "http://www.google.de";
    final Collection<Record> records = new ArrayList<Record>();
    records.add(new UriRecord(content));
    addMessages(records, new NdefPushFinishListener() {
View Full Code Here

  private boolean initiatorMode;
  private LlcpOverNfcip llcpOverNfcip;

  public LlcpDemo(boolean initiatorMode) {
    this.initiatorMode = initiatorMode;
    ndefPushLlcpService = new NdefPushLlcpService(new LoggingNdefListener());
    llcpOverNfcip = new LlcpOverNfcip(new LlcpConnectionManagerFactory() {

      @Override
      protected void configureConnectionManager(LlcpConnectionManager connectionManager) {
        connectionManager.registerWellKnownServiceAccessPoint(LlcpConstants.COM_ANDROID_NPP,
View Full Code Here

        if (snepServer != null) {
          connectionManager.registerWellKnownServiceAccessPoint(SnepConstants.SNEP_SERVICE_NAME, snepServer);
          connectionManager.registerServiceAccessPoint(SnepConstants.SNEP_SERVICE_ADDRESS, snepServer);
        }
        if (initiatorNdefListener != null) {
          NdefPushLlcpService ndefPushLlcpService = new NdefPushLlcpService(initiatorNdefListener);
          connectionManager.registerWellKnownServiceAccessPoint(LlcpConstants.COM_ANDROID_NPP,
              ndefPushLlcpService);
        }
      }
    });
View Full Code Here

  @Test
  public void testSendReceiveNdefOverNPP() throws Exception {
    NotifyingNdefListener ndefListener = new NotifyingNdefListener(this);
    List<Record> records = new ArrayList<Record>();
    records.add(new UriRecord("http://www.nfctools.org"));
    NdefPushLlcpService ndefPushLlcpService = new NdefPushLlcpService(new LoggingNdefListener());
    ndefPushLlcpService.addMessages(records, null);
    NfcipHelper helper = new NfcipHelper(null, null, ndefListener, ndefPushLlcpService);
    helper.launch();
    synchronized (this) {
      wait(5000);
    }
View Full Code Here

TOP

Related Classes of org.nfctools.ndefpush.NdefPushLlcpService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.