uses
Androidapi.JNIBridge,
Androidapi.JNI.JavaTypes;
Solution #1
function ConvertJBytes2TBytes(data: TJavaArray; len: Integer): TBytes;
begin
SetLength(result, len);
if len > 0 then
Move(data.Data^, result[0], len);
end;
Solution #2
function ConvertJBytes2TBytes(data: TJavaArray): TBytes;
begin
SetLength(result, data.Length);
if data.Length > 0 then
Move(data.Data^, result[0], data.Length);
end;
Androidapi.JNIBridge,
Androidapi.JNI.JavaTypes;
Solution #1
function ConvertJBytes2TBytes(data: TJavaArray
begin
SetLength(result, len);
if len > 0 then
Move(data.Data^, result[0], len);
end;
Solution #2
function ConvertJBytes2TBytes(data: TJavaArray
begin
SetLength(result, data.Length);
if data.Length > 0 then
Move(data.Data^, result[0], data.Length);
end;
Comments
Post a Comment