OfficeDev / Office-365-SDK-for-Android

Microsoft Services SDKs for Android produced by MS Open Tech.
https://dev.office.com/android
Other
224 stars 74 forks source link

Settings for E2E Test #77

Open joshgav opened 9 years ago

joshgav commented 9 years ago

It's unclear where to set URLs and Client IDs for the E2E app. @ovenado and I were only able to get OneNote tests working by manually setting these values from within the app, at least when starting completely from scratch after uninstalling. Can you reproduce? If so, which exact file should be modified to set config at compile time?

Thanks!

anihojnadel commented 9 years ago

Settings can be set up manually from the settings section within the app, or by using the general_settings.xml file. This file is used as default initialization for preferences. Only the first time you run the app, it calls PreferenceManager.setDefaultValues and uses all the settings form the xml as starting point. If you started the app and didn't change the placeholders from the xml, those will be set and then you'll need to manually update the values from within the app.

It was defined this way because we didn't want to override settings the user changed manually from the settings page but also we wanted some easy way to set the values automatically.

@joshgav If you want, I could add another setting like "AlwaysOverride" and if it's true, update the settings with the xml values each time the app is started.