本文整理匯總了Java中com.parse.Parse.setLogLevel方法的典型用法代碼示例。如果您正苦於以下問題:Java Parse.setLogLevel方法的具體用法?Java Parse.setLogLevel怎麽用?Java Parse.setLogLevel使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.parse.Parse
的用法示例。
在下文中一共展示了Parse.setLogLevel方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setupParse
import com.parse.Parse; //導入方法依賴的package包/類
private void setupParse() {
Parse.initialize(this);
Parse.setLogLevel(
BuildConfig.DEBUG ?
Parse.LOG_LEVEL_VERBOSE :
Parse.LOG_LEVEL_NONE);
ParseInstallation parseInstallation = ParseInstallation.getCurrentInstallation();
parseInstallation.increment("uses");
parseInstallation.saveInBackground();
ParsePush.subscribeInBackground("");
ParsePush.subscribeInBackground("general");
ParsePush.subscribeInBackground("warning");
ParsePush.subscribeInBackground("news");
ParseLocation.registerSubclass(ParseLocation.class);
Schedule.registerSubclass(Schedule.class);
Price.registerSubclass(Price.class);
New.registerSubclass(New.class);
}
示例2: parseBootstrap
import com.parse.Parse; //導入方法依賴的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: prepareParse
import com.parse.Parse; //導入方法依賴的package包/類
private void prepareParse(Context context) {
ParseObject.registerSubclass(LobbyEventCard.class);
ParseObject.registerSubclass(ScheduleCard.class);
ParseObject.registerSubclass(ScheduleGroupCard.class);
ParseObject.registerSubclass(PlanCard.class);
ParseObject.registerSubclass(PlanStandCard.class);
Parse.setLogLevel(Parse.LOG_LEVEL_DEBUG);
Parse.initialize(context, Constans.PARSE_APP_ID, Constans.PARSE_CLIENT_KEY);
}
示例4: onCreate
import com.parse.Parse; //導入方法依賴的package包/類
@Override
public void onCreate() {
super.onCreate();
initLogging();
initParse();
initCalligraphy();
if (!BuildConfig.DEBUG) Parse.setLogLevel(Parse.LOG_LEVEL_NONE);
}
示例5: onCreate
import com.parse.Parse; //導入方法依賴的package包/類
@Override
public void onCreate() {
super.onCreate();
Parse.initialize(this,
getString(R.string.parse_app_id), getString(R.string.parse_client_id));
Parse.setLogLevel(Parse.LOG_LEVEL_VERBOSE);
}
示例6: onCreate
import com.parse.Parse; //導入方法依賴的package包/類
@Override
public void onCreate() {
super.onCreate();
// TODO: support portrait and landscape.
// Register default font
CalligraphyConfig.initDefault("fonts/OpenSans-Regular.ttf", R.attr.fontPath);
// Register the parse models
ParseObject.registerSubclass(User.class);
ParseObject.registerSubclass(Transaction.class);
ParseObject.registerSubclass(Goal.class);
ParseObject.registerSubclass(Category.class);
ParseObject.registerSubclass(Post.class);
ParseObject.registerSubclass(Comment.class);
// Enable local datastore
Parse.enableLocalDatastore(this);
// Initializing Parse
Parse.initialize(this, getString(R.string.parseApplicationId),
getString(R.string.parseClientId));
Parse.setLogLevel(Parse.LOG_LEVEL_VERBOSE);
PushService.setDefaultPushCallback(this, MainActivity.class);
ParseInstallation.getCurrentInstallation().saveInBackground();
// Pin Categories locally
new CategoryDao().pin();
}
示例7: initParse
import com.parse.Parse; //導入方法依賴的package包/類
private void initParse(){
Parse.enableLocalDatastore(this);
Parse.initialize(this);
Parse.setLogLevel(BuildConfig.DEBUG ? Parse.LOG_LEVEL_VERBOSE : Parse.LOG_LEVEL_NONE);
ParseUser.enableRevocableSessionInBackground();
}
示例8: onCreate
import com.parse.Parse; //導入方法依賴的package包/類
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Window window = getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
window.setStatusBarColor(getResources().getColor(R.color.primary_dark));
}
mUsernameField = (EditText) findViewById(R.id.login_email);
mPasswordField = (EditText) findViewById(R.id.login_password);
mErrorField = (TextView) findViewById(R.id.error_messages);
spinner = (ProgressBar)findViewById(R.id.progressBar1);
spinner.setVisibility(View.GONE);
Parse.initialize(this);
Parse.setLogLevel(Parse.LOG_LEVEL_DEBUG);
/** Get twitter auth data - In parse create new table , in this template I have called it "tw" & add string type columns "keyid" & "secretid"
* The benefit of this method is that if you need to revoke twitter keys, you just need to modify them in the table only. No need to for new app update.
* If you want to avoid doing it this way, then simply remove whole of the below code with just this one line & pass your keys as parameters.
* ParseTwitterUtils.initialize(tw_consumer_key, tw_consumer_secret);
* But with this you will have to push an app update in case you revoke your twitter keys.
*/
ParseQuery<ParseObject> qtw = ParseQuery.getQuery("tw");
qtw.getFirstInBackground(new GetCallback<ParseObject>() {
@Override
public void done(ParseObject obj, ParseException e) {
if(e==null){
String tw_consumer_key = obj.get("keyid").toString();
String tw_consumer_secret = obj.get("secretid").toString();
ParseTwitterUtils.initialize(tw_consumer_key, tw_consumer_secret);
}
else {
Log.d("Tw: Error", e.getMessage());
}
}
});
}