本文整理匯總了Java中com.parse.ParseAnalytics.trackAppOpened方法的典型用法代碼示例。如果您正苦於以下問題:Java ParseAnalytics.trackAppOpened方法的具體用法?Java ParseAnalytics.trackAppOpened怎麽用?Java ParseAnalytics.trackAppOpened使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.parse.ParseAnalytics
的用法示例。
在下文中一共展示了ParseAnalytics.trackAppOpened方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: EnablePush
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
public static void EnablePush(TiApplication app) {
Context appContext = app.getApplicationContext();
Activity appActivity = app.getAppCurrentActivity();
if (appContext == null) {
Log.e(TAG, "Application context is null, can't initialize Parse");
return;
}
else if (appActivity == null) {
Log.e(TAG, "Application activity is null, can't initialize Parse");
return;
}
else {
//PushService.setDefaultPushCallback(appContext, appActivity.getClass());
ParseAnalytics.trackAppOpened(appActivity.getIntent());
ParseInstallation.getCurrentInstallation().saveInBackground();
}
}
示例2: onCreate
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
loginButton = (Button) findViewById(R.id.loginButton);
loginButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Log.i(AnypicApplication.TAG, "Login button clicked");
onLoginButtonClicked();
}
});
// Check if there is a currently logged in user
// and they are linked to a Facebook account.
ParseUser currentUser = ParseUser.getCurrentUser();
if ((currentUser != null) && ParseFacebookUtils.isLinked(currentUser)) {
// Go to the main photo list view activity
showHomeListActivity();
}
// For push notifications
ParseAnalytics.trackAppOpened(getIntent());
}
示例3: onCreate
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ParseAnalytics.trackAppOpened(getIntent());
mFacebookButton = (Button) findViewById(R.id.facebook);
mFacebookButton.setOnClickListener(this);
mSignUpButton = (Button) findViewById(R.id.signup);
mSignUpButton.setOnClickListener(this);
mLoginButton = (Button) findViewById(R.id.login);
mLoginButton.setOnClickListener(this);
if (ParseUser.getCurrentUser() != null) {
showInboxActivity();
finish();
}
}
示例4: onCreate
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.registerpage);
EditText passwordField = (EditText) findViewById(R.id.registerPassword2);
passwordField.setOnKeyListener(new OnKeyListener()
{
public boolean onKey(View v, int keyCode, KeyEvent event)
{
if (event.getAction() == KeyEvent.ACTION_DOWN)
{
switch (keyCode)
{
case KeyEvent.KEYCODE_DPAD_CENTER:
case KeyEvent.KEYCODE_ENTER:
registerButtonClicked(v);
return true;
default:
break;
}
}
return false;
}
});
ParseAnalytics.trackAppOpened(getIntent());
}
示例5: onCreate
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Track app opens.
ParseAnalytics.trackAppOpened(getIntent());
// Set up our UI member properties.
this.genderFemaleButton = (RadioButton) findViewById(R.id.gender_female_button);
this.genderMaleButton = (RadioButton) findViewById(R.id.gender_male_button);
this.ageEditText = (EditText) findViewById(R.id.age_edit_text);
this.genderRadioGroup = (RadioGroup) findViewById(R.id.gender_radio_group);
}
示例6: onCreate
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mPrefs = new PreferenceHandler(this);
ParseAnalytics.trackAppOpened(getIntent());
// Only enable Crashlytics if opted in and manifest key isn't our placeholder
if (mPrefs.getCROptIn() && hasCrashlyticsApiKey(this)) {
Crashlytics.start(this);
}
// Set up our views
setContentView(R.layout.activity_main);
getSupportActionBar().setLogo(getResources().getDrawable(R.drawable.surewalkbanner));
getSupportActionBar().setDisplayUseLogoEnabled(true);
getSupportActionBar().setDisplayShowTitleEnabled(false);
// Set up our fragments. In this case we just have one: DashboardFragment
if (savedInstanceState == null) {
getSupportFragmentManager().beginTransaction().add(R.id.container, DashboardFragment.newInstance("Home"));
}
// If it's their first time running the app, show a dialog to set up info
if (!mPrefs.getFirstRun()) {
mPrefs.setFirstRun();
firstRunDialog();
}
// Check if keys are real or our dummies
// may be worthwhile to comment this out during testing
if (!mPrefs.getKeyCheck()) {
checkKeys();
}
}
示例7: onCreate
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ParseAnalytics.trackAppOpened(getIntent());
vpPager = (ViewPager) findViewById(R.id.viewPager);
adapterViewPager = new PatientsPagerAdapter(getSupportFragmentManager());
vpPager.setAdapter(adapterViewPager);
setupSlidingTabs(vpPager);
}
示例8: onCreate
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_mentor_list);
setCurrentLocation();
ParseAnalytics.trackAppOpened(getIntent());
if (savedInstanceState == null) {
// If there is no saved instance state, add a fragment representing the
// front of the card to this activity. If there is saved instance state,
// this fragment will have already been added to the activity.
getFragmentManager()
.beginTransaction()
.add(R.id.rlContainer, sListFragment)
.commit();
} else {
mShowingBack = (getFragmentManager().getBackStackEntryCount() > 0);
}
Async.dispatchMain(new Runnable() {
@Override
public void run() {
populateListView();
}
});
enableDrawer((DrawerLayout) findViewById(R.id.drawer_layout));
getFragmentManager().addOnBackStackChangedListener(this);
NotificationCenter.registerListener(this, User.NOTIFICATION_ME);
}
示例9: onCreate
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.mainpage);
getEvents();
ParseAnalytics.trackAppOpened(getIntent());
}
示例10: onCreate
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.friendsearch);
ParseAnalytics.trackAppOpened(getIntent());
listFriends(searchFriend(FriendPage.searchQuery));
//* *EDIT* *
ListView listview = (ListView) findViewById(R.id.listView);
listview.setOnItemClickListener(this);
}
示例11: trackAppOpened
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
/**
* Signals 'app opened' intent to 3rd-part analytics systems.
* @param intent - intent used to open app
*/
public static void trackAppOpened(android.content.Intent intent) {
if (app==null) {
Log.e(TAG,"trackAppOpened: app is null");
return;
}
//don't track anything if this is disabled on global level
if (MyApplication.isAnalyticsEnabled()) {
Log.d(TAG,"Sending intent "+intent.toString()+" to analytics service");
ParseAnalytics.trackAppOpened(intent);
Map<String, String> dimensions = new HashMap<String, String>();
dimensions.put("intent",intent.toString());
if (intent.getAction()!=null) {
dimensions.put("action",intent.getAction());
}
if (intent.getPackage()!=null) {
dimensions.put("package",intent.getPackage());
}
if (intent.getType()!=null) {
dimensions.put("type",intent.getType());
}
//TODO:send APP_OPENED event with thos dimensions to Mixpanel
}
else {
Log.d(TAG, "trackAppOpened not sending intent " + intent.toString() + " to analytics service");
}
}
示例12: onCreate
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
/***************** You don't need to change the code after this line ***********************/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ParseAnalytics.trackAppOpened(getIntent());
// Set up the UI elements
setupUI();
// If the user is not already logged in, ask them to log in
maybeShowLoginScreen();
}
示例13: onCreate
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
actionBarFont.fontChange(this.getWindow().getDecorView(), this);
setContentView(R.layout.activity_game_screen);
// getSupportActionBar().setBackgroundDrawable(getResources().getDrawable(R.drawable.background_action));
if (isNetworkNotAvailable()) {
AlertDialog.Builder builder = new AlertDialog.Builder(GameScreenActivity.this);
builder.setMessage("Please make sure you are connected to the internet!")
.setTitle("Error").setPositiveButton(android.R.string.ok, null);
AlertDialog dialog = builder.create();
dialog.show();
} else {
ParseAnalytics.trackAppOpened(getIntent());
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
// Get the user object for the current user
mUser = ParseUser.getCurrentUser();
if (mUser != null) {
Toast.makeText(getApplicationContext(),
"You are signed in as " + mUser.getString("fullName"), Toast.LENGTH_SHORT)
.show();
} else {
// If not logged in, send to login
Intent intent = new Intent(this, LoginActivity.class);
startActivity(intent);
}
}
}
示例14: onCreate
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ParseAnalytics.trackAppOpened(getIntent());
}
示例15: onCreate
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//TODO: Move to Application Class
ParseObject.registerSubclass(UserPicture.class);
Parse.initialize(this, "X6WBTy1jE7XbqPVqJVRnZIY782BTrluKZ9kkNRe7", "s9sImNOqS5RSiVjs5K0i2SHk0E1W5ZhnMNKezkJu");
ParseAnalytics.trackAppOpened(getIntent());
FragmentManager manager = getFragmentManager();
Fragment fragment = manager.findFragmentById(R.id.fragmentContainer);
if (fragment == null) {
fragment = new HomeFragment();
manager.beginTransaction().add(R.id.fragmentContainer, fragment).commit();
}
/*
final Button buttonShowPictures = (Button) findViewById(R.id.buttonShowPictures);
buttonShowPictures.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent intentShowPicture = new Intent(v.getContext(), ShowPictureActivity.class);
startActivity(intentShowPicture);
}
});
*/
}