Android Open Source - YourWiFi Application Module






From Project

Back to project page YourWiFi.

License

The source code is released under:

MIT License

If you think the Android project YourWiFi listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.akisute.yourwifi.app.dagger;
//from  w  ww. j  a  v a 2s.co  m
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.location.LocationManager;
import android.net.wifi.WifiManager;
import android.view.LayoutInflater;

import com.akisute.android.daggered.DaggeredApplicationModule;
import com.akisute.android.daggered.ForApplication;
import com.akisute.yourwifi.app.CloudLoginDialogFragment;
import com.akisute.yourwifi.app.EssidDetailActivity;
import com.akisute.yourwifi.app.EssidDetailFragment;
import com.akisute.yourwifi.app.EssidListFragment;
import com.akisute.yourwifi.app.MainActivity;
import com.akisute.yourwifi.app.NetworkMapFragment;
import com.akisute.yourwifi.app.NetworkRecordingService;
import com.akisute.yourwifi.app.RawNetworkListFragment;
import com.akisute.yourwifi.app.SettingsActivity;
import com.akisute.yourwifi.app.SettingsFragment;
import com.akisute.yourwifi.app.cloud.CloudManager;
import com.akisute.yourwifi.app.model.BssidListAdapter;
import com.akisute.yourwifi.app.model.EssidListAdapter;
import com.akisute.yourwifi.app.model.LocationScanManager;
import com.akisute.yourwifi.app.model.NetworkCache;
import com.akisute.yourwifi.app.model.NetworkScanManager;
import com.akisute.yourwifi.app.model.RawNetworkListAdapter;
import com.akisute.yourwifi.app.util.GlobalEventBus;
import com.akisute.yourwifi.app.util.GlobalResources;
import com.akisute.yourwifi.app.util.GlobalSharedPreferences;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;

@Module(
        includes = {
                DaggeredApplicationModule.class,
                AndroidSystemModule.class
        },
        injects = {
                // Main Activity
                MainActivity.class,
                EssidListFragment.class,
                RawNetworkListFragment.class,
                NetworkMapFragment.class,
                // Detail Activity
                EssidDetailActivity.class,
                EssidDetailFragment.class,
                // Settings Activity
                SettingsActivity.class,
                SettingsFragment.class,
                // Cloud Login Activity
                CloudLoginDialogFragment.class,
                // Service
                NetworkRecordingService.class
        }
)
public class ApplicationModule {

    @Provides
    @Singleton
    GlobalEventBus provideGlobalEventBus() {
        return new GlobalEventBus();
    }

    @Provides
    @Singleton
    GlobalResources provideGlobalResources(Resources resources) {
        return new GlobalResources(resources);
    }

    @Provides
    @Singleton
    GlobalSharedPreferences provideGlobalSharedPreferences(SharedPreferences sharedPreferences, GlobalEventBus globalEventBus) {
        return new GlobalSharedPreferences(sharedPreferences, globalEventBus);
    }

    @Provides
    @Singleton
    NetworkCache providesNetworkCache() {
        return new NetworkCache();
    }

    @Provides
    @Singleton
    NetworkScanManager providesNetworkScanManager(@ForApplication Context context, WifiManager wifiManager, GlobalEventBus globalEventBus, NetworkCache networkCache) {
        return new NetworkScanManager(context, wifiManager, globalEventBus, networkCache);
    }

    @Provides
    @Singleton
    LocationScanManager providesLocationScanManager(LocationManager locationManager, GlobalEventBus globalEventBus) {
        return new LocationScanManager(locationManager, globalEventBus);
    }

    @Provides
    @Singleton
    CloudManager providesCloudManager() {
        return new CloudManager();
    }

    @Provides
    RawNetworkListAdapter providesRawNetworkListAdapter(LayoutInflater layoutInflater, GlobalResources globalResources, GlobalEventBus globalEventBus, NetworkCache networkCache) {
        return new RawNetworkListAdapter(layoutInflater, globalResources, globalEventBus, networkCache);
    }

    @Provides
    EssidListAdapter providesEssidListAdapter(LayoutInflater layoutInflater, GlobalResources globalResources, GlobalEventBus globalEventBus, NetworkCache networkCache) {
        return new EssidListAdapter(layoutInflater, globalResources, globalEventBus, networkCache);
    }

    @Provides
    BssidListAdapter providesBssidListAdapter(LayoutInflater layoutInflater, GlobalResources globalResources) {
        return new BssidListAdapter(layoutInflater, globalResources);
    }

}




Java Source Code List

com.akisute.yourwifi.app.Application.java
com.akisute.yourwifi.app.CloudLoginDialogFragment.java
com.akisute.yourwifi.app.EssidDetailActivity.java
com.akisute.yourwifi.app.EssidDetailFragment.java
com.akisute.yourwifi.app.EssidListFragment.java
com.akisute.yourwifi.app.MainActivity.java
com.akisute.yourwifi.app.NetworkMapFragment.java
com.akisute.yourwifi.app.NetworkRecordingService.java
com.akisute.yourwifi.app.RawNetworkListFragment.java
com.akisute.yourwifi.app.SettingsActivity.java
com.akisute.yourwifi.app.SettingsFragment.java
com.akisute.yourwifi.app.cloud.CloudManager.java
com.akisute.yourwifi.app.dagger.AndroidSystemModule.java
com.akisute.yourwifi.app.dagger.ApplicationModule.java
com.akisute.yourwifi.app.intent.Intents.java
com.akisute.yourwifi.app.model.BssidListAdapter.java
com.akisute.yourwifi.app.model.EssidComparators.java
com.akisute.yourwifi.app.model.EssidListAdapter.java
com.akisute.yourwifi.app.model.Essid.java
com.akisute.yourwifi.app.model.LocationScanManager.java
com.akisute.yourwifi.app.model.NetworkCache.java
com.akisute.yourwifi.app.model.NetworkComparators.java
com.akisute.yourwifi.app.model.NetworkScanManager.java
com.akisute.yourwifi.app.model.Network.java
com.akisute.yourwifi.app.model.RawNetworkListAdapter.java
com.akisute.yourwifi.app.util.GlobalEventBus.java
com.akisute.yourwifi.app.util.GlobalResources.java
com.akisute.yourwifi.app.util.GlobalSharedPreferences.java