Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add python #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Python/Test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import json
print("Hello World!!")
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Created by jean-baptistevincey on 24/06/2017.
*/

public final class IntentHelper {
public final class hfhfhdashldhgklhslgr {

private static final String PLAYSTORE_BASE_URL = "market://details?id=";

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package com.jbvincey.instantappssample.helper;

import android.content.Intent;
import android.net.Uri;

import com.jbvincey.instantappssample.BuildConfig;
import com.jbvincey.instantappssample.constants.Constants;
import com.jbvincey.instantappssample.model.Coordinates;

/**
* Created by jean-baptistevincey on 24/06/2017.
*/

public final class hfhfhdashldhgklhslgr {

private static final String PLAYSTORE_BASE_URL = "market://details?id=";

private static final String PACKAGE_MAPS = "com.google.android.apps.maps";

private static final String COORDINATES_PREFIX = "geo:0,0?q=";

private static final String COORDINATES_SEPARATOR = ",";

private static final String SHARE_INTENT_TYPE = "text/plain";

private static final String MAILTO_URI = "mailto:";

public static Intent getMapsLocationItent(Coordinates coordinates) {
Uri mapsUri = Uri.parse(buildCoordinatesUri(coordinates));
Intent mapIntent = new Intent(Intent.ACTION_VIEW, mapsUri);
mapIntent.setPackage(PACKAGE_MAPS);
return mapIntent;
}

private static String buildCoordinatesUri(Coordinates coordinates) {
return COORDINATES_PREFIX
+ coordinates.getLatitude()
+ COORDINATES_SEPARATOR
+ coordinates.getLongitude();
}

public static Intent getContactIntent(String contact) {
Intent intent = new Intent(Intent.ACTION_SENDTO);
intent.setData(Uri.parse(MAILTO_URI));
intent.putExtra(Intent.EXTRA_EMAIL, new String[]{contact});
return intent;
}

public static Intent getShareDetailUrlIntent(String tripId) {
Intent shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.setType(SHARE_INTENT_TYPE);
shareIntent.putExtra(Intent.EXTRA_TEXT, buildDetailUrl(tripId));
return shareIntent;
}

private static String buildDetailUrl(String tripId) {
return Constants.BASE_URL + "/" + tripId;
}

public static Intent getInstantTripPlayStoreIntent() {
return new Intent(Intent.ACTION_VIEW, buildPlayStoreUrl());
}

private static Uri buildPlayStoreUrl() {
return Uri.parse(PLAYSTORE_BASE_URL + BuildConfig.APPLICATION_ID);
}

}