somkiattha / opendatakit

Automatically exported from code.google.com/p/opendatakit
0 stars 0 forks source link

DUplicate Provider authority in Nepalese localisation of ODK Collect #799

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Install ODK Collect
2.Attempt to install our Nepalese version (or vice versa)
3.Will not install due to duplicate provider authority

What version of the product are you using? On what operating system?

ODK Collect 1.2.2 on Android 2.3.6

Please provide any additional information below.

We have developed our own application based on ODK Collect, for the following 
reason:
- We need the prompts to display Nepali and Maithili text
- There are no Android phones for which these two are available languages, so 
we have got the ODK Collect source code, added two new folders in res 
(values-en-rGB and values-en-rUS) which contain the strings in the languages we 
need
- We also have changed the default server URL, as our data collectors are 
expected to be able to read Nepali and press appropriate buttons, but not 
necessarily to be able to type in roman script. We will be deploying this on 
over 500 phones, so it is not practical to manually change the default URL on 
every one.

When we install this on an Android phone which already has ODK Collect on then 
we get the provider authority error. We are quite new to Android development, 
and not sure how to fix this - of course we could just ignore it and remove ODK 
collect, but for testing we would like to remove this simple error.

Thanks.

Original issue reported on code.google.com by mbd.r...@gmail.com on 4 Apr 2013 at 11:56

GoogleCodeExporter commented 9 years ago
We will happily add your resource files to the main code base, so you will not 
have to maintain your own copy of ODK Collect unless you are doing other 
customizations.

The new functionality in ODK Collect 1.3 to save and restore configuration 
settings to/from a file will likely address the issue with setting up your 
phones with the proper URLs (or you can continue to maintain your own code tree 
with that customization).

There is no solution for the conflict when trying to run two versions of ODK 
Collect on the same device.  Providers must be unique. The solution would be to 
change the package name for your copy of ODK Collect.  I believe most groups do 
not do that, but instead have a reference copy of ODK Collect running on one 
device, and their customized versions running on a different device.

Original comment by mitchellsundt@gmail.com on 17 Apr 2013 at 6:07

GoogleCodeExporter commented 9 years ago
It's possible to modify the ODK ContentProviders to be Authority agnostic. In 
this scheme an implementing application would supply an Authority to ODK's 
ContentProviders. 

See some relevant discussion on StackOverflow: 
http://stackoverflow.com/questions/10790919/android-having-provider-authority-in
-the-app-project/10791144#10791144

Original comment by davidpbr...@gmail.com on 18 Sep 2014 at 6:22