Java Code Examples for android.support.multidex.MultiDex#install()

The following examples show how to use android.support.multidex.MultiDex#install() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PalmApp.java    From OmniList with GNU Affero General Public License v3.0 6 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();
    Fabric.with(this, new Crashlytics());

    mInstance = this;

    MultiDex.install(this);

    Colorful.init(this);

    /*
     * Enable stetho only in debug mode. */
    if (BuildConfig.DEBUG) {
        Stetho.initializeWithDefaults(this);
    }

    AlarmsManager.init(getApplicationContext());

    WakeLockManager.init(getApplicationContext(), false);
}
 
Example 2
Source File: ConferenceEntryActivity.java    From PLDroidRTCStreaming with Apache License 2.0 6 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_rtc_conference_config);

    setTitle(R.string.rtc_only);

    mCodecRadioGroup = (RadioGroup) findViewById(R.id.CodecRadioGroup);
    mRTCModeRadioGroup = (RadioGroup) findViewById(R.id.RTCModeGroup);

    mCheckBoxBeauty = (CheckBox) findViewById(R.id.CheckboxBeauty);
    mCheckBoxDebugMode = (CheckBox) findViewById(R.id.CheckboxDebugMode);
    mCheckBoxAudioLevel = (CheckBox) findViewById(R.id.CheckboxAudioLevel);
    mCheckboxEnableStats = (CheckBox) findViewById(R.id.CheckboxEnableStats);

    mRoomEditText = (EditText) findViewById(R.id.RoomNameEditView);
    SharedPreferences preferences = getSharedPreferences(getString(R.string.app_name), Context.MODE_PRIVATE);
    mRoomEditText.setText(preferences.getString("roomName", ""));

    MultiDex.install(this);
}
 
Example 3
Source File: SampleApplicationLike.java    From tinker-manager with Apache License 2.0 6 votes vote down vote up
/**
 * install multiDex before install com.dx168.patchsdk.sample
 * so we don't need to put the com.dx168.patchsdk.sample lib classes in the main dex
 *
 * @param base
 */
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
@Override
public void onBaseContextAttached(Context base) {
    super.onBaseContextAttached(base);
    //you must install multiDex whatever com.dx168.patchsdk.sample is installed!
    MultiDex.install(base);

    SampleTinkerManager.setTinkerApplicationLike(this);
    SampleTinkerManager.initFastCrashProtect();
    //should set before com.dx168.patchsdk.sample is installed
    SampleTinkerManager.setUpgradeRetryEnable(true);

    //optional set logIml, or you can use default debug log
    TinkerInstaller.setLogIml(new SampleTinkerLog());

    //installTinker after load multiDex
    //or you can put com.tencent.com.dx168.patchsdk.sample.** to main dex
    SampleTinkerManager.installTinker(this);
}
 
Example 4
Source File: SampleApplicationLike.java    From tinkerpatch-sample with MIT License 5 votes vote down vote up
/**
 * install multiDex before install tinker
 * so we don't need to put the tinker lib classes in the main dex
 */
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
@Override
public void onBaseContextAttached(Context base) {
    super.onBaseContextAttached(base);
    //you must install multiDex whatever tinker is installed!
    MultiDex.install(base);
}
 
Example 5
Source File: SampleApplicationLike.java    From HotFixDemo with MIT License 5 votes vote down vote up
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
@Override
public void onBaseContextAttached(Context base) {
    super.onBaseContextAttached(base);
    // you must install multiDex whatever tinker is installed!
    MultiDex.install(base);
    // 安装tinker
    Beta.installTinker(this);
}
 
Example 6
Source File: App.java    From InstantAppStarter with MIT License 5 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();
    appComponent = createAppComponent();
    MultiDex.install(this);
    init();
}
 
Example 7
Source File: RTCStreamingEntryActivity.java    From PLDroidRTCStreaming with Apache License 2.0 4 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_rtc_streaming_config);

    setTitle(R.string.rtc_rtmp);

    mCaptureRadioGroup = (RadioGroup) findViewById(R.id.CaptureRadioGroup);
    mCodecRadioGroup = (RadioGroup) findViewById(R.id.CodecRadioGroup);
    mRTCModeRadioGroup = (RadioGroup) findViewById(R.id.RTCModeGroup);
    mBitrateControlRadioGroup = (RadioGroup) findViewById(R.id.bitrate_control_group);

    mCheckBoxBeauty = (CheckBox) findViewById(R.id.CheckboxBeauty);
    mCheckBoxWatermark = (CheckBox) findViewById(R.id.CheckboxWatermark);
    mCheckBoxQuic = (CheckBox) findViewById(R.id.CheckboxQuic);
    mCheckBoxDebugMode = (CheckBox) findViewById(R.id.CheckboxDebugMode);
    mCheckBoxCustomSetting = (CheckBox) findViewById(R.id.CheckboxCustomSetting);
    mCheckBoxAudioLevel = (CheckBox) findViewById(R.id.CheckboxAudioLevel);
    mCheckboxEnableStats = (CheckBox) findViewById(R.id.CheckboxEnableStats);

    mPreviewSizeRatioSpinner = (Spinner) findViewById(R.id.PreviewSizeRatioSpinner);
    mPreviewSizeLevelSpinner = (Spinner) findViewById(R.id.PreviewSizeLevelSpinner);
    mEncodingSizeRatioSpinner = (Spinner) findViewById(R.id.EncodingSizeRatioSpinner);
    mEncodingSizeLevelSpinner = (Spinner) findViewById(R.id.EncodingSizeLevelSpinner);
    mEncodingConfigSpinner = (Spinner) findViewById(R.id.EncodingConfig);
    mVideoProfileSpinner = (Spinner) findViewById(R.id.VideoProfileSpinner);
    mYuvFilterModeSpinner = (Spinner) findViewById(R.id.YuvFilterModeSpinner);
    mVideoProfileText = (TextView) findViewById(R.id.VideoProfileText);

    ArrayAdapter<String> adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, StreamingSettings.PREVIEW_SIZE_RATIO_TIPS_ARRAY);
    mPreviewSizeRatioSpinner.setAdapter(adapter);
    mPreviewSizeRatioSpinner.setSelection(1);

    adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, StreamingSettings.PREVIEW_SIZE_LEVEL_TIPS_ARRAY);
    mPreviewSizeLevelSpinner.setAdapter(adapter);
    mPreviewSizeLevelSpinner.setSelection(1);

    adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, StreamingSettings.ENCODING_SIZE_RATIO_TIPS_ARRAY);
    mEncodingSizeRatioSpinner.setAdapter(adapter);
    mEncodingSizeRatioSpinner.setSelection(1);

    adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, StreamingSettings.ENCODING_SIZE_LEVEL_TIPS_ARRAY);
    mEncodingSizeLevelSpinner.setAdapter(adapter);
    mEncodingSizeLevelSpinner.setSelection(1);

    adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, StreamingSettings.ENCODING_TIPS_ARRAY);
    mEncodingConfigSpinner.setAdapter(adapter);
    mEncodingConfigSpinner.setSelection(0);

    adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, StreamingSettings.VIDEO_QUALITY_PROFILES);
    mVideoProfileSpinner.setAdapter(adapter);
    mVideoProfileSpinner.setSelection(0);

    adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, StreamingSettings.YUV_FILTER_MODE);
    mYuvFilterModeSpinner.setAdapter(adapter);
    mYuvFilterModeSpinner.setSelection(0);

    mCheckBoxCustomSetting.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
        @Override
        public void onCheckedChanged(CompoundButton compoundButton, boolean isChecked) {
            mVideoProfileSpinner.setVisibility(isChecked ? View.VISIBLE : View.GONE);
            mVideoProfileText.setVisibility(isChecked ? View.VISIBLE : View.GONE);
        }
    });

    mRoomEditText = (EditText) findViewById(R.id.RoomNameEditView);
    SharedPreferences preferences = getSharedPreferences(getString(R.string.app_name), Context.MODE_PRIVATE);
    mRoomEditText.setText(preferences.getString("roomName", ""));

    MultiDex.install(this);
    try {
        PLNetworkManager.getInstance().startDnsCacheService(this);
    } catch (UnknownHostException e) {
        e.printStackTrace();
    }

    mProgressDialog = new ProgressDialog(this);
}
 
Example 8
Source File: MainApplication.java    From relight with Apache License 2.0 4 votes vote down vote up
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    MultiDex.install(this);
}
 
Example 9
Source File: MyApp.java    From ImmersionBar with Apache License 2.0 4 votes vote down vote up
@Override
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    MultiDex.install(this);
}
 
Example 10
Source File: JGApplication.java    From o2oa with GNU Affero General Public License v3.0 4 votes vote down vote up
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    MultiDex.install(this);
}
 
Example 11
Source File: SampleApplication.java    From px-android with MIT License 4 votes vote down vote up
@Override
protected void attachBaseContext(final Context base) {
    super.attachBaseContext(base);
    MultiDex.install(this);
}
 
Example 12
Source File: BaseApplication.java    From AndroidUtilCode with Apache License 2.0 4 votes vote down vote up
@Override
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    MultiDex.install(this);
}
 
Example 13
Source File: SophixStubApplication.java    From DanDanPlayForAndroid with MIT License 4 votes vote down vote up
@Override
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    MultiDex.install(this);
    initSophix();
}
 
Example 14
Source File: ThunderBoardApplication.java    From thunderboard-android with Apache License 2.0 4 votes vote down vote up
@Override
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    MultiDex.install(this);
}
 
Example 15
Source File: TyApplication.java    From tysq-android with GNU General Public License v3.0 4 votes vote down vote up
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    MultiDex.install(this);
}
 
Example 16
Source File: AndroidStarterTestRunner.java    From AndroidStarterAlt with Apache License 2.0 4 votes vote down vote up
@Override
public void onCreate(final Bundle poArguments) {
    MultiDex.install(this.getTargetContext());
    super.onCreate(poArguments);
}
 
Example 17
Source File: BaseApp.java    From FastAndroid with Apache License 2.0 4 votes vote down vote up
@Override
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    MultiDex.install(this);
}
 
Example 18
Source File: Fido2DemoActivity.java    From security-samples with Apache License 2.0 4 votes vote down vote up
@Override
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    MultiDex.install(this);
}
 
Example 19
Source File: SFBDemoApplication.java    From skype-android-app-sdk-samples with MIT License 4 votes vote down vote up
@Override
protected void attachBaseContext(Context base) {
     super.attachBaseContext(base);
     MultiDex.install(this);
}
 
Example 20
Source File: App.java    From dapp-wallet-demo with Apache License 2.0 4 votes vote down vote up
@Override
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    MultiDex.install(base);
}