• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Parse类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.parse.Parse的典型用法代码示例。如果您正苦于以下问题:Java Parse类的具体用法?Java Parse怎么用?Java Parse使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Parse类属于com.parse包,在下文中一共展示了Parse类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onCreate

import com.parse.Parse; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    // Enable Local Datastore.
    Parse.enableLocalDatastore(this);

    // Add your initialization code here
    Parse.initialize(this);
    ParseInstallation.getCurrentInstallation().saveInBackground();

    ParseACL defaultACL = new ParseACL();
    // Optionally enable public read access.
    defaultACL.setPublicReadAccess(true);
    ParseACL.setDefaultACL(defaultACL, true);
}
 
开发者ID:AvijitGhosh82,项目名称:Madad_SOS,代码行数:17,代码来源:StartApp.java


示例2: onCreate

import com.parse.Parse; //导入依赖的package包/类
@Override
public void onCreate() {
    Log.d("DEBUG", "Creating TypeMaps");
    typeMaps = new TypeMaps();
    super.onCreate();
    CalligraphyConfig.initDefault
        ("Gotham-Light.ttf", R.attr.fontPath);
    LineNumberReader lnr = new LineNumberReader
        (new InputStreamReader
         (getResources().openRawResource(R.raw.keys)));

    registerClasses();

    String parseClientKey;

    try {
        parseAppId = lnr.readLine();
        parseClientKey = lnr.readLine();

        Parse.initialize(this, parseAppId, parseClientKey);
        Log.d("DEBUG", "Successfully initialized");
    }
    catch (IOException ioe) {
        Log.e("DEBUG", "Failed to read keys", ioe);
    }
}
 
开发者ID:samv,项目名称:AshaNetApp,代码行数:27,代码来源:AshaNetApp.java


示例3: getMergedOptions

import com.parse.Parse; //导入依赖的package包/类
private Bundle getMergedOptions() {
  // Read activity metadata from AndroidManifest.xml
  ActivityInfo activityInfo = null;
  try {
    activityInfo = getPackageManager().getActivityInfo(
        this.getComponentName(), PackageManager.GET_META_DATA);
  } catch (NameNotFoundException e) {
    if (Parse.getLogLevel() <= Parse.LOG_LEVEL_ERROR &&
        Log.isLoggable(LOG_TAG, Log.WARN)) {
      Log.w(LOG_TAG, e.getMessage());
    }
  }

  // The options specified in the Intent (from ParseLoginBuilder) will
  // override any duplicate options specified in the activity metadata
  Bundle mergedOptions = new Bundle();
  if (activityInfo != null && activityInfo.metaData != null) {
    mergedOptions.putAll(activityInfo.metaData);
  }
  if (getIntent().getExtras() != null) {
    mergedOptions.putAll(getIntent().getExtras());
  }

  return mergedOptions;
}
 
开发者ID:rutvijkumarshah,项目名称:WatsiAndroidApp,代码行数:26,代码来源:ParseLoginActivity.java


示例4: onCreate

import com.parse.Parse; //导入依赖的package包/类
@Override
public void onCreate() {
	super.onCreate();

	ParseObject.registerSubclass(PrsPhoto.class);

	/*
	 * Fill in this section with your Parse credentials
	 */
	Parse.initialize(this, "VgUmqfwmveatEK77VKqejESUi9g2YTiLd5ARi5Zv", "rZOccIO0y35BMrfv599RyclrNo5QT308WRCLkTnY");

	// annonymous user
	ParseUser.enableAutomaticUser();

	/*
	 * For more information on app security and Parse ACL:
	 * https://www.parse.com/docs/android_guide#security-recommendations
	 */
	ParseACL defaultACL = new ParseACL();

	defaultACL.setPublicReadAccess(true);

	ParseACL.setDefaultACL(defaultACL, true);
}
 
开发者ID:triestpa,项目名称:PhotoShare,代码行数:25,代码来源:PrsApplication.java


示例5: onCreate

import com.parse.Parse; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    ParseObject.registerSubclass(Kid.class);
    ParseObject.registerSubclass(Visit.class);
    ParseObject.registerSubclass(Attendance.class);
    Parse.initialize(new  Parse.Configuration.Builder(this)
            .applicationId("PARSE applicationId to be added here")
            .clientKey("Parse Client Id to be added here")
            .server("Parse server address to be added here").enableLocalDataStore().build());

    ParseUser.enableAutomaticUser();
    ParseACL defaultACL = new ParseACL();
    defaultACL.setPublicReadAccess(true);
    defaultACL.setPublicWriteAccess(true);
    ParseACL.setDefaultACL(defaultACL, true);
}
 
开发者ID:amir511,项目名称:My-Sheep,代码行数:18,代码来源:ParseApplication.java


示例6: 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


示例7: setUpParse

import com.parse.Parse; //导入依赖的package包/类
public static void setUpParse(Context context) {

        Parse.enableLocalDatastore(context);
        Parse.initialize(context, "SUA_APPLICATION_ID", "SUA CLIENT_KEY");
        ParseInstallation.getCurrentInstallation().saveInBackground();

        ParseUser.enableAutomaticUser();
        ParseACL defaultACL = new ParseACL();
        defaultACL.setPublicReadAccess(true);
        defaultACL.setPublicWriteAccess(true);

        ParsePush.subscribeInBackground(Constants.CHANNEL, new SaveCallback() {
            @Override
            public void done(ParseException error) {
                if (error == null) {
                    Log.i(Constants.TAG, "Successfully subscribed to Parse!");
                }else{
                    Log.i(Constants.TAG, "Error subscribed to Parse!");
                }
            }
        });
    }
 
开发者ID:rudsonlive,项目名称:ParseLiveo,代码行数:23,代码来源:ParsePushApp.java


示例8: onCreate

import com.parse.Parse; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    //If using Parse.com
    Parse.enableLocalDatastore(this);
    //TODO Customize parse_app_id & parse_client_key values in strings
    Parse.initialize(this);

    //If Using Firebase.
    Firebase.setAndroidContext(this);
    //General Firebase reference used allong all your app
    mFireBaseRef = new Firebase("https://<YOUR-FIREBASE-APP>.firebaseio.com/");
    //Use that same reference to perform login and register with Reglog.
    RegLog.setFirebaseReference(mFireBaseRef);
}
 
开发者ID:Antpachon,项目名称:RegLog,代码行数:17,代码来源:SampleApplication.java


示例9: onCreate

import com.parse.Parse; //导入依赖的package包/类
@Override
public void onCreate() {
  super.onCreate();

  // Enable Local Datastore.
  Parse.enableLocalDatastore(this);

  // Add your initialization code here
  Parse.initialize(this);

  ParseUser.enableAutomaticUser();
  ParseACL defaultACL = new ParseACL();
  // Optionally enable public read access.
  // defaultACL.setPublicReadAccess(true);
  ParseACL.setDefaultACL(defaultACL, true);
}
 
开发者ID:BehrouzRiahu,项目名称:Marketplace,代码行数:17,代码来源:StarterApplication.java


示例10: onCreate

import com.parse.Parse; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    ParseObject.registerSubclass(Organization.class);
    ParseObject.registerSubclass(UserBeacon.class);
    ParseObject.registerSubclass(CustomUser.class);
    ParseObject.registerSubclass(Note.class);

    Parse.initialize(new Parse.Configuration.Builder(getApplicationContext())
            .applicationId(Parse_appID)
            .clientKey(null)
            .addNetworkInterceptor(new ParseLogInterceptor())
            .enableLocalDataStore() //enable local datastore within initialization since hosted elsewhere
            .server("http://estinote.herokuapp.com/parse/") // The trailing slash is important.
    .build()
    );

    //scan();
}
 
开发者ID:donniepropst,项目名称:note.cntxt,代码行数:21,代码来源:MyApplication.java


示例11: init

import com.parse.Parse; //导入依赖的package包/类
public void init() {

        MainApplication.ServerHost = getSharedPreferences("ip",MODE_PRIVATE).getString("ip",null);

        if(MainApplication.ServerHost==null)
            MainApplication.ServerHost = Constants.ServerHost;
        Fresco.initialize(getApplicationContext());

        ParseObject.registerSubclass(UserInfo.class);
        Parse.initialize(new Parse.Configuration.Builder(this)
                .applicationId("langrensha")
                .clientKey("")
                .server(Constants.makeNewIpAddress(MainApplication.ServerHost) + "/parse")
                .enableLocalDataStore()
                .build()
        );


        initSocket();

        SoundEffectManager.init(this);
    }
 
开发者ID:whu-iss-jack,项目名称:langren,代码行数:23,代码来源:MainApplication.java


示例12: onCreate

import com.parse.Parse; //导入依赖的package包/类
@Override
public void onCreate() {
  super.onCreate();

  // Enable Local Datastore.
  Parse.enableLocalDatastore(this);

  // Add your initialization code here
  Parse.initialize(this, "COLFRcv3xi8naPtnDUHK4QwXpY8E49t9OuBYzKmN", "NJsKhQZ9pSJXPQ1EnMdzptxWxvLyzAp4AihbEdVp");
  ParseInstallation.getCurrentInstallation().saveInBackground();

  ParseUser.enableAutomaticUser();
  ParseACL defaultACL = new ParseACL();
  // Optionally enable public read access.
  // defaultACL.setPublicReadAccess(true);
  ParseACL.setDefaultACL(defaultACL, true);

}
 
开发者ID:Nyceane,项目名称:HackathonPADLS,代码行数:19,代码来源:StarterApplication.java


示例13: onCreate

import com.parse.Parse; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    Parse.enableLocalDatastore(this);
    Parse.initialize(this, "b6M7rAxtdYoUgGMgGkzmYmpDWiN2T6M8c2RTJ5Zg", "Xsqyd44kUtgiOMMvwP8gyVjmdZLvXLxuynmGqqNX");
    ParsePush.subscribeInBackground("Apro_2016", new SaveCallback() {
        @Override
        public void done(ParseException e) {
            Log.e(TAG, "Successfully subscribed to Parse!");
        }


    });
    Log.d(TAG, "not rgtd.");
}
 
开发者ID:Aparoksha,项目名称:App_2016,代码行数:17,代码来源:parse_config.java


示例14: onCreate

import com.parse.Parse; //导入依赖的package包/类
@Override
  public void onCreate() {
      super.onCreate();

      instance = this;

      // Perform injection
      Injector.init(getRootModule(), this);
      // Enable Local Datastore.
     // Parse.enableLocalDatastore(this);
ParseObject.registerSubclass(Device.class);
      // Add your initialization code here
Parse.initialize(this, "qKYdojVtMPjHxhNMJZ8sIlPVdKJQZYlFcaPfhKts", "lgrLheiLQXSX5v58d3XMxgBsethavM2aQMnE27m8");
ParseUser.enableRevocableSessionInBackground();
ParseUser.enableAutomaticUser();
      ParseACL defaultACL = new ParseACL();
      // Optionally enable public read access.
       defaultACL.setPublicReadAccess(true);
defaultACL.setPublicWriteAccess(true);
      ParseACL.setDefaultACL(defaultACL, true);


  }
 
开发者ID:pagesjaunes,项目名称:androidMobileDeviceManager,代码行数:24,代码来源:BootstrapApplication.java


示例15: getMergedOptions

import com.parse.Parse; //导入依赖的package包/类
private Bundle getMergedOptions() {
    // Read activity metadata from AndroidManifest.xml
    ActivityInfo activityInfo = null;
    try {
        activityInfo = getPackageManager().getActivityInfo(
                this.getComponentName(), PackageManager.GET_META_DATA);
    } catch (NameNotFoundException e) {
        if (Parse.getLogLevel() <= Parse.LOG_LEVEL_ERROR &&
                Log.isLoggable("ParseLoginActivity", Log.WARN)) {
            Log.w("ParseLoginActivity", e.getMessage());
        }
    }

    // The options specified in the Intent (from ParseLoginBuilder) will
    // override any duplicate options specified in the activity metadata
    Bundle mergedOptions = new Bundle();
    if (activityInfo != null && activityInfo.metaData != null) {
        mergedOptions.putAll(activityInfo.metaData);
    }
    if (getIntent().getExtras() != null) {
        mergedOptions.putAll(getIntent().getExtras());
    }

    return mergedOptions;
}
 
开发者ID:LibertACAO,项目名称:libertacao-android,代码行数:26,代码来源:ParseLoginActivity.java


示例16: setupParse

import com.parse.Parse; //导入依赖的package包/类
private void setupParse() {
    Parse.initialize(this, getString(R.string.parse_app_id), getString(R.string.parse_client_key));
    ParseFacebookUtils.initialize(this);
    if(ParseUser.getCurrentUser() != null && !UserPreferences.isUserAssociatedWithInstallation()) {
        // This should be done only once
        ParseInstallation currentInstallation = ParseInstallation.getCurrentInstallation();
        currentInstallation.put("user", ParseUser.getCurrentUser());
        currentInstallation.saveInBackground(new SaveCallback() {
            @Override
            public void done(ParseException e) {
                if(e != null) {
                    Timber.d("Error when trying to associate user with installation: " + e.getLocalizedMessage());
                } else {
                    Timber.d("User successfully associated with installation");
                    UserPreferences.setUserAssociatedWithInstallation();
                }
            }
        });
    }
}
 
开发者ID:LibertACAO,项目名称:libertacao-android,代码行数:21,代码来源:MyApp.java


示例17: GitTracker

import com.parse.Parse; //导入依赖的package包/类
private GitTracker(Context context, String accessToken, String repoName, String parseAppId, String parseClientId) {
    this.mContext = context;
    this.mAccessToken = accessToken;
    this.mRepoName = repoName;

    Parse.enableLocalDatastore(mContext);
    Parse.initialize(mContext, parseAppId, parseClientId);

    Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
        @Override
        public void uncaughtException(Thread thread, Throwable exception) {
            handleUncaughtException(exception);
        }
    });

    //Search for old stack traces and upload
    try {
        uploadStackTraces();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
 
开发者ID:nitish-kasturia,项目名称:GitTracker,代码行数:23,代码来源:GitTracker.java


示例18: onCreate

import com.parse.Parse; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    // Enable Local Datastore.
    Parse.enableLocalDatastore(this);
    // Setup Model objects
    ParseObject.registerSubclass(DealModel.class);
    ParseObject.registerSubclass(RestaurantModel.class);
    // Production Database
    //Parse.initialize(this, "2TR1bOpjpFL8Wm7a7TXcbuoFCyJRB0VdSOXnf8tB", "hY2oFPc3k8RJLsZIsadM1Me0JS1ndnwRwim104WK");
    // Setup Parse db connection
    Parse.initialize(this, "zjbuJvWrvzgdpDvRnHejLD008hLGf6zHua5nCGvq", "7DegaPYh670uARgycPIDmt6yQgM2x6XvRDo5o6vI");

    DisplayImageOptions defaultOptions = new DisplayImageOptions.Builder()
            .cacheInMemory(true)
            .cacheOnDisk(true)
            .build();
    ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(this)
            .defaultDisplayImageOptions(defaultOptions)
            .build();
    ImageLoader.getInstance().init(config);
}
 
开发者ID:TheBurrd,项目名称:androidClient,代码行数:24,代码来源:Burrd.java


示例19: onCreate

import com.parse.Parse; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    ParseCrashReporting.enable(this);
    Parse.initialize(this, BuildConfig.PARSE_APPKEY,
            BuildConfig.PARSE_TOKEN);


    ParsePush.subscribeInBackground("wc", new SaveCallback() {
        @Override
        public void done(ParseException e) {
            if (e == null) {
                Log.e("push", "successfully subscribed to the broadcast channel.");
            } else {
                Log.e("push", "failed to subscribe for push", e);
            }
        }
    });
}
 
开发者ID:aagam-shah,项目名称:WordCamp-Android,代码行数:21,代码来源:MyApplication.java


示例20: onCreate

import com.parse.Parse; //导入依赖的package包/类
@Override
public void onCreate()
{
    super.onCreate();
    Parse.initialize(new Parse.Configuration.Builder(this).applicationId(getResources().getString(R.string.app_id)).clientKey(getResources().getString(R.string.client_key)).server("https://parseapi.back4app.com").build());

    ParseInstallation installation = ParseInstallation.getCurrentInstallation();
    installation.put("GCMSenderId", "644469506430");
    installation.saveInBackground();

    FacebookSdk.sdkInitialize(this);
    printHashkey();
    nitems.add(new NavigationItem(R.drawable.search, "Search"));
    nitems.add(new NavigationItem(R.drawable.recent,"Recent"));
    nitems.add(new NavigationItem(R.drawable.npost,"Post"));

    litems.add(new NavigationItem(R.drawable.myposts, "My Posts"));
    //litems.add(new NavigationItem(R.drawable.star,"My Bookmarks"));

}
 
开发者ID:karnikram,项目名称:seglio,代码行数:21,代码来源:Biblio.java



注:本文中的com.parse.Parse类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java OrmLiteSqliteOpenHelper类代码示例发布时间:2022-05-20
下一篇:
Java FailReason类代码示例发布时间:2022-05-20
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap