title: How to extract original JString value from Listbox in Android Kitkat Delphi XE8
body: <p>I am making a test android multidevice application with Delphi xe8. I am attaching objects to the items in a listbox as follows:</p>
  
  <pre><code> unit Unit1;
  
   interface
  
   uses
    System.SysUtils, System.Types, System.UITypes, System.Classes,  
     System.Variants,
  
    FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics,    
    Androidapi.JNI.JavaTypes, FMX.Dialogs,
   FMX.Controls.Presentation, FMX.StdCtrls, FMX.Layouts, FMX.ListBox,    
   Androidapi.Helpers;
  
   type
     TForm1 = class(TForm)
     ListBox1: TListBox;
     Button1: TButton;
     Button2: TButton;
     procedure Button1Click(Sender: TObject);
     procedure Button2Click(Sender: TObject);
     private
     { Private declarations }
     public
     { Public declarations }
     end;
  
       var
      Form1: TForm1;
  
      implementation
      {$R *.fmx}
  
      //this where I am Attaching objects to items
      procedure TForm1.Button1Click(Sender: TObject);
      var
      str:string;
      jstr1:JString;
      begin
      str:='apple';
      jstr1:=StringToJString(str);
      ListBox1.Items.AddObject('fruit', TObject(jstr1));
      end;
  
  
      //this where I am extracting the jstring objects
      procedure TForm1.Button2Click(Sender: TObject);
       var
      jstr2:JString;
      str2:string;
      begin
      jstr2:=JString(ListBox1.Items.Objects[i]);
      str2:=JStringToString(jstr2);
      showmessage('the fruit of the day is '+str2);
      end;
  
     end.
  </code></pre>
  
  <p>The above code run ok and the jstring objects are attached to the items, however, when I want extract the jstring object that has been attached to the item, I do this:</p>
  
  <pre><code> jstr2:=JString(ListBox1.Items.Objects[i]);
   //Above give me an AV: I get incompatible types TObject and JString
  
   str2:=JStringToString(jstr2);
  </code></pre>
  
  <p>The above code does not compile because of incompatible types TObject and JString. But yet if had attached a string as the object(instead of a jstring) and wanted to get back those string objects I could just do:</p>
  
  <pre><code>str2:=String(ListBox1.Items.Objects[i]);
  </code></pre>
  
  <p>This would work with regular strings. How do I solve this problem, attach and extract jstring?</p>