Android Question Some questions about Classes

DonManfred

Expert
Licensed User
Longtime User
Hallo,

i want to write a wrapper for an API and i thinked over to use a Class for it to have the possibilities of properties and getters/setters... But i´m not sure whether it is possible with a class so i have some simple questions...

1. To save/restore data i want to use keyvaluestore inside this Class. Is that possible?
2. To update/retrieve data from API-Server i need to use for example erels multipartpost (uses httpclient) and i have to; get a call of a sub. Doing thing i have to do with multipartpost or even httputils2.
Can i use multipartpost (httpclient) and httputils inside a class?
3. In addition to 2. How would a typical structure (subs and so on) looks like? I need to give back the caller a result. I thought over to call a done-sub or something after i communicate with the apiserver...

Any hints or simple class-examples are appreciated ;-)
 

DonManfred

Expert
Licensed User
Longtime User
Thank you very much for your answer!
Great... Seems to be "doable" for me.

A - i hope - last question: When write Getter and Setter; i´m not limited to simple values like string, int, double and so on, right?
I also can use LISTs, MAPs or Custom Types to Get/Set a property which is a LIST, MAP or customtype?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I have done beginning with the class.
But when i look into this tooltip it suggest me that there is a return value which is a string.
But the sub don´t have an returnvalue defined!?
What i am doing wrong? I want the sub show in tooltip without the " AS String" in first line.

snap0001.png


Thanx for any hint ;-)
 
Upvote 0
Top