Watch, Follow, &
Connect with Us

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


Welcome, Guest
Guest Settings
Help

Thread: CBXE7 - Java programming syntax translation to C++ in Android or iOS ?


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


Permlink Replies: 2 - Last Post: Sep 12, 2014 12:20 AM Last Post By: GAI CHEW KAI
GAI CHEW KAI

Posts: 117
Registered: 7/25/14
CBXE7 - Java programming syntax translation to C++ in Android or iOS ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 10, 2014 9:08 PM
I am having difficulties in finding translation of Java to C++ in using CBXE7 for Android mobile development.

For example:

The string API JStringToStr(), StrToJURI() ...I have to grep from folder C:\Program Files (x86)\Embarcadero\Studio\15.0\include\android\rtl
to gain further understanding but is there any online documentation on this ? because I only found this by searching online and
sport a site at: http://codeverge.com/embarcadero.cppbuilder.nontech/translate-code-from-delphi-to/1989652

Another example:

_di_JIntent oIntent;
oIntent = TJIntent::JavaClass->init( TJIntent::JavaClass->ACTION_VIEW, uri );

Is there any documentation describes TJIntent::JavaClass->ACTION_VIEW or TJIntent->JavaClass->init() ?

What I do to understand is by browsing C:\Program Files (x86)\Embarcadero\Studio\15.0\include\android\rtl *.hpp file content
and when encountered problem like: NoActivityFound, I really don't know how to set the Activity in C++ or CBXE.

I really need a proper online documentation for this for Android and iOS.

May be I did not find hard enough, but if anyone knows, please give a hint or links will be greatly appreciated.

Please advise.

Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: CBXE7 - Java programming syntax translation to C++ in Android or iOS ?[Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 11, 2014 8:51 AM   in response to: GAI CHEW KAI in response to: GAI CHEW KAI
GAI wrote:

is there any online documentation on this ?

Not for the JNI wrappers, no.

Is there any documentation describes TJIntent::JavaClass->ACTION_VIEW
or TJIntent->JavaClass->init() ?

JavaClass refers to the underlying Java/Android class type. init() refers
to class constructors. You have to refer to Android's documentation for
anything accessed using the JavaClass property, eg:

http://developer.android.com/reference/android/content/Intent.html
http://developer.android.com/reference/android/content/Intent.html#ACTION_VIEW
http://developer.android.com/reference/android/content/Intent.html#Intent()

when encountered problem like: NoActivityFound, I really don't
know how to set the Activity in C++ or CBXE.

Where are you getting a NoActivityFound error from?

The application as a whole runs inside of an Activity object that Embarcadero
implements in the RTL. It provides the entry point that Android calls into
to run the app. The Activity then calls into Embarcadero's bridge framework
to run your C++/Delphi code. You can access the Activity object in your
code by calling the SharedActivity() function.

I really need a proper online documentation for this for Android and
iOS.

Unfortunately, Embarcadero does not have much in the way of documentation
for its iOS/Android bridge frameworks. You have to rely on demos, third-party
tutorials, forums, etc.

--
Remy Lebeau (TeamB)
GAI CHEW KAI

Posts: 117
Registered: 7/25/14
Re: CBXE7 - Java programming syntax translation to C++ in Android or iOS ?[Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 12, 2014 12:20 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
- Thanks Remy, for the great help :o)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02