Azure-Samples / MyDriving

Building IoT or Mobile solutions are fun and exciting. This year for Build, we wanted to show the amazing scenarios that can come together when these two are combined. So, we went and developed a sample application. MyDriving uses a wide range of Azure services to process and analyze car telemetry data for both real-time insights and long-term patterns and trends. The following features are supported in the current version of the mobile app.
http://azure.com/mydriving
MIT License
387 stars 277 forks source link

Xamarin app - store backend connection strings in .config to make more discoverable #498

Open nicolehaugen opened 8 years ago

nicolehaugen commented 8 years ago

We've gotten several questions about where the backend connection strings are stored in the Xamarin app in the scenario where the user wants to setup their own backend using the scripts we provide. We currently store these connection strings directly in the code which makes them hard to find and it also requires the app to be recompiled if they are changed. To make this entire scenario easier, we should be storing these connection strings in a .config file.

jamesmontemagno commented 8 years ago

Could they just be in a .cs file that we point to such as all the hockey app stuff?

PiDiBi commented 8 years ago

now it's in: AzureClient.cs DeviceProvisionHandler.cs Logger.cs please move it to one file i.e. config.cs - IMHO can be hardcoded, app.config functionality to change values during runtime like for win/web app is not needed ...

marcuskeenan commented 8 years ago

What needs to be configured on the MobileApp to connect to the service app? I ran the deploy script and that seems to work. However, no data is being stored to the Cloud nor does the IoT hub see my device. I entered my service app url in AzureClient.cs, the IoTHub connection string in Device ProvisionHandler.cs and the Hockey app ID in Logger. I also started the stream analytics jobs and configured the Facebook login. Anything else?