Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: parse an Uri Androidapi::JNI::Net


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Jul 11, 2016 2:24 PM Last Post By: Victor Zepeda
Victor Zepeda

Posts: 20
Registered: 3/22/16
parse an Uri Androidapi::JNI::Net  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 11, 2016 12:06 PM
Hello to everyone!!!

I want to launch google maps with some coords that i have on my app.

Acording google┬┤s documentation i have to add to my intent an uri.

// Create a Uri from an intent string. Use the result to create an Intent.
Uri gmmIntentUri = Uri.parse("google.streetview:cbll=46.414382,10.013988");

however i cant find the parse method in Androidapi::Jni::Java::Net::_di_JURI

how can i achieve this?

thank you!
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: parse an Uri Androidapi::JNI::Net  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 11, 2016 12:59 PM   in response to: Victor Zepeda in response to: Victor Zepeda
Victor wrote:

however i cant find the parse method in
Androidapi::Jni::Java::Net::_di_JURI

That is because you are looking for it in the wrong place. Use this instead:

#include <Androidapi.JNI.Net.hpp>
 
_di_Jnet_Uri gmmIntentUri = TJnet_Uri::JavaClass->parse(StringToJString(L"google.streetview:cbll=46.414382,10.013988"));


Alternatively, use Embarcadero's StrToJURI() wrapper function instead:

#include <Androidapi.Helpers.hpp>
 
_di_Jnet_Uri gmmIntentUri = StrToJURI(L"google.streetview:cbll=46.414382,10.013988");


Or:

#include <Androidapi.Helpers.hpp>
 
_di_Jnet_Uri gmmIntentUri = TAndroidHelper::StrToJURI(L"google.streetview:cbll=46.414382,10.013988");

--
Remy Lebeau (TeamB)

Victor Zepeda

Posts: 20
Registered: 3/22/16
Re: parse an Uri Androidapi::JNI::Net  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 11, 2016 2:24 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
thank you very much Remy!

i have already solved this problem, but thank you very much.

i used this line

Androidapi::Jni::Graphicscontentviewtext::_di_JIntent intent = TJIntent::JavaClass->init(TJIntent::JavaClass->ACTION_VIEW,Androidapi::Helpers::StrToJURI(cadena));
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02