-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android Common API extensions - PropertyBag Properties not initialized #600
Comments
FYI, There is evidence that an API was generated at some point from the XML, but then the generated files were not used, and, in fact, don't even exist in Rhodes.
And there are commented-out calls to Apparently, the generated code (which I am guessing is broken) was bypassed and the property-related code written directly in Presumably, the author of All well and good that they did what was needed to make the API work. But the code generator should be fixed, and/or the documentation updated to reflect that this part of the common API code generator is nonfunctional for Android. |
I updated the title. Properties do work -partially. But they are not initialized in the generated code. If you define properties in the XML and set default values, the values are NOT set to the defaults (on Android) and the property keys are not added to the map. I tested by defaulting a property value in the XML, printing all properties, setting a property, then printing properties again. Works for iOS. Defaults do not work for Android. class_name = self.class.name
Rho::Log.info "Rho::BonjourBrowser.calcSumm(2,4) = #{Rho::BonjourBrowser.calcSumm(2,4)}", class_name
Rho::Log.info "Rho::BonjourBrowser.search = #{Rho::BonjourBrowser.search}", class_name
Rho::Log.info "BonjourBrowser properties: #{Rho::BonjourBrowser.getAllProperties.inspect}", class_name
Rho::BonjourBrowser.setProperty('xyzzy', 'abcde')
Rho::Log.info "BonjourBrowser properties: #{Rho::BonjourBrowser.getAllProperties.inspect}", class_name
Rho::Log.info "AudioCapture properties: #{Rho::AudioCapture.getAllProperties.inspect}", class_name iOS
Android
I/APP (14995): I 04/29/2015 23:33:09:451 00003abb AppApplication| AudioCapture properties: {"fileName"=>"", "source"=>"mic", "maxDuration"=>"20000", "encoder"=>"AAC"} |
Rhodes 5.0.30.
I created a simple common-API extension, using the default implementation created by command-line. I added an additional method, and one Property, which has a default value. I also changed the default instance ID from "SCN1" to "default".
Android implement does not enumerate my property, but does enumerate the ID property. iOS works correctly.
I've tried various ways of setting/getting properties. None of them see to work for Android.
AppApplication initialize:
iOS:
Android:
As well, note the inconsistency in capitalization of the ID key between iOS and android.
The text was updated successfully, but these errors were encountered: