Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Commit

Permalink
if nearby not supported, then exit nearby activity
Browse files Browse the repository at this point in the history
  • Loading branch information
n8fr8 committed May 16, 2018
1 parent d82adab commit 173f87d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.Toast;

import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GoogleApiAvailability;
Expand Down Expand Up @@ -99,6 +100,11 @@ protected void onCreate(Bundle savedInstanceState) {
String nearbyMessage = getIntent().getStringExtra(EXTRA_TEXT);
initNearby(nearbyMessage);
}
else
{
Toast.makeText(this, R.string.nearby_not_supported,Toast.LENGTH_LONG).show();
finish();
}
}

private final static int PLAY_SERVICES_RESOLUTION_REQUEST = 2404;
Expand Down

0 comments on commit 173f87d

Please sign in to comment.