Android Question How to cast returned string "Ljava.lang.String;@e7dfb9f8" as string array?

Starchild

Active Member
Licensed User
Longtime User
I am getting Ljava.lang.String;@e7dfb9f8 as a string value retuned to my activity via intent.
I understand this is a referance to an array.

How do I cast this so I can read the string values contained within the array?
 

stevel05

Expert
Licensed User
Longtime User
Try this:
B4X:
Dim ResultStr() As String = Result
 
Upvote 0

Starchild

Active Member
Licensed User
Longtime User
Try this:
B4X:
Dim ResultStr() As String = Result

No. It won't compile. It says it can't cast type.
I wouldn't think it would work.
Result is a string containing the text "Ljava.lang.String;@e7dfb9f8"
You can't cast this as an array using DIM. They are different types.
I want the array it referances.
The array contains the data I need.

How do I cast this ljava.lang.string;@e7dfb9f8 referance?
Any other ideas please.
 
Upvote 0

Starchild

Active Member
Licensed User
Longtime User
Upvote 0
Top