iitc-project / ingress-intel-total-conversion

ingress.com/intel total conversion user script with some new features. Should allow easier extension of the intel map.
http://iitc.jonatkins.com/
ISC License
991 stars 552 forks source link

Change IITC Mobile 'developer' settings to be more useful #219

Closed jonatkins closed 11 years ago

jonatkins commented 11 years ago

Currently, the developer setting allows entering a URL for an external IITC script on a web server. This is tricky to enter correctly, doesn't support plugins, and requires a web server for hosting the development version.

I suggest instead that developer mode is a checkbox, and when selected, IITC is loaded from a specific folder on the 'SD card' instead of internal assets.

This is easier to use, and plugins can also be supported.

The folder used, I suggest, is <storage-path>/IITC-Mobile/dev/ (there's a good reason for the 'dev' subfolder here - details in a separate issue)

Some specific functionality that should make it reasonably user-friendly.

  1. if you try ticking the box, and the folder or main script is missing from the 'sd card', display a dialog with basic instructions (what folder to create, what files are copied there), and untick the box
  2. Every time IITC loads and the developer option is enabled, display a brief message mentioning developer mode is enabled. (in the same style that the 'version' number used to be displayed on app load). if the main script is missing from the card, turn off the developer option.
  3. [suggestion] when a new version of IITC is installed (i.e. with a different version number), reset the developer mode option to 'off''? not essential, but could possibly avoid confusion.
  4. the main script should be loaded from total-conversion-build.user.js rather than iitc.js (in both internal assets, and storage) - so it matches the file names from the build process.

users can use any method they like to get a local build into the phone storage - manual copying, foldersync app, ftp, etc. there's no need for a web server to host files.

leCradle commented 11 years ago

Sounds reasonable...I will have a look at it, when I have the time (eventually not until Thursday). @jonatkins "(there's a good reason for the 'dev' subfolder here - details in a separate issue)" <<< where?

Ah and regarding the suggestion on point 3.: It is possible...but this would be a check on every app start, that we do not really need...because 1) we get a Toast that the dev options are still enabled 2) dev options should be kind of "I know what I do"-options...so I would think that these people are capable of getting their settings clear...

leCradle commented 11 years ago

@jonatkins Allright all iitc source can be loaded from external storage, i.e. /sdcard/IITC_Mobile/dev/ If the main script is missing, a Toast is displayed including the information that the file is missing and has to been pushed to the external storage....else a Toast is displayed that the dev options are enabled. The options are not auto-disabled because it is no good style to put stuff to the sharedPrefs programmatically....but hey...users are hinted to disable them....they will be able to do this by themselves... I think we do not need a pop-up for instructions...the summary should do the trick...ack?