Yes, there's bug. thanks you.
I using GetStringUTFChars
function JNI_JStringToString(Env: PJNIEnv; JStr: jstring): String;
var
IsCopy: Pjboolean;
Chars: PChar;
begin
if JStr = nil then
begin
Result := '';
Exit;
end;
Chars:= Env^.GetStringUTFChars(Env, JStr, IsCopy);
if Char
i 26 avril 2011 13:06
À : fpc-pascal@lists.freepascal.org
Objet : Re: RE : [fpc-pascal] android JNI JString to String
thanks for the response.
I am doing what you suggest. but it's still the same.
I debug this line of code using android log
Chars := Env^.GetStringChars(Env, AJString, nil);
On 26 Apr 2011, at 13:06, herux wrote:
I debug this line of code using android log
Chars := Env^.GetStringChars(Env, AJString, nil);
__android_log_write(ANDROID_LOG_DEBUG,'proj_debug',PChar(Chars));
and the log I retrieved :
04-26 17:53:17.942: DEBUG/proj_debug(711): e <--- only "e" characte
thanks for the response.
I am doing what you suggest. but it's still the same.
I debug this line of code using android log
Chars := Env^.GetStringChars(Env, AJString, nil);
__android_log_write(ANDROID_LOG_DEBUG,'proj_debug',PChar(Chars));
and the log I retrieved :
04-26 17:53:17.942: DEBUG/pr
avril 2011 10:37
À : fpc-pascal@lists.freepascal.org
Objet : [fpc-pascal] android JNI JString to String
I have a strange problem, I pass data from the android String via JNI. pass
data from FreePascal wideString successfully using the following code
NewString: function (Env: PJNIEnv; const Unico
I have a strange problem, I pass data from the android String via JNI. pass
data from FreePascal wideString successfully using the following code
NewString: function (Env: PJNIEnv; const Unicode: PJChar; Len: JSize):
JString; cdecl;
GetStringChars:function(Env:PJNIEnv;Str:JString;IsCopy:PJBoolean