Other How to convert code like this to b4a.

LucaMs

Expert
Licensed User
Longtime User
If some expert wants to be kind, when he has time ...

I have devoted little time even to Reflection. Sometimes I see that some develop wrappers for some Java libraries.

Can someone list the steps required to convert simple methods, no classes, from Java to B4A?

Like this: http://stackoverflow.com/questions/...-application-icon-programmatically-in-android

I wish something like:

a) create a new Java project in Eclipse;
b) add a new class;
c) add that method to the new class;
...

(I did not need to convert the code I linked - even if someone has this need - but I would like to understand how to proceed)

Many many thanks
 

LucaMs

Expert
Licensed User
Longtime User
Well, I knew the difference (there are also in VB.Net), but I forgot many things.

Static methods must be also in static class, or I'm wrong?

All I seem to have realized is that it is not difficult to access everything that is static, through JavaObject or Reflector.
This, however, when they are classes of Android; in the case that I have indicated, it is a method written by a user.
I suppose I should create a library (java), with that method declared static.

I realized: I have to start again to study Java, then JavaObject and Reflector.

I'm too old and with little brain ram, I could not.

Too bad.


Thanks Erel
 
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
I've got to get back into Java and then JavaObject for B4A too @LucaMs, I know exactly how you feel :(
 
Upvote 0
Top