strings fixed, base url server moved to Const class
This commit is contained in:
parent
7dd3e0cc00
commit
3139d41ba4
@ -28,7 +28,9 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".activity.StartupActivity"
|
android:name=".activity.StartupActivity"
|
||||||
android:launchMode="singleInstance"
|
android:launchMode="singleInstance"
|
||||||
android:theme="@style/AppTheme.NoActionBar">
|
android:theme="@style/AppTheme.NoActionBar"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:configChanges="keyboardHidden|orientation|screenSize">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
@ -37,14 +39,20 @@
|
|||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.MapActivity"
|
android:name=".activity.MapActivity"
|
||||||
android:launchMode="singleTop" />
|
android:launchMode="singleTop"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:configChanges="keyboardHidden|orientation|screenSize"/>
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.LoginActivity"
|
android:name=".activity.LoginActivity"
|
||||||
android:excludeFromRecents="true"
|
android:excludeFromRecents="true"
|
||||||
android:launchMode="singleTask"
|
android:launchMode="singleTask"
|
||||||
android:noHistory="true" />
|
android:noHistory="true"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:configChanges="keyboardHidden|orientation|screenSize"/>
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.SettingsActivity" />
|
android:name=".activity.SettingsActivity"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:configChanges="keyboardHidden|orientation|screenSize"/>
|
||||||
|
|
||||||
<service
|
<service
|
||||||
android:name=".service.BackgroundLocalizationService"
|
android:name=".service.BackgroundLocalizationService"
|
||||||
@ -54,7 +62,9 @@
|
|||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.TutorTab"
|
android:name=".activity.TutorTab"
|
||||||
android:theme="@style/AppTheme"/>
|
android:theme="@style/AppTheme"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:configChanges="keyboardHidden|orientation|screenSize"/>
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
@ -5,6 +5,8 @@ import android.content.Context;
|
|||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
|
|
||||||
|
import com.uam.wmi.findmytutor.utils.Const;
|
||||||
|
|
||||||
import static org.acra.ReportField.*;
|
import static org.acra.ReportField.*;
|
||||||
import org.acra.ACRA;
|
import org.acra.ACRA;
|
||||||
import org.acra.annotation.AcraLimiter;
|
import org.acra.annotation.AcraLimiter;
|
||||||
@ -50,7 +52,7 @@ public class FindMyTutor extends Application {
|
|||||||
builder.getPluginConfigurationBuilder(
|
builder.getPluginConfigurationBuilder(
|
||||||
HttpSenderConfigurationBuilder.class
|
HttpSenderConfigurationBuilder.class
|
||||||
// ).setUri("http://192.168.0.15:3000/api/acra")
|
// ).setUri("http://192.168.0.15:3000/api/acra")
|
||||||
).setUri("https://s416084.projektstudencki.pl/develop/api/Feedback/autoFeedback")
|
).setUri(Const.BASE_URL +"api/Feedback/autoFeedback")
|
||||||
.setHttpMethod(HttpSender.Method.POST)
|
.setHttpMethod(HttpSender.Method.POST)
|
||||||
.setHttpHeaders(header)
|
.setHttpHeaders(header)
|
||||||
.setEnabled(true);
|
.setEnabled(true);
|
||||||
|
@ -4,6 +4,7 @@ import android.content.Context;
|
|||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import com.jakewharton.retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
|
import com.jakewharton.retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
|
||||||
|
import com.uam.wmi.findmytutor.utils.Const;
|
||||||
import com.uam.wmi.findmytutor.utils.PrefUtils;
|
import com.uam.wmi.findmytutor.utils.PrefUtils;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -26,7 +27,7 @@ public class ApiClient {
|
|||||||
private static Retrofit retrofit = null;
|
private static Retrofit retrofit = null;
|
||||||
private static int REQUEST_TIMEOUT = 60;
|
private static int REQUEST_TIMEOUT = 60;
|
||||||
private static OkHttpClient okHttpClient;
|
private static OkHttpClient okHttpClient;
|
||||||
private static final String BASE_URL = "https://s416084.projektstudencki.pl/master/";
|
// private static final String BASE_URL = "https://s416084.projektstudencki.pl/master/";
|
||||||
|
|
||||||
public static Retrofit getClient(Context context) {
|
public static Retrofit getClient(Context context) {
|
||||||
|
|
||||||
@ -35,7 +36,7 @@ public class ApiClient {
|
|||||||
|
|
||||||
if (retrofit == null) {
|
if (retrofit == null) {
|
||||||
retrofit = new Retrofit.Builder()
|
retrofit = new Retrofit.Builder()
|
||||||
.baseUrl(BASE_URL)
|
.baseUrl(Const.BASE_URL)
|
||||||
.client(okHttpClient)
|
.client(okHttpClient)
|
||||||
.addConverterFactory(GsonConverterFactory.create())
|
.addConverterFactory(GsonConverterFactory.create())
|
||||||
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
|
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
|
||||||
|
@ -6,6 +6,7 @@ import java.util.Arrays;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class Const {
|
public class Const {
|
||||||
|
public final static String BASE_URL = "https://s416084.projektstudencki.pl/master/";
|
||||||
public final static Integer onlineBackgroundLocationInterval = 15000;
|
public final static Integer onlineBackgroundLocationInterval = 15000;
|
||||||
public final static Integer offlineBackgroundLocationInterval = 36000;
|
public final static Integer offlineBackgroundLocationInterval = 36000;
|
||||||
public final static Integer defaultMapZoom = 17;
|
public final static Integer defaultMapZoom = 17;
|
||||||
|
@ -16,11 +16,11 @@
|
|||||||
android:title="@string/title_language" />
|
android:title="@string/title_language" />
|
||||||
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:key="acra.disable"
|
android:key="acra.enable"
|
||||||
android:title="@string/pref_disable_acra"
|
android:title="@string/pref_title_acra"
|
||||||
android:summaryOn="@string/pref_acra_disabled"
|
android:summaryOn="@string/pref_acra_disabled"
|
||||||
android:summaryOff="@string/pref_acra_enabled"
|
android:summaryOff="@string/pref_acra_enabled"
|
||||||
android:defaultValue="false"/>
|
android:defaultValue="true"/>
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
@ -246,7 +246,7 @@
|
|||||||
<!--ACRA ON/OFF switch-->
|
<!--ACRA ON/OFF switch-->
|
||||||
<string name="pref_acra_disabled" translatable="false">Allow to send raport to developers is ON</string>
|
<string name="pref_acra_disabled" translatable="false">Allow to send raport to developers is ON</string>
|
||||||
<string name="pref_acra_enabled" translatable="false">Allow to send raport to developers is OFF</string>
|
<string name="pref_acra_enabled" translatable="false">Allow to send raport to developers is OFF</string>
|
||||||
<string name="pref_disable_acra" translatable="false">App issues reporting</string>
|
<string name="pref_title_acra" translatable="false">App issues reporting</string>
|
||||||
<string name="acra_toast_text" translatable="false">Sorry, the application crashed. A report will be sent to the developers</string>
|
<string name="acra_toast_text" translatable="false">Sorry, the application crashed. A report will be sent to the developers</string>
|
||||||
|
|
||||||
<!--(ENG) Map Activity info helper-->
|
<!--(ENG) Map Activity info helper-->
|
||||||
|
Loading…
Reference in New Issue
Block a user