Android Question Obfuscation with b4xPages?

Status
Not open for further replies.

ArminKh1993

Active Member
Hi guys
I have some sensitive data that is in the starter service and is obfuscated there.
Now I switched to b4xPages and since the starter service should not be used here due to the app cross-platform, so where should I put this data to obfuscate this data?
will my keys obfuscated if i put it in B4XMainPage?
 

MarcoRome

Expert
Licensed User
Longtime User
You have Process_Globals in Main.
Anything treated as a string will be obfuscated.
Although, in your place "sensitive" data such as pw or other I would not enter them
 
Upvote 0

ArminKh1993

Active Member
You have Process_Globals in Main.
Anything treated as a string will be obfuscated.
Although, in your place "sensitive" data such as pw or other I would not enter them
True, but I do not think the main activity is a good alternative to the starter service for this purpose
By sensitive information I mean a simple layer of security added by obfuscation, otherwise there are definitely better options for sensitive data.
 
Upvote 0

MarcoRome

Expert
Licensed User
Longtime User
Thanks
Will starter service also works in b4i & b4j too?:rolleyes:
 
Upvote 0

ArminKh1993

Active Member
I would have used a (static) code module for this.

Note that the starter service can be used in B4XPages. It is however not cross platform.
If you can, think about it yourself please
It is better not to see the solution of some things and to do it cleverly and by the ide itself
It's no problem for me to define a class and pass it as an object to b4xPages.GlobalContext, but at least change the GlobalContext type or put a separate module that does not need to define a separate class.
Imagine doing this in any class that needs a global variable:
B4X:
Dim myClass As globalDataClass = B4XPages.GlobalContext
Label.TypeFace = myClass.myTypeface_regular
I don't think it would be very interesting to come up with this wherever you need it, or at least in whatever class you needed to define a variable from that class.
I think it would be better this way:
B4X:
Label.TypeFace = B4XPages.GlobalContext.myTypeface_regular
Because we can easily replace "Starter." with "B4XPages.GlobalContext." by ide Quick Search and there will be no need for additional work.
I apologize for my poor English, I hope I was able to convey my meaning to you.
 
Upvote 0

ArminKh1993

Active Member
1. You don't need GlobalContext here.
2. You shouldn't see Typeface in your code. Use B4XFont instead.
1. It's just an example
2. I know, It's just an example, I have fonts, images, strings, etc
my goal is direct access to all of my global and consistent resources from a cross-platform entry point like GlobalContext not just my typefaces

Add a code module named Constants.
B4X:
Label.Font = Constants.RegularFont
Yes, I used to do this before
But if I remember correctly, when you introduced starter service, you said that you should put the resources you need in order to stay alive and not be destroyed in the starter.
You said Consistent & Single Entry Point , So if I understand correctly, the code module can not do this same as the starter service.
 
Upvote 0

ArminKh1993

Active Member
I don't see any point in repeating my same answer for the third time.

Starter Vs GlobalContext:
B4X:
Dim Var as Object = Starter.Var1

Dim myClass As globalDataClass = B4XPages.GlobalContext
Dim Var as Object = myClass.Var1

Starter:
1-Has static access from all classess and modules and services
2-Data will Obfuscated if placed in Process_Globals of Starter

GlobalContext:
1-Non static access
2-No Obfuscation anyway

If GlobalContext is an alternative to the starter, please fix the two issues or differences I mentioned if possible.
If not, please introduce an alternative other than the code module. Because the code module is not applicable for Obfuscation.
If you still believe that my questions do not make sense, thank you anyway.
 
Upvote 0
Status
Not open for further replies.
Top