This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 1. Create a new generic password entry in Keychain Access called "WHATEVER_AnyConnect_VPN" (the name in Keychain access must match that in line 39 below) with your password for the Cisco AnyConnect VPN server. | |
-- 2. Open this script in Script Editor (both this and the above are in the Applications->Utilities folder) and "Save as.." an Application (.app) with desired name. | |
-- 3. Open Security & Privacy System Preferences, go to Privacy, Accessibility. | |
-- 4. Enable the above .app so it can access Accessibility | |
-- 5. Copy and paste a nice icon on the generic Applescript icon (I used a copy of the default AnyConnect one) | |
-- 6. Add the new .app to /Users/[yourshortname]/Applications with a shortcut to your Dock | |
-- 7. Enjoy the fast connection with no need to enter password and increased security of not having a sensitive password stored as plain text | |
-- 8. Run script again to close connection | |
-- AnyConnect now refered to as targetApp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Singleton | |
public class PoisRepository { | |
private final PoisDao mDao; | |
private final WebService mWebService; | |
private final AppExecutors mExecutors; | |
private MutableLiveData<List<Poi>> mPois; | |
@Inject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Dao | |
public interface PoisDao { | |
@Insert | |
void addPoi(Poi entry); | |
@Insert | |
void bulkInsertPois(List<Pois> entries); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Database(entities = {Poi.class}, version = 1) | |
public abstract class PoisDatabase extends RoomDatabase { | |
public static final String NAME = "data_pois"; | |
public abstract PoisDao poisDao(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Singleton | |
public class PoisRepository { | |
private final WebService mWebService; | |
private final AppExecutors mExecutors; | |
private MutableLiveData<List<Poi>> mWebServerPois; | |
@Inject | |
public PoisRepository(WebService webService, AppExecutors executors) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Webservice { | |
@GET("/pois/{poi}") | |
Call<Poi> getPoi(@Path("poi") String poiId); | |
@GET("/pois") | |
Call<List<Poi>> getPois(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
01/15 14:17:51: Launching app | |
$ adb install-multiple -r -t C:\Users\eliam\Desktop\udacity\google-developer-challenge-2017\udacity-municipality-app\app\build\intermediates\split-apk\debug\slices\slice_7.apk C:\Users\eliam\Desktop\udacity\google-developer-challenge-2017\udacity-municipality-app\app\build\intermediates\split-apk\debug\slices\slice_2.apk C:\Users\eliam\Desktop\udacity\google-developer-challenge-2017\udacity-municipality-app\app\build\intermediates\split-apk\debug\slices\slice_1.apk C:\Users\eliam\Desktop\udacity\google-developer-challenge-2017\udacity-municipality-app\app\build\intermediates\split-apk\debug\dep\dependencies.apk C:\Users\eliam\Desktop\udacity\google-developer-challenge-2017\udacity-municipality-app\app\build\intermediates\split-apk\debug\slices\slice_3.apk C:\Users\eliam\Desktop\udacity\google-developer-challenge-2017\udacity-municipality-app\app\build\intermediates\split-apk\debug\slices\slice_8.apk C:\Users\eliam\Desktop\udacity\google-developer-challenge-2017\udacity-municipal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PoisMapFragment extends Fragment implements OnMapReadyCallback { | |
private AcFragmentPoisMapBinding mBinding; | |
/* Might be null if Google Play services APK is not available. */ | |
private GoogleMap mMap = null; | |
private static final String MAPVIEW_BUNDLE_KEY = "MapViewBundleKey"; | |
private static final LatLng bergamo = new LatLng(45.6983, 9.6773); | |
private static final LatLng rome = new LatLng(41.9028, 12.4964); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PoisListFragment extends Fragment implements { | |
private AcFragmentPoisListBinding mBinding; | |
private PoisListAdapter mAdapter; | |
@Override | |
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, | |
Bundle savedInstanceState) { | |
/* Inflate the layout for this fragment */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<layout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto"> | |
<android.support.design.widget.CoordinatorLayout | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<android.support.v7.widget.RecyclerView |
NewerOlder