當前位置: 首頁>>代碼示例>>Java>>正文


Java Parse.setLogLevel方法代碼示例

本文整理匯總了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);
}
 
開發者ID:Gnzlt,項目名稱:UCOmove,代碼行數:23,代碼來源:UCOmoveApplication.java

示例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);
}
 
開發者ID:wkoszek,項目名稱:sensorama,代碼行數:27,代碼來源:MainActivity.java

示例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);
}
 
開發者ID:bvblogic,項目名稱:Mediator_Android,代碼行數:11,代碼來源:DataController.java

示例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);
}
 
開發者ID:xebia,項目名稱:event-schedule-android,代碼行數:10,代碼來源:BaseEventScheduleApp.java

示例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);
}
 
開發者ID:fblandroidhackathon,項目名稱:weardrone,代碼行數:8,代碼來源:MainApp.java

示例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();
}
 
開發者ID:CodePath-MAF,項目名稱:AndroidClient,代碼行數:30,代碼來源:MAFApplication.java

示例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();
}
 
開發者ID:adrielcafe,項目名稱:NMSAlphabetAndroidApp,代碼行數:7,代碼來源:App.java

示例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());
               }
           }

       });
   }
 
開發者ID:bhavyanshu,項目名稱:TemplateAppParse-dot-com,代碼行數:48,代碼來源:LoginActivity.java


注:本文中的com.parse.Parse.setLogLevel方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。