You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to CodenameOne Discussions
Hi , yesterday i found that in android when you call to getClass().getSimpleName() or getClass().getName() it doesent return for example "Container" returning as the name "i"
that is normal? thanks
If you are experiencing an issue please mention the full platform your issue applies to: IDE: NetBeans/Eclipse/IDEA Desktop OS Simulator Device
Shai Almog
unread,
Jul 10, 2016, 11:35:22 PM7/10/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to CodenameOne Discussions, romanca...@gmail.com
Hi, from the developer guide https://www.codenameone.com/manual/files-storage-networking.html "It’s a common mistake to use getClass().getName() to implement getObjectId() and it would seem to work in the simulator. This isn’t the case though!
Since devices obfuscate the class names this becomes a problem as data
is stored in a random name that changes with every release.
"
We obfuscate by default for Android, JavaScript etc. It's the "right thing to do". If you are relying on class names that is a mistake that will slow your application and will make it less secure. Unfortunately it is a mistake made by some senior developers but it is a mistake none the less...