@@ -277,33 +277,33 @@ private void handleNotification() {
277277 }
278278 }
279279
280- private void initCourseListener () {
281- App .getService ().getCourseAd ().subscribeOn (Schedulers .io ())
282- .observeOn (AndroidSchedulers .mainThread ())
283- .subscribe (new MySubscriber <CourseAdModel >() {
284- @ Override
285- public void onNext (CourseAdModel o ) {
286- super .onNext (o );
287- if ("0" .equals (o .getQpy ().getCourse_open ())) {
288- // open web
289- binding .llCourse .setOnClickListener (v ->
290- QWebViewActivity .start (HomeMainActivity .this , getString (R .string .course ), URL_COURSE ));
291- } else {
292- // open with native
293- binding .llCourse .setOnClickListener (v -> {
294- CourseActivity .start (HomeMainActivity .this );
295- sendEvent (getString (R .string .event_course ));
296- });
297- }
298- }
299-
300- @ Override
301- public void onError (Throwable e ) {
302- binding .llCourse .setOnClickListener (v ->
303- QWebViewActivity .start (HomeMainActivity .this , getString (R .string .course ), URL_COURSE ));
304- }
305- });
306- }
280+ // private void initCourseListener() {
281+ // App.getService().getCourseAd().subscribeOn(Schedulers.io())
282+ // .observeOn(AndroidSchedulers.mainThread())
283+ // .subscribe(new MySubscriber<CourseAdModel>() {
284+ // @Override
285+ // public void onNext(CourseAdModel o) {
286+ // super.onNext(o);
287+ // if ("0".equals(o.getQpy().getCourse_open())) {
288+ // // open web
289+ // binding.llCourse.setOnClickListener(v ->
290+ // QWebViewActivity.start(HomeMainActivity.this, getString(R.string.course), URL_COURSE));
291+ // } else {
292+ // // open with native
293+ // binding.llCourse.setOnClickListener(v -> {
294+ // CourseActivity.start(HomeMainActivity.this);
295+ // sendEvent(getString(R.string.event_course));
296+ // });
297+ // }
298+ // }
299+ //
300+ // @Override
301+ // public void onError(Throwable e) {
302+ // binding.llCourse.setOnClickListener(v ->
303+ // QWebViewActivity.start(HomeMainActivity.this, getString(R.string.course), URL_COURSE));
304+ // }
305+ // });
306+ // }
307307
308308 @ Override
309309 protected void onPause () {
@@ -397,12 +397,19 @@ public void extractRes() {
397397 content = getResources ().openRawResource (t [i ].getInt (a ));
398398 content .reset ();
399399
400- if (sFileName .equals ("samplewebapp.zip" )) {
401- Utils .createDirectoryOnExternalStorage ("qpython/projects/webappsample" );
402- Utils .unzip (content , Environment .getExternalStorageDirectory ().getAbsolutePath () + "/qpython/projects/webappsample/" , true );
400+ if (sFileName .equals ("projects2.zip" )) {
401+ Utils .createDirectoryOnExternalStorage ("qpython/projects/" );
402+ Utils .unzip (content , Environment .getExternalStorageDirectory ().getAbsolutePath () + "/qpython/projects/" , false );
403+
404+ } else if (sFileName .equals ("scripts2.zip" )) {
405+ Utils .unzip (content , Environment .getExternalStorageDirectory ().getAbsolutePath () + "/qpython/scripts/" , false );
406+
407+ } else if (sFileName .equals ("projects3.zip" )) {
408+ Utils .createDirectoryOnExternalStorage ("qpython/projects3/" );
409+ Utils .unzip (content , Environment .getExternalStorageDirectory ().getAbsolutePath () + "/qpython/projects3/" , false );
403410
404- } else if (sFileName .equals ("scripts .zip" )) {
405- Utils .unzip (content , Environment .getExternalStorageDirectory ().getAbsolutePath () + "/qpython/scripts /" , true );
411+ } else if (sFileName .equals ("scripts3 .zip" )) {
412+ Utils .unzip (content , Environment .getExternalStorageDirectory ().getAbsolutePath () + "/qpython/scripts3 /" , false );
406413 }
407414
408415 } catch (Exception e ) {
0 commit comments