Starchild Active Member Licensed User Longtime User Dec 28, 2015 #1 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?
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 Dec 28, 2015 #2 Try this: Code: Copy Dim ResultStr() As String = Result Upvote 0
Starchild Active Member Licensed User Longtime User Dec 28, 2015 #3 stevel05 said: Try this: Code: Copy Dim ResultStr() As String = Result Click to expand... 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
stevel05 said: Try this: Code: Copy Dim ResultStr() As String = Result Click to expand... 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.
stevel05 Expert Licensed User Longtime User Dec 28, 2015 #4 Are you reading the data correctly? See the examples on the forum, one here: https://www.b4x.com/android/forum/t...app-communication-with-intents.30608/#content Upvote 0
Are you reading the data correctly? See the examples on the forum, one here: https://www.b4x.com/android/forum/t...app-communication-with-intents.30608/#content
Starchild Active Member Licensed User Longtime User Dec 28, 2015 #5 stevel05 said: Are you reading the data correctly? See the examples on the forum, one here: https://www.b4x.com/android/forum/t...app-communication-with-intents.30608/#content Click to expand... Yes. You are right. I was not handling the intent correctly. I needed to use the GetExtra function to allow the data array to be passsed as an object. Thanks again. Upvote 0
stevel05 said: Are you reading the data correctly? See the examples on the forum, one here: https://www.b4x.com/android/forum/t...app-communication-with-intents.30608/#content Click to expand... Yes. You are right. I was not handling the intent correctly. I needed to use the GetExtra function to allow the data array to be passsed as an object. Thanks again.