当前位置: 首页>>代码示例>>Java>>正文


Java Bmob类代码示例

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


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

示例1: onCreate

import cn.bmob.v3.Bmob; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (savedInstanceState != null){
        Log.e("fragment","恢复fragment"+KEY_FRAGMENT_TAG);
        restoreFragments();//恢复fragment
        mFragmentCurrentTag = savedInstanceState.getString(KEY_FRAGMENT_TAG);
    }
    setContentView(R.layout.activity_main);
    ButterKnife.bind(this);
    Bmob.initialize(getApplication(), "8641a3984f7c4a4e3d19558a69423ecf");
    user = BmobUser.getCurrentUser(this, User.class);
    mDrawer = (FlowingDrawer) findViewById(R.id.drawerlayout);
    mDrawer.setTouchMode(ElasticDrawer.TOUCH_MODE_BEZEL);
    mLayouts = new LinearLayout[]{
            layoutHome, layoutCategorize, layoutMore
    };
    setupToolbar();
    setupFeed();
    setupMenu();
    setListener();
    update();
}
 
开发者ID:Break369,项目名称:MyLife,代码行数:24,代码来源:MainActivity.java

示例2: onCreate

import cn.bmob.v3.Bmob; //导入依赖的package包/类
@Override
        public void onCreate() {
                super.onCreate();
//                if (LeakCanary.isInAnalyzerProcess(this)) {
//                        // This process is dedicated to LeakCanary for heap analysis.
//                        // You should not init your app in this process.
//                        return;
//                }
//                LeakCanary.install(this);
                setINSTANCE(this);
                Bmob.initialize(this, Constant.KEY);
                AppStat.i(Constant.KEY, null);
                LogUtil.e("1服务器端初始化完成");
                CustomInstallation.getCurrentInstallation(this).save();
                LogUtil.e("设备ID在这里上传了");
                BmobPush.startWork(this);
                LogUtil.e("推送服务初始化完成");
                initOkHttp();
                initSmallVideo();
                initLocationClient();
//                CrashHandler.getInstance().init(this);
        }
 
开发者ID:HelloChenJinJun,项目名称:TestChat,代码行数:23,代码来源:CustomApplication.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,项目名称:topnews,代码行数: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: 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

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

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

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

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

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

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

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

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

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

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


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