Flow:
Card Trigger -> Host Application -> Applet -> Host Application -> Backend Application
This trigger will only contain a text box with an ID and a button that simulates the card inserted.
then onCardInserted will be triggered, it will create an applet and returns an id to the host application,
After that it will notify the backend system.
I can't afford a third party shell program to do that.
So in order to write such a trigger, do I just put a byte stream to port 9025 of the localhost?
Am I on the right track?
But
private void BuildSocket()
{
Socket client = new Socket();
InetSocketAddress isa = new InetSocketAddress("127.0.0.1", 9025);
try {
client.connect(isa, 10000);
BufferedOutputStream out = new BufferedOutputStream(client
.getOutputStream());
// 送出字串
//out.write("Send From Client ".getBytes());
out.write(textField.getText().getBytes());
out.flush();
out.close();
out = null;
client.close();
client = null;
} catch (java.io.IOException e) {
System.out.println("Can't establish Socket !");
System.out.println("IOException :" + e.toString());
}
}
Opened the 9025 port by firewall already. Still can't connect to my host application after starting both applications? Why.
Do Open card framework's applications by default sits on port 9025?
Thanks
Jack
Edited by: 933351 on 2013/3/7 下午 6:55
Edited by: 933351 on 2013/3/7 下午 6:55
Edited by: 933351 on 2013/3/7 下午 9:45
Edited by: 933351 on 2013/3/7 下午 10:03
Edited by: 933351 on 2013/3/7 下午 10:16