本文整理汇总了Java中com.parse.Parse.initialize方法的典型用法代码示例。如果您正苦于以下问题:Java Parse.initialize方法的具体用法?Java Parse.initialize怎么用?Java Parse.initialize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.parse.Parse
的用法示例。
在下文中一共展示了Parse.initialize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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);
}
}
示例3: 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);
}
示例4: 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);
}
示例5: 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!");
}
}
});
}
示例6: 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);
}
示例7: 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();
}
示例8: 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);
}
示例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, "COLFRcv3xi8naPtnDUHK4QwXpY8E49t9OuBYzKmN", "NJsKhQZ9pSJXPQ1EnMdzptxWxvLyzAp4AihbEdVp");
ParseInstallation.getCurrentInstallation().saveInBackground();
ParseUser.enableAutomaticUser();
ParseACL defaultACL = new ParseACL();
// Optionally enable public read access.
// defaultACL.setPublicReadAccess(true);
ParseACL.setDefaultACL(defaultACL, true);
}
示例10: 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.");
}
示例11: setUp
import com.parse.Parse; //导入方法依赖的package包/类
public void setUp() {
context = this.getInstrumentation().getTargetContext().getApplicationContext();
String YOUR_APPLICATION_ID = "OuWwbxVpRVfWh0v3jHEvYeKuuNijBd6M1fVBlkWA";
String YOUR_CLIENT_KEY = "pYhzGaediLuDVUgQmkuMDkA1DUdKIBtzSziLBdnQ";
Parse.initialize(context, YOUR_APPLICATION_ID, YOUR_CLIENT_KEY);
String loginUser = "nbui";
ParseUser.logInInBackground(loginUser, loginUser, new LogInCallback() {
public void done(ParseUser user, ParseException e) {
}
});
String name = "Dave";
String name1 = "Sara";
double latitude = 20;
double longitude =10;
double latitude1 = 21;
double longitude1 =11;
String Channels= "CMPUT101=active&CMPUT102=unActive";
Bitmap pic = BitmapFactory.decodeResource(context.getResources(), R.drawable.ic_noimage);
users.updateOtherUsersInfo(name, latitude1, longitude1, Channels, pic);
users.updateOtherUsersInfo(name1, latitude, longitude, Channels, pic);
}
示例12: onCreate
import com.parse.Parse; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
ParseObject.registerSubclass(AnywallPost.class);
// Enable Local Datastore.
Parse.enableLocalDatastore(this);
Parse.initialize(this, "pky8sZPYZY5DzyRAGFXFep8pU0MubVDAHYvSlBnm", "zdETW2V9TprpkGfXQJ2JXP1qY6BnEmvdWY841Ojm");
// Parse.initialize(this, "YOUR_PARSE_APPLICATION_ID", "YOUR_PARSE_CLIENT_KEY");
preferences = getSharedPreferences("com.parse.anywall", Context.MODE_PRIVATE);
configHelper = new ConfigHelper();
configHelper.fetchConfigIfNeeded();
}
示例13: 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);
}
}
});
}
示例14: onCreate
import com.parse.Parse; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Parse.enableLocalDatastore(this);
Parse.initialize(this, Constants.getConstant(this, R.string.PARSE_APP_ID),
Constants.getConstant(this, R.string.PARSE_CLIENT_KEY));
Fabric.with(this, new Crashlytics());
Crashlytics.getInstance().setDebugMode(false);
Crashlytics.log(Log.INFO, StarterApplication.class.getName(), "Starting Application - " + System.currentTimeMillis());
NewsCatFileUtil.getInstance(this);
UserPrefUtil.getInstance(this);
ParseConfig.getInBackground(new ConfigCallback() {
@Override
public void done(ParseConfig config, ParseException e) {
ConfigService.getInstance();
ConfigService.getInstance().setInstance(StarterApplication.this);
}
});
}
示例15: onCreate
import com.parse.Parse; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
// Register _ToDo_ class to use with Parse functions
ParseObject.registerSubclass(ParseToDo.class);
ParseObject.registerSubclass(ParseProject.class);
// initializing Parse account with App ID and Client ID
Parse.initialize(this, ParseKeys.APPLICATION_ID,
ParseKeys.CLIENT_KEY);
JSONObject o = new JSONObject();
// initialize SharedPreferences
mSharedPreferencesUserSettings = getSharedPreferences(SHARED_PREFS_USER_SETTINGS, MODE_MULTI_PROCESS);
Utils.setAppContext(getApplicationContext());
}