Commit 4cd8f919 authored by Christof Wolke's avatar Christof Wolke

Creating the NetworkService and the REST class

parent f506d206
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
......
package services.servercommunication;
import com.squareup.okhttp.OkHttpClient;
/**
* Helfer Klasse, die häufig verwendete I/O Operationen im Netzwerk und der Datenbank erleichtert
* Created by Christof on 04.08.2016.
*/
public abstract class NetworkService {
/**
* TAG Konstante fürs Logging
*/
private static final String TAG = NetworkService.class.getSimpleName();
private static OkHttpClient okHttpClient = new OkHttpClient();
/**
* Meldet einen Nutzer an
*
* @param email E-Mail des Nutzers
* @param password Passwort des Nutzers
* @param handler Callback handler
*/
}
package services.servercommunication;
/**
* REST API URLs
* Created by Christof on 04.08.2016.
*/
public abstract class REST {
/**
* The following URLs refer to the Spring REST API
* <p/>
* First section defines development URL and paths
* Second section defines production URL and paths
*/
public static final String LOCAL_PORT = "8080";
public static final String LOCAL_CONTAINER = "/Rest";
public static final String LOCAL_URL = "http://192.168.1.2:" + LOCAL_PORT + LOCAL_CONTAINER;
// TODO: 04.08.2016 production URL and paths
// TODO: 04.08.2016 Get FullUrl depending on selected Build Variant
public static String FULL_URL = LOCAL_URL;
// Login path
private static final String LOGIN = "/login";
public static String SPRING_LOGIN = FULL_URL + LOGIN;
}
......@@ -5,7 +5,7 @@
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="de.uni_oldenburg.bidl.base_view.MainActivity">
tools:context="de.uni_oldenburg.bidl.bidl.app.base_view.MainActivity">
<TextView
android:id="@+id/BeaconID"
......
......@@ -5,7 +5,7 @@
android:id="@+id/activity_splash"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="de.uni_oldenburg.bidl.base_view.SplashActivity"
tools:context="de.uni_oldenburg.bidl.bidl.app.base_view.SplashActivity"
android:orientation="vertical"
android:background="@color/white">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment