Hi,
Can any tell me, how can I tag two Nokia C7-00 devices by NFC using Java API?
Is there any demo app that can establish NFC connection between two Nokia C7-00 devices ?
Thanks
Hi,
Can any tell me, how can I tag two Nokia C7-00 devices by NFC using Java API?
Is there any demo app that can establish NFC connection between two Nokia C7-00 devices ?
Thanks
According to this looks we can have peer to peer connection
http://www.developer.nokia.com/Commu...131_NFC_-_FAQs
See Does the Nokia 6131 NFC SDK support NFCIP-1 connection? If so, how can I use that?
Java API works with C7 so we can built example easily, try...
import javax.microedition.contactless.ContactlessException;
import javax.microedition.contactless.DiscoveryManager;
import javax.microedition.contactless.TargetListener;
import javax.microedition.contactless.TargetProperties;
import javax.microedition.contactless.TargetType;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.TextField;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
// Simple MIDlet to read the serial number of NDEF tag
public class ReadSerial extends MIDlet implements TargetListener {
private Form form;
private TextField textField;
protected void startApp() throws MIDletStateChangeException {
// Get instance of NFC Discovery Manager
DiscoveryManager dm = DiscoveryManager.getInstance();
// Register NDEF_TAG target to discovery
try {
dm.addTargetListener(this, TargetType.NDEF_TAG);
} catch (IllegalStateException e) {
// Catch IllegalStateException
} catch (ContactlessException e) {
// Catch ContactlessException
}
// Initialize and show user interface elements
form = new Form("ReadSerial");
textField = new TextField("Unique identifier:", "", 0, TextField.UNEDITABLE);
form.append(textField);
Display.getDisplay(this).setCurrent(form);
}
protected void pauseApp() {
}
protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
}
public void targetDetected(TargetProperties[] prop) {
// Set unique identifier of the detected target on the Text Field
textField.setString(prop[0].getUid());
}
}
Its a simple tag reader app to find out uid of tag writer, but still its not working on two C7 devices....
Hi,
You can see working example from this page http://www.developer.nokia.com/Commu..._Code_Examples and compare your one to find the problem
I have tried all these example between two Nokia C7-00 devices but none of them were working... Can u suggest me any other solution?
At least Symbian C++ examples work for sure. I have done some test. But I have not used J2ME much.
Does it help you if you use Qt/QML/Symbian C++? These gives you more control over the device.
Hallo,
the C7 cannot operate as NFC tag. Therefore, your code (TargetListener) will not work for your scenario. I don't know if peer-to-peer communication is supported in the C7's Java implementation, but as mahbub suggests, you can stick to Qt, ...
br
Michael