├── app ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── drawable-hdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── values │ │ │ ├── styles.xml │ │ │ ├── dimens.xml │ │ │ └── strings.xml │ │ ├── menu │ │ │ └── main.xml │ │ ├── values-w820dp │ │ │ └── dimens.xml │ │ └── layout │ │ │ ├── fragment_location.xml │ │ │ ├── activity_main.xml │ │ │ └── fragment_intro.xml │ │ ├── java │ │ └── com │ │ │ └── spengilley │ │ │ └── androidmvpservice │ │ │ ├── data │ │ │ ├── events │ │ │ │ ├── NoConnectionEvent.java │ │ │ │ ├── NoPlayServicesEvent.java │ │ │ │ └── LocationUpdateEvent.java │ │ │ ├── services │ │ │ │ ├── ServicesModule.java │ │ │ │ ├── common │ │ │ │ │ └── BaseService.java │ │ │ │ └── LocationService.java │ │ │ └── DataModule.java │ │ │ ├── ui │ │ │ ├── main │ │ │ │ ├── FragmentCallback.java │ │ │ │ ├── views │ │ │ │ │ ├── LocationView.java │ │ │ │ │ └── MainView.java │ │ │ │ ├── presenters │ │ │ │ │ ├── LocationPresenter.java │ │ │ │ │ ├── MainPresenter.java │ │ │ │ │ ├── LocationPresenterImpl.java │ │ │ │ │ └── MainPresenterImpl.java │ │ │ │ ├── MainModule.java │ │ │ │ ├── LocationFragment.java │ │ │ │ ├── IntroFragment.java │ │ │ │ └── MainActivity.java │ │ │ └── common │ │ │ │ ├── BasePresenter.java │ │ │ │ ├── BaseFragmentPresenter.java │ │ │ │ ├── BaseFragment.java │ │ │ │ └── BaseActivity.java │ │ │ ├── interactors │ │ │ ├── LocationInteractor.java │ │ │ ├── InteractorsModule.java │ │ │ └── LocationInteractorImpl.java │ │ │ ├── BusProvider.java │ │ │ ├── Modules.java │ │ │ ├── AppModule.java │ │ │ └── App.java │ │ └── AndroidManifest.xml ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── core ├── src │ └── main │ │ └── java │ │ └── com │ │ └── spengilley │ │ └── androidmvpservice │ │ └── core │ │ ├── resources │ │ ├── LayoutResource.java │ │ ├── ResourceWrapper.java │ │ ├── LocationWrapper.java │ │ ├── ResourcesModule.java │ │ ├── annotations │ │ │ ├── FinishString.java │ │ │ ├── SubmitString.java │ │ │ ├── WelcomeTermsString.java │ │ │ ├── WelcomeHeadingString.java │ │ │ ├── WelcomeFeaturesString.java │ │ │ ├── SubmitSurgeryTitleString.java │ │ │ ├── SubmitValidationMessageString.java │ │ │ └── SubmitSurgeryPrivacyPolicyString.java │ │ └── StringResource.java │ │ └── preferences │ │ ├── PreferencesModule.java │ │ ├── PreferencesWrapper.java │ │ ├── IntPreference.java │ │ ├── LongPreference.java │ │ ├── FloatPreference.java │ │ ├── StringPreference.java │ │ └── BooleanPreference.java └── build.gradle ├── .gitignore ├── gradle.properties ├── gradlew.bat └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':core' 2 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spengilley/AndroidMVPService/HEAD/app/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spengilley/AndroidMVPService/HEAD/app/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spengilley/AndroidMVPService/HEAD/app/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spengilley/AndroidMVPService/HEAD/app/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/java/com/spengilley/androidmvpservice/data/events/NoConnectionEvent.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.data.events; 2 | 3 | 4 | public class NoConnectionEvent { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /core/src/main/java/com/spengilley/androidmvpservice/core/resources/LayoutResource.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.core.resources; 2 | 3 | 4 | public class LayoutResource { 5 | 6 | 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/spengilley/androidmvpservice/ui/main/FragmentCallback.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.ui.main; 2 | 3 | 4 | public interface FragmentCallback { 5 | 6 | public void loadLocationFragment(); 7 | 8 | } 9 | -------------------------------------------------------------------------------- /core/src/main/java/com/spengilley/androidmvpservice/core/resources/ResourceWrapper.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.core.resources; 2 | 3 | 4 | public interface ResourceWrapper { 5 | 6 | public String getString(String key); 7 | 8 | } 9 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/java/com/spengilley/androidmvpservice/ui/main/views/LocationView.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.ui.main.views; 2 | 3 | 4 | public interface LocationView { 5 | 6 | public void updateLocation(double latitude, double longitude); 7 | 8 | } 9 | -------------------------------------------------------------------------------- /core/src/main/java/com/spengilley/androidmvpservice/core/resources/LocationWrapper.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.core.resources; 2 | 3 | 4 | public interface LocationWrapper { 5 | 6 | public void start(); 7 | public void finish(); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/spengilley/androidmvpservice/interactors/LocationInteractor.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.interactors; 2 | 3 | public interface LocationInteractor { 4 | public void startLocationUpdates(); 5 | 6 | public void stopLocationUpdates(); 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 16dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/java/com/spengilley/androidmvpservice/data/events/NoPlayServicesEvent.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.data.events; 2 | 3 | 4 | public class NoPlayServicesEvent { 5 | public int resultCode; 6 | 7 | public NoPlayServicesEvent(int resultCode) { 8 | this.resultCode = resultCode; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/spengilley/androidmvpservice/BusProvider.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice; 2 | 3 | 4 | import com.squareup.otto.Bus; 5 | 6 | public class BusProvider { 7 | private static Bus bus = new Bus(); 8 | 9 | 10 | public static Bus getDefault() { 11 | return bus; 12 | } 13 | 14 | 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/com/spengilley/androidmvpservice/ui/common/BasePresenter.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.ui.common; 2 | 3 | /** 4 | * Base Fragment Presenter interface which should be used when 5 | * An init method is required to inject view into presenter 6 | */ 7 | public interface BasePresenter { 8 | void init(T view); 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/spengilley/androidmvpservice/ui/main/views/MainView.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.ui.main.views; 2 | 3 | 4 | import com.spengilley.androidmvpservice.data.events.NoPlayServicesEvent; 5 | 6 | public interface MainView { 7 | 8 | public void handlePlayServicesConnectionErrorEvent(NoPlayServicesEvent event); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/spengilley/androidmvpservice/ui/common/BaseFragmentPresenter.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.ui.common; 2 | 3 | /** 4 | * Base Fragment Presenter interface which should be used when 5 | * An init method is required to inject view into presenter 6 | */ 7 | public interface BaseFragmentPresenter { 8 | void init(T view); 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/java/com/spengilley/androidmvpservice/Modules.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice; 2 | 3 | 4 | class Modules { 5 | 6 | private Modules() { 7 | // No instances 8 | } 9 | 10 | 11 | static Object[] list(App ngswApp) { 12 | return new Object[]{ 13 | new AppModule(ngswApp), 14 | }; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/spengilley/androidmvpservice/data/services/ServicesModule.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.data.services; 2 | 3 | import dagger.Module; 4 | 5 | @Module( 6 | injects = { 7 | LocationService.class 8 | }, 9 | library = true, 10 | complete = false 11 | ) 12 | public class ServicesModule { 13 | 14 | 15 | 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/spengilley/androidmvpservice/data/events/LocationUpdateEvent.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.data.events; 2 | 3 | 4 | public class LocationUpdateEvent { 5 | public double latitude, longitude; 6 | 7 | public LocationUpdateEvent(double latitude, double longitude) { 8 | this.latitude = latitude; 9 | this.longitude = longitude; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /core/src/main/java/com/spengilley/androidmvpservice/core/resources/ResourcesModule.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.core.resources; 2 | 3 | 4 | import dagger.Module; 5 | 6 | @Module( 7 | complete = false, 8 | library = true 9 | ) 10 | public class ResourcesModule { 11 | 12 | /** 13 | * Provide access to resources requiring Resource object 14 | */ 15 | 16 | } 17 | -------------------------------------------------------------------------------- /core/src/main/java/com/spengilley/androidmvpservice/core/resources/annotations/FinishString.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.core.resources.annotations; 2 | 3 | import java.lang.annotation.Retention; 4 | 5 | import javax.inject.Qualifier; 6 | 7 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 8 | 9 | @Qualifier 10 | @Retention(RUNTIME) 11 | public @interface FinishString { 12 | } 13 | -------------------------------------------------------------------------------- /core/src/main/java/com/spengilley/androidmvpservice/core/resources/annotations/SubmitString.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.core.resources.annotations; 2 | 3 | import java.lang.annotation.Retention; 4 | 5 | import javax.inject.Qualifier; 6 | 7 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 8 | 9 | @Qualifier 10 | @Retention(RUNTIME) 11 | public @interface SubmitString { 12 | } 13 | -------------------------------------------------------------------------------- /core/src/main/java/com/spengilley/androidmvpservice/core/preferences/PreferencesModule.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.core.preferences; 2 | 3 | 4 | import dagger.Module; 5 | 6 | @Module( 7 | complete = false, 8 | library = true 9 | ) 10 | public class PreferencesModule { 11 | 12 | /** 13 | * Put here provide methods to direct Preference items 14 | */ 15 | 16 | 17 | } 18 | -------------------------------------------------------------------------------- /core/src/main/java/com/spengilley/androidmvpservice/core/resources/annotations/WelcomeTermsString.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.core.resources.annotations; 2 | 3 | import java.lang.annotation.Retention; 4 | 5 | import javax.inject.Qualifier; 6 | 7 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 8 | 9 | @Qualifier 10 | @Retention(RUNTIME) 11 | public @interface WelcomeTermsString { 12 | } 13 | -------------------------------------------------------------------------------- /core/src/main/java/com/spengilley/androidmvpservice/core/resources/annotations/WelcomeHeadingString.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.core.resources.annotations; 2 | 3 | import java.lang.annotation.Retention; 4 | 5 | import javax.inject.Qualifier; 6 | 7 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 8 | 9 | @Qualifier 10 | @Retention(RUNTIME) 11 | public @interface WelcomeHeadingString { 12 | } 13 | -------------------------------------------------------------------------------- /core/src/main/java/com/spengilley/androidmvpservice/core/resources/annotations/WelcomeFeaturesString.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.core.resources.annotations; 2 | 3 | import java.lang.annotation.Retention; 4 | 5 | import javax.inject.Qualifier; 6 | 7 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 8 | 9 | @Qualifier 10 | @Retention(RUNTIME) 11 | public @interface WelcomeFeaturesString { 12 | } 13 | -------------------------------------------------------------------------------- /core/src/main/java/com/spengilley/androidmvpservice/core/resources/annotations/SubmitSurgeryTitleString.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.core.resources.annotations; 2 | 3 | import java.lang.annotation.Retention; 4 | 5 | import javax.inject.Qualifier; 6 | 7 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 8 | 9 | @Qualifier 10 | @Retention(RUNTIME) 11 | public @interface SubmitSurgeryTitleString { 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/com/spengilley/androidmvpservice/ui/main/presenters/LocationPresenter.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.ui.main.presenters; 2 | 3 | 4 | import com.spengilley.androidmvpservice.ui.common.BaseFragmentPresenter; 5 | import com.spengilley.androidmvpservice.ui.main.views.LocationView; 6 | 7 | public interface LocationPresenter extends BaseFragmentPresenter{ 8 | 9 | public void onStop(); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /core/src/main/java/com/spengilley/androidmvpservice/core/resources/annotations/SubmitValidationMessageString.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.core.resources.annotations; 2 | 3 | import java.lang.annotation.Retention; 4 | 5 | import javax.inject.Qualifier; 6 | 7 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 8 | 9 | @Qualifier 10 | @Retention(RUNTIME) 11 | public @interface SubmitValidationMessageString { 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/com/spengilley/androidmvpservice/data/DataModule.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.data; 2 | 3 | 4 | import com.spengilley.androidmvpservice.data.services.ServicesModule; 5 | 6 | import dagger.Module; 7 | 8 | @Module( 9 | includes = { 10 | ServicesModule.class 11 | }, 12 | complete = false, 13 | library = true 14 | ) 15 | public class DataModule { 16 | 17 | 18 | } 19 | -------------------------------------------------------------------------------- /core/src/main/java/com/spengilley/androidmvpservice/core/resources/annotations/SubmitSurgeryPrivacyPolicyString.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.core.resources.annotations; 2 | 3 | import java.lang.annotation.Retention; 4 | 5 | import javax.inject.Qualifier; 6 | 7 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 8 | 9 | @Qualifier 10 | @Retention(RUNTIME) 11 | public @interface SubmitSurgeryPrivacyPolicyString { 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/com/spengilley/androidmvpservice/ui/common/BaseFragment.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.ui.common; 2 | 3 | import android.app.Fragment; 4 | import android.os.Bundle; 5 | 6 | 7 | public class BaseFragment extends Fragment { 8 | 9 | 10 | @Override 11 | public void onActivityCreated(Bundle savedInstanceState) { 12 | super.onActivityCreated(savedInstanceState); 13 | 14 | ((BaseActivity) getActivity()).inject(this); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_location.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 13 | -------------------------------------------------------------------------------- /core/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java' 2 | 3 | repositories { 4 | mavenCentral() 5 | } 6 | 7 | configurations { providedCompile } 8 | 9 | dependencies { 10 | testCompile group: 'junit', name: 'junit', version: '4.+' 11 | compile parent.ext.libraries.dagger 12 | providedCompile parent.ext.libraries.dagger_compiler 13 | } 14 | 15 | 16 | 17 | sourceSets.main.compileClasspath += configurations.providedCompile 18 | sourceSets.test.compileClasspath += configurations.providedCompile 19 | sourceSets.test.runtimeClasspath += configurations.providedCompile -------------------------------------------------------------------------------- /core/src/main/java/com/spengilley/androidmvpservice/core/resources/StringResource.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.core.resources; 2 | 3 | 4 | public class StringResource { 5 | ResourceWrapper resourceWrapper; 6 | String resourceName; 7 | 8 | public StringResource(ResourceWrapper resourceWrapper, String resourceName) { 9 | this.resourceWrapper = resourceWrapper; 10 | this.resourceName = resourceName; 11 | } 12 | 13 | 14 | public String get() { 15 | return resourceWrapper.getString(resourceName); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # built application files 2 | /build 3 | *.apk 4 | *.ap_ 5 | *.navigation 6 | 7 | # files for the dex VM 8 | *.dex 9 | 10 | # Java class files 11 | *.class 12 | 13 | # generated files 14 | bin/ 15 | gen/ 16 | 17 | # Local configuration file (sdk path, etc) 18 | local.properties 19 | signing.properties 20 | 21 | # Eclipse project files 22 | .classpath 23 | .project 24 | 25 | # Proguard folder generated by Eclipse 26 | proguard/ 27 | 28 | # Intellij project files 29 | *.iml 30 | *.ipr 31 | *.iws 32 | .idea/ 33 | 34 | #gradle 35 | .gradle/ 36 | 37 | #mac 38 | .DS_Store -------------------------------------------------------------------------------- /app/src/main/java/com/spengilley/androidmvpservice/interactors/InteractorsModule.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.interactors; 2 | 3 | import android.app.Application; 4 | 5 | import javax.inject.Singleton; 6 | 7 | import dagger.Module; 8 | import dagger.Provides; 9 | 10 | @Module( 11 | library = true, 12 | complete = false 13 | ) 14 | public class InteractorsModule { 15 | 16 | @Provides 17 | @Singleton 18 | public LocationInteractor provideLocationInteractor(Application app) { 19 | return new LocationInteractorImpl(app.getApplicationContext()); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/spengilley/androidmvpservice/ui/main/presenters/MainPresenter.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.ui.main.presenters; 2 | 3 | 4 | import com.spengilley.androidmvpservice.ui.common.BasePresenter; 5 | import com.spengilley.androidmvpservice.ui.main.views.MainView; 6 | 7 | public interface MainPresenter extends BasePresenter{ 8 | 9 | /** 10 | * Request that location updates start 11 | */ 12 | public void startLocationUpdates(); 13 | 14 | /** 15 | * Request that any location updates stop 16 | */ 17 | public void stopLocationUpdates(); 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/stephenpengilley/Development/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | AndroidMVPService 5 | Hello world! 6 | Settings 7 | This is an intro. The parent Activity has already requested that our LocationService starts requesting updates. The request was via the MainPresenter class, which in turn called methods on an Interface so that the Presenter doesn\'t directly talk to the Service. This is so that our Presenter remains Android code free 8 | Open Location Fragment 9 | Location updates will appear here 10 | 11 | 12 | -------------------------------------------------------------------------------- /core/src/main/java/com/spengilley/androidmvpservice/core/preferences/PreferencesWrapper.java: -------------------------------------------------------------------------------- 1 | package com.spengilley.androidmvpservice.core.preferences; 2 | 3 | 4 | public interface PreferencesWrapper { 5 | String getString(String key, String defaultValue); 6 | 7 | void putString(String key, String value); 8 | 9 | boolean contains(String key); 10 | 11 | void remove(String key); 12 | 13 | boolean getBoolean(String key, boolean defaultValue); 14 | 15 | void putBoolean(String key, boolean value); 16 | 17 | int getInt(String key, int defaultValue); 18 | 19 | void putInt(String key, int value); 20 | 21 | long getLong(String key, long defaultValue); 22 | 23 | void putLong(String key, long value); 24 | 25 | float getFloat(String key, float defaultValue); 26 | 27 | void putFloat(String key, float value); 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_intro.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 12 | 13 |