1
Android 전화 및 DESFire 카드와 통신 할 수있는 Delphi에서 애플리케이션을 작성하고 싶습니다. 카드에 몇 바이트를 보내야하고 카드가 카드에 응답해야합니다. 어떻게 작성하고 카드에서 바이트를 읽을 수Delphi의 Mifare DESFire와의 통신
https://ridrix.wordpress.com/2009/09/19/mifare-desfire-communication-example/
나는 아무 생각이 : 나는 그것에 대해 기사를 읽고? 나는 다니엘 Magin에 따라 간단한 응용 프로그램을 작성 :
http://www.danielmagin.de/blog/index.php/2014/09/nfc-android-application-with-delphi-xe6-and-xe7/
이 프로그램은 카드에서 UID를 읽을 수 있습니다.
function TNfc.ReadNFCUID: string;
var
Intent: JIntent;
jIntentName: JString;
IntentName: string;
tagId: Androidapi.JNIBridge.TJavaArray<Byte>;
tagFromIntent: JParcelable;
id: string;
i: Integer;
begin
id := '';
Intent := SharedActivity.getIntent;
if Intent <> nil then
begin
jIntentName := Intent.getAction;
IntentName := JStringToString(jIntentName);
tagId := Intent.getByteArrayExtra(TJNFCAdapter.JavaClass.EXTRA_ID);
tagFromIntent := Intent.getParcelableExtra
(TJNFCAdapter.JavaClass.EXTRA_TAG);
if (tagId <> nil) and (tagFromIntent <> nil) then
begin
for i := 0 to tagId.Length - 1 do
id := id + IntToHex(tagId.Items[i], 2);
end;
end;
Result := id;
end;
당신이 쓴 코드의 중요한 부분을 추가하고 누락 된 태그 예를 추가하세요 델파이 -XE7 – bummi