@@ -277,33 +277,33 @@ private void handleNotification() {
277
277
}
278
278
}
279
279
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
+ // }
307
307
308
308
@ Override
309
309
protected void onPause () {
@@ -397,12 +397,19 @@ public void extractRes() {
397
397
content = getResources ().openRawResource (t [i ].getInt (a ));
398
398
content .reset ();
399
399
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 );
403
410
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 );
406
413
}
407
414
408
415
} catch (Exception e ) {
0 commit comments