Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Christof Wolke
BIDL
Commits
4cd8f919
Commit
4cd8f919
authored
Aug 04, 2016
by
Christof Wolke
Browse files
Creating the NetworkService and the REST class
parent
f506d206
Changes
5
Hide whitespace changes
Inline
Side-by-side
BIDL/BIDL/.idea/misc.xml
View file @
4cd8f919
<?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"
/>
...
...
BIDL/BIDL/app/src/main/java/services/servercommunication/NetworkService.java
0 → 100644
View file @
4cd8f919
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
*/
}
BIDL/BIDL/app/src/main/java/services/servercommunication/REST.java
0 → 100644
View file @
4cd8f919
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
;
}
BIDL/BIDL/app/src/main/res/layout/activity_main.xml
View file @
4cd8f919
...
...
@@ -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"
...
...
BIDL/BIDL/app/src/main/res/layout/activity_splash.xml
View file @
4cd8f919
...
...
@@ -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"
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment