Added support for custom Anki Server URL (SYNC_BASE).

Hi,

This is a small PR that adds the ability for users to specify a custom SYNC_BASE url in the preferences. The default is the https://ankiweb.net/ URL.

Would anyone have a suggestion as how to replicate the functionality I added in AndroidApp.getApplicationPrefs() so it may not be necessary?

This also does not verify if the given URL ends with a slash. It is currently left to the user to format this url properly.
Yeah nice Houssam
On 01/01/2015 12:42 pm, "Houssam Salem" <notifications@github.com> wrote:

> In AnkiDroid/src/main/java/com/ichi2/libanki/sync/HttpSyncer.java
> <https://github.com/ankidroid/Anki-Android/pull/680#discussion-diff-22397930>
> :
>
> > @@ -445,9 +444,12 @@ public HttpResponse register(String user, String pw) throws UnknownHttpResponseE
> >          return null;
> >      }
> >
> > +    public String syncBase() {
> > +        return AnkiDroidApp.getApplicationPrefs().getString("syncBaseUrl", "https://ankiweb.net/");
>
> Please use the constant from Consts.java instead of hard-coding it here.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ankidroid/Anki-Android/pull/680/files#r22397930>.
>