com.google.android.gms.appinvite.AppInvite Java Examples
The following examples show how to use
com.google.android.gms.appinvite.AppInvite.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GoogleInviteApi.java From eternity with Apache License 2.0 | 5 votes |
@Inject GoogleInviteApi(Context context) { client = new GoogleApiClient.Builder(context) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .addApi(AppInvite.API) .build(); }
Example #2
Source File: MainView.java From FastAccess with GNU General Public License v3.0 | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { setTheme(R.style.AppTheme); super.onCreate(savedInstanceState); if (savedInstanceState == null) { getSupportFragmentManager() .beginTransaction() .replace(R.id.container, DeviceAppsView.newInstance(), DeviceAppsView.TAG) .commit(); getPresenter().onHandleShortcuts(this, getIntent()); AppInvite.AppInviteApi.getInvitation(getGoogleApiClient(), this, false).setResultCallback(getPresenter()); } drawerLayout.setStatusBarBackground(R.color.primary_dark); setToolbarIcon(R.drawable.ic_menu); getPresenter().onActivityStarted(savedInstanceState, this, bottomNavigation, navigation); if (null != savedInstanceState) getBadgeProvider().restore(savedInstanceState); if (navType == MainMvp.FOLDERS) { fab.show(); } else { fab.hide(); } if (PrefConstant.showIntroScreen()) { startActivity(new Intent(this, IntroPagerView.class)); PrefConstant.setIntroScreen(); } if (PrefConstant.showWhatsNew()) { PrefConstant.setWhatsNewVersion(); startActivity(new Intent(this, WhatsNewView.class)); } }
Example #3
Source File: MainView.java From FastAccess with GNU General Public License v3.0 | 5 votes |
private GoogleApiClient getGoogleApiClient() { if (mGoogleApiClient == null) { mGoogleApiClient = new GoogleApiClient.Builder(this) .enableAutoManage(this, this) .addApi(AppInvite.API) .build(); } return mGoogleApiClient; }
Example #4
Source File: AppInvites.java From easygoogle with Apache License 2.0 | 5 votes |
private void updateInvitationStatus(Intent intent) { // Extract invitation Id String invitationId = AppInviteReferral.getInvitationId(intent); // Update invitation installation status and also convert the invitation. GoogleApiClient gac = getFragment().getGoogleApiClient(); if (AppInviteReferral.isOpenedFromPlayStore(intent)) { AppInvite.AppInviteApi.updateInvitationOnInstall(gac, invitationId); } AppInvite.AppInviteApi.convertInvitation(gac, invitationId); }
Example #5
Source File: MainView.java From FastAccess with GNU General Public License v3.0 | 4 votes |
@Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); getPresenter().onHandleShortcuts(this, intent); AppInvite.AppInviteApi.getInvitation(getGoogleApiClient(), this, false).setResultCallback(getPresenter()); }
Example #6
Source File: NewsActivity.java From yahnac with Apache License 2.0 | 4 votes |
private void setupGoogleClient() { googleApiClient = new GoogleApiClient.Builder(this) .addApi(AppInvite.API) .enableAutoManage(this, this) .build(); }
Example #7
Source File: SettingsActivity.java From yahnac with Apache License 2.0 | 4 votes |
private void setupGoogleClient() { googleApiClient = new GoogleApiClient.Builder(this) .addApi(AppInvite.API) .enableAutoManage(this, this) .build(); }
Example #8
Source File: AppInvites.java From easygoogle with Apache License 2.0 | 4 votes |
@Override public List<Api> getApis() { return Arrays.asList(new Api[]{ AppInvite.API }); }