本文整理匯總了Java中com.parse.ParseAnalytics.trackEventInBackground方法的典型用法代碼示例。如果您正苦於以下問題:Java ParseAnalytics.trackEventInBackground方法的具體用法?Java ParseAnalytics.trackEventInBackground怎麽用?Java ParseAnalytics.trackEventInBackground使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.parse.ParseAnalytics
的用法示例。
在下文中一共展示了ParseAnalytics.trackEventInBackground方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onStop
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
@Override
protected void onStop() {
super.onStop();
((App) getApplication()).getGoogleApiClient().disconnect();
Map<String, String> params = new HashMap<>();
//
// params.put("total time", timeFormat((System.currentTimeMillis()-activityStartTime)/1000));
// ParseAnalytics.trackEventInBackground("application close", params);
long timeElapsed = System.nanoTime() - activityStartTime;
timeElapsed = timeElapsed / 1000000000;//Convert to seconds;
params.put("spent/min", String.valueOf((timeElapsed / 60)));
params.put("spent/sec", String.valueOf((timeElapsed % 60)));
ParseAnalytics.trackEventInBackground("mainactivity/close", params);
}
示例2: parseBootstrap
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
private void parseBootstrap() {
try {
Thread.sleep(3000);
} catch(InterruptedException ex) {
Thread.currentThread().interrupt();
}
ParseAnalytics.trackAppOpenedInBackground(getIntent());
Parse.setLogLevel(Parse.LOG_LEVEL_DEBUG);
for (int i = 0; i < 1; i++) {
System.out.print("XXX wrinting" + i);
ParseObject testObject = new ParseObject("TestObject");
testObject.put("foo", "bar");
testObject.saveInBackground();
}
Map<String, String> dimensions = new HashMap<String, String>();
// What type of news is this?
dimensions.put("category", "politics");
// Is it a weekday or the weekend?
dimensions.put("dayType", "weekday");
// Send the dimensions to Parse along with the 'read' event
ParseAnalytics.trackEventInBackground("read", dimensions);
}
示例3: onStart
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
@Override
protected void onStart() {
super.onStart();
((App) getApplication()).getGoogleApiClient().connect();
Map<String, String> params = new HashMap<>();
activityStartTime = System.nanoTime();
params.put("device/brand", Build.BRAND);
params.put("device/model", Build.MODEL);
ParseAnalytics.trackEventInBackground("mainactivity/open", params);
}
示例4: loginSuccess
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
private void loginSuccess() {
analyticsParams.put("success", "true");
ParseAnalytics.trackEventInBackground("login", analyticsParams);
Intent intent = new Intent(this, MainActivity.class);
startActivity(intent);
finish();
}
示例5: sendParseAnalytics
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
private void sendParseAnalytics(String success) {
Map<String, String> params = new HashMap<>();
params.put("lat", String.valueOf(App.currentLatitude));
params.put("lng", String.valueOf(App.currentLongitude));
params.put("success", success);
ParseAnalytics.trackEventInBackground("food/orders/search", params);
}
示例6: sendParseAnalytics
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
private void sendParseAnalytics(String success) {
Map<String, String> params = new HashMap<>();
params.put("departure", departureLocation);
params.put("arrival", arrivalLocation);
params.put("travelDate", travelDate);
params.put("numberOfAdults", numOfAdults);
params.put("success", success);
ParseAnalytics.trackEventInBackground("travel/flight/search", params);
}
示例7: sendParseAnalytics
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
private void sendParseAnalytics(String success) {
Map<String, String> params = new HashMap<>();
params.put("lat", String.valueOf(App.currentLatitude));
params.put("lng", String.valueOf(App.currentLongitude));
params.put("success", success);
ParseAnalytics.trackEventInBackground("travel/cabs/search", params);
}
示例8: sendParseAnalytics
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
private void sendParseAnalytics(String success) {
Map<String, String> params = new HashMap<>();
params.put("departure", departureLocation);
params.put("arrival", arrivalLocation);
params.put("travelDate", travelDate);
params.put("success", success);
ParseAnalytics.trackEventInBackground("travel/bus/search", params);
}
示例9: onIssueDownloadClicked
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
@Override
public void onIssueDownloadClicked(Issue issue) {
Map<String, String> dimensions = new HashMap<>();
dimensions.put("Title", issue.getTitle());
dimensions.put("Paid", issue.hasPrice() ? "yes" : "no");
dimensions.put("Purchased", issue.isPurchased() ? "yes" : "no");
ParseAnalytics.trackEventInBackground("Download_Issue_Clicked", dimensions);
}
示例10: onIssueArchiveClicked
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
@Override
public void onIssueArchiveClicked(Issue issue) {
Map<String, String> dimensions = new HashMap<>();
dimensions.put("Title", issue.getTitle());
dimensions.put("Paid", issue.hasPrice() ? "yes" : "no");
dimensions.put("Purchased", issue.isPurchased() ? "yes" : "no");
ParseAnalytics.trackEventInBackground("Archive_Issue_Clicked", dimensions);
}
示例11: onIssueReadClicked
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
@Override
public void onIssueReadClicked(Issue issue) {
Map<String, String> dimensions = new HashMap<>();
dimensions.put("Title", issue.getTitle());
dimensions.put("Paid", issue.hasPrice() ? "yes" : "no");
dimensions.put("Purchased", issue.isPurchased() ? "yes" : "no");
ParseAnalytics.trackEventInBackground("Read_Issue_Clicked", dimensions);
}
示例12: onIssuePageOpened
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
public void onIssuePageOpened(Issue issue, String pageTitle, int pageIndex) {
Map<String, String> dimensions = new HashMap<>();
dimensions.put("Issue Title", issue.getTitle());
dimensions.put("Page Title", pageTitle);
dimensions.put("Page Index", String.valueOf(pageIndex));
ParseAnalytics.trackEventInBackground("View_Issue_Page", dimensions);
}
示例13: onIssuePurchaseClicked
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
@Override
public void onIssuePurchaseClicked(Issue issue) {
Map<String, String> dimensions = new HashMap<>();
dimensions.put("Title", issue.getTitle());
dimensions.put("Paid", issue.hasPrice() ? "yes" : "no");
dimensions.put("Purchased", issue.isPurchased() ? "yes" : "no");
dimensions.put("Price", issue.getPrice());
ParseAnalytics.trackEventInBackground("Purchase_Issue_Clicked", dimensions);
}
示例14: onSubscribeClicked
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
@Override
public void onSubscribeClicked(Sku subscription) {
Map<String, String> dimensions = new HashMap<>();
dimensions.put("Title", subscription.title);
dimensions.put("Id", subscription.id);
dimensions.put("Price", subscription.price);
ParseAnalytics.trackEventInBackground("Subscribe_Clicked", dimensions);
}
示例15: onIssuePageOpened
import com.parse.ParseAnalytics; //導入方法依賴的package包/類
public void onIssuePageOpened(Issue issue, String pageTitle, int pageIndex) {
Map<String, String> dimensions = new HashMap<>();
dimensions.put("Issue Title", issue.getTitle());
dimensions.put("Page Title", pageTitle);
dimensions.put("Page Index", String.valueOf(pageIndex));
ParseAnalytics.trackEventInBackground("View_Issue_Page", dimensions);
sendEvent("Issue", "Page Views", issue.getTitle() + pageTitle);
}