Resolving use of reflection in valueForString() function #769
Labels
best practice
Not a defect but something that should be improved anyway
rpc
Relating to the RPC layer
Bug Report
Currently the generic
RpcStruct
class uses a method in a bunch of classes calledvalueForString
that each return a specific type according to the object. (https://github.com/smartdevicelink/sdl_android/blob/master/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCStruct.java#L204) If an app developer obfuscates the library within their app, this causes the reflective call not to work. Additionally, Android P guidelines prohibit the use of reflection on non-SDK interfaces. (https://developer.android.com/preview/restrictions-non-sdk-interfaces) Therefore, a solution should be saught that doesn't use reflection.Reproduction Steps
build.gradle
should specifyminifyEnabled = true
.NoSuchMethodException
errors seenOS & Version Information
The text was updated successfully, but these errors were encountered: