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


Java Bmob.initialize方法代碼示例

本文整理匯總了Java中cn.bmob.v3.Bmob.initialize方法的典型用法代碼示例。如果您正苦於以下問題:Java Bmob.initialize方法的具體用法?Java Bmob.initialize怎麽用?Java Bmob.initialize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在cn.bmob.v3.Bmob的用法示例。


在下文中一共展示了Bmob.initialize方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onCreate

import cn.bmob.v3.Bmob; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    CrashReport.initCrashReport(getApplicationContext(), "e1a62089c6", false);
    ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this)
            .setProgressiveJpegConfig(new SimpleProgressiveJpegConfig())
            .build();
    Fresco.initialize(this, config);
    SDKInitializer.initialize(this);
    Bmob.initialize(this, "b0cb494256d9b86fc931ca930a055b75");
    Logger.addLogAdapter(new AndroidLogAdapter(){
        @Override
        public boolean isLoggable(int priority, String tag) {
            return true;// TODO: 2017/6/5
        }
    });
    sInstance = this;
    initUser();
}
 
開發者ID:yiwent,項目名稱:Mobike,代碼行數:20,代碼來源:MyApplication.java

示例2: onCreate

import cn.bmob.v3.Bmob; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();

    mContext = getApplicationContext();

    //初始化 Bugly
    CrashReport.initCrashReport(getApplicationContext(), StaticClass.BUGLY_APP_ID, true);

    //初始化 Bmob
    Bmob.initialize(this, StaticClass.BMOB_APP_ID);

    //初始化語音識別
    SpeechUtility.createUtility(getApplicationContext(), SpeechConstant.APPID + "=" +
            StaticClass.VOICE_KEY);

    //初始化百度地圖
    SDKInitializer.initialize(getApplicationContext());

    //初始化litepal
    LitePalApplication.initialize(getApplicationContext());
}
 
開發者ID:Hultron,項目名稱:LifeHelper,代碼行數:23,代碼來源:BaseApplication.java

示例3: onCreate

import cn.bmob.v3.Bmob; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_my_sign);

    mUserSign = (FrameLayout) findViewById(R.id.user_sign);

    mSign = View.inflate(this, R.layout.activity_sign,null);
    phoneSign = View.inflate(this, R.layout.sign_by_phone,null);
    emailSign = View.inflate(this, R.layout.sign_by_email,null);

    BmobSMS.initialize(this,"c3afc6b5c969611f04beb79125e3ec2f");
    Bmob.initialize(this, "c3afc6b5c969611f04beb79125e3ec2f");

    initView();

}
 
開發者ID:android-jian,項目名稱:signtest,代碼行數:18,代碼來源:SignActivity.java

示例4: onInit

import cn.bmob.v3.Bmob; //導入方法依賴的package包/類
@Override
protected void onInit() {
    super.onInit();
    mProgressDialog = ProgressDialog.show(this, "請稍等", "獲取數據中", true);
    Bmob.initialize(this, "3d9d9f910c51b02eea3d605178911aa5");
    if (BmobUser.getCurrentUser(User.class) == null) {
        startActivity(new Intent(MainActivity.this, LoginActivity.class));
    }

    tabHost = (FragmentTabHost) findViewById(R.id.tabHost);

    View view = navigationView.inflateHeaderView(R.layout.header_layout);
    username = (TextView) view.findViewById(R.id.usernameId);
    headImage = (ImageView) view.findViewById(R.id.headId);
    imgUserInfoBg = (ImageView) view.findViewById(R.id.imgBackground);
    presenter.requestUserInfo();

    initView();
    //初始化TabHost
    initTabHost();
    //初始化pager
    initPager();
    //添加監聽關聯TabHost和viewPager
    bindTabAndPager();
}
 
開發者ID:weimin96,項目名稱:shareNote,代碼行數:26,代碼來源:MainActivity.java

示例5: testSaveAuth

import cn.bmob.v3.Bmob; //導入方法依賴的package包/類
public void testSaveAuth(){
    Bmob.initialize(PineApplication.mContext, "56d23db34c49ab0334c427c034956b15");
    UserAuth auth = new UserAuth();
    auth.setIdentify_unique_id("kevin2");
    auth.setIdentity_type(0);
    auth.setCredential("123456");
    auth.setVerified(true);
    auth.save(PineApplication.mContext, new SaveListener() {
        @Override
        public void onSuccess() {
            Log.e(TAG, "save auth onSuccess ");
        }

        @Override
        public void onFailure(int i, String s) {
            Log.e(TAG, "save auth onFailure " + s);
        }
    });
}
 
開發者ID:DroidKOF,項目名稱:pineapple,代碼行數:20,代碼來源:AccountServiceTest.java

示例6: Bmobnitialize

import cn.bmob.v3.Bmob; //導入方法依賴的package包/類
public static void Bmobnitialize(Context context, long connectTimeout, int blockSize, long expiration, boolean configBoolean) {
    //第一:默認初始化
    Bmob.initialize(context, BmobConf.BMOB_APP_ID);

    if (configBoolean){
        //第二:自v3.4.7版本開始,設置BmobConfig,允許設置請求超時時間、文件分片上傳時每片的大小、文件的過期時間(單位為秒),
        BmobConfig config =new BmobConfig.Builder(context)
                //設置appkey
                .setApplicationId(BmobConf.BMOB_APP_ID)
                //請求超時時間(單位為秒):默認15s
                .setConnectTimeout(connectTimeout)
                //文件分片上傳時每片的大小(單位字節),默認512*1024
                .setUploadBlockSize(blockSize)
                //文件的過期時間(單位為秒):默認1800s
                .setFileExpiration(expiration)
                .build();
        Bmob.initialize(config);
    }
}
 
開發者ID:InnoFang,項目名稱:ChangTu,代碼行數:20,代碼來源:BmobConf.java

示例7: onCreate

import cn.bmob.v3.Bmob; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.activity_guide);
    mViewPager = (ViewPager) findViewById(R.id.vp_guide);
    Bmob.initialize(this, Utils.BMOB_APP_KEY);
    initButton();
    initImages();
    initDotView();
    mAccount = new AccountManager();
    mAccount.setUserListener(this);
    AccountManager.getCurrentUser(GuideActivity.this);

    mGuideAdapter = new GuideAdapter(mImage_list);
    mViewPager.setAdapter(mGuideAdapter);
    mViewPager.setOnPageChangeListener(this);
}
 
開發者ID:bluedai180,項目名稱:XiangZiShen,代碼行數:19,代碼來源:GuideActivity.java

示例8: onCreate

import cn.bmob.v3.Bmob; //導入方法依賴的package包/類
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Bmob.initialize(this, "2b77bf16ea2de19f99511df6e59fcad8");
        setContentView(R.layout.activity_main);
        initSystembar();
//        listView = (ListView)findViewById(R.id.listview);
//
//        listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
//            @Override
//            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
//                LiveBean liveBean = (LiveBean)listView.getItemAtPosition(position);
//                if(liveBean != null)
//                {
//                    System.out.println(liveBean.getTvUrl());
//                    LiveActivity.activityStart(MainActivity.this, liveBean.getTvUrl());
//                }
//            }
//        });
//
//        setadapter();
//        queryData();

    }
 
開發者ID:wanliyang1990,項目名稱:WliveTV,代碼行數:25,代碼來源:MainActivity.java

示例9: onCreate

import cn.bmob.v3.Bmob; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    // 初始化BmobSDK
    Bmob.initialize(getApplicationContext(), APP_ID);
    initConfig(getApplicationContext());

    mAppContext = getApplicationContext();
    // 初始化 retrofit
    RetrofitSingleton.init(getApplicationContext());
    CrashHandler.init(new CrashHandler(getApplicationContext()));

    /**
     * 如果存在SD卡則將緩存寫入SD卡,否則寫入手機內存
     */

    if (getApplicationContext().getExternalCacheDir() != null && ExistSDCard()) {
        cacheDir = getApplicationContext().getExternalCacheDir().toString();

    } else {
        cacheDir = getApplicationContext().getCacheDir().toString();
    }
}
 
開發者ID:chenls,項目名稱:Weather,代碼行數:24,代碼來源:BaseApplication.java

示例10: onCreate

import cn.bmob.v3.Bmob; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	 // 初始化 Bmob SDK
       // 使用時請將第二個參數Application ID替換成你在Bmob服務器端創建的Application ID
	Bmob.initialize(this, Constants.BmobAPPID);
	
	requestWindowFeature(Window.FEATURE_NO_TITLE);
	//獲取當前屏幕寬高
	DisplayMetrics metric = new DisplayMetrics();
	getWindowManager().getDefaultDisplay().getMetrics(metric);
	mScreenWidth = metric.widthPixels;
	mScreenHeight = metric.heightPixels;
	
	// 初始化數據
	mContext = this;
	mBmobInstallation = BmobInstallation.getCurrentInstallation(this);
	mInstallationId = BmobInstallation.getInstallationId(this);
	mCurrentUser = BmobUser.getCurrentUser(this, User.class);

	setContentView();
	initViews();
	initListeners();
	initData();
}
 
開發者ID:vell001,項目名稱:VSigner,代碼行數:26,代碼來源:BaseActivity.java

示例11: onCreate

import cn.bmob.v3.Bmob; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);		
	ActionBar bar = getActionBar();
	bar.hide();
	this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
	Bmob.initialize(LoadingActivity.this, "7dba48d154a17b9b57e53c413bc889de");
	SharedPreferences preferences = this.getSharedPreferences("notFirst",MODE_PRIVATE);
	
	notFirst = preferences.getBoolean("notFirst", false);
	if(notFirst){
	getDataAndStartMain();
	}else{
		Intent intent =new Intent(LoadingActivity.this,FirstStart.class);
		startActivity(intent);
		System.out.println("Loading是第一次執行了");
		finish();
	}
	
}
 
開發者ID:Grrsun,項目名稱:colorread,代碼行數:21,代碼來源:LoadingActivity.java

示例12: onCreate

import cn.bmob.v3.Bmob; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mSettings = getSharedPreferences("prefsname", Context.MODE_PRIVATE); //模式為私有
    autoLogin();//自動登錄
    setContentView(R.layout.activity_main);
    //初始化Bmob SDK數據庫服務
    Bmob.initialize(getApplicationContext(), APPID);
    //初始化bugly服務
    CrashReport.initCrashReport(this, "900010093", false);
    //初始化SMSS短信服務
    SMSSDK.initSDK(this, APPKEY, APPSECRET);
    //用戶數據模型
    initView();


}
 
開發者ID:linkezhi,項目名稱:Android-nRF-Toolbox-master,代碼行數:18,代碼來源:MainActivity.java

示例13: onCreate

import cn.bmob.v3.Bmob; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Bmob.initialize(this, "3a39e05d106b31b3f61a8ce842933a8a");
    viewPager = (ViewPager) findViewById(R.id.detail_viewPager);


    WishDetailsPagerAdapter adapter = new WishDetailsPagerAdapter(getViewList());
    viewPager.setAdapter(adapter);
    choosePager();
    setViewPagerOnPageChangeListener(viewPager);

    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar_my_wishes_details);
    toolbar.setNavigationOnClickListener(v -> onBackPressed());
    toolbar.inflateMenu(R.menu.menu_wishes_details);
    toolbar.setOnMenuItemClickListener(this);

}
 
開發者ID:wuapnjie,項目名稱:Timer,代碼行數:19,代碼來源:MyWishDetailsActivity.java

示例14: onCreate

import cn.bmob.v3.Bmob; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_splash);
    Bmob.initialize(this, Config.applicationId);
    BmobChat.getInstance(this).init(Config.applicationId);
    initLocClient();
    IntentFilter iFilter = new IntentFilter();
    iFilter.addAction(SDKInitializer.SDK_BROADTCAST_ACTION_STRING_PERMISSION_CHECK_ERROR);
    iFilter.addAction(SDKInitializer.SDK_BROADCAST_ACTION_STRING_NETWORK_ERROR);
    mReceiver = new BaiduReceiver();
    registerReceiver(mReceiver, iFilter);
    if (CustomApplication.getInstance().getSpUtil().isFirstStart()) {
        mHandler.sendEmptyMessageDelayed(GO_GUIDE, 2000);
    } else if (mUserManager.getCurrentUser() != null) {
        // 每次自動登陸的時候就需要更新下當前位置和好友的資料,因為好友的頭像,昵稱啥的是經常變動的
        updateUserInfos();
        mHandler.sendEmptyMessageDelayed(GO_HOME, 2000);
    } else {
        mHandler.sendEmptyMessageDelayed(GO_LOGIN, 2000);
    }
    CustomApplication.getInstance().getSpUtil().checkUpdate();

}
 
開發者ID:klob,項目名稱:Diandi1.20,代碼行數:25,代碼來源:SplashActivity.java

示例15: onCreate

import cn.bmob.v3.Bmob; //導入方法依賴的package包/類
@Override
public void onCreate() {
	super.onCreate();
	//第一:默認初始化
	Bmob.initialize(this, "6e64317b6509bb503f7d9ab8404bf54c");
	Log.i("onCreate: ","bmob!!!!");
}
 
開發者ID:tony-Shx,項目名稱:Swface,代碼行數:8,代碼來源:MyApplication.java


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