Proyectos de Subversion Android Microlearning - Nuevo Interface

Rev

Rev 69 | Rev 73 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 69 Rev 71
Línea 33... Línea 33...
33
import android.view.View;
33
import android.view.View;
34
import android.view.inputmethod.InputMethodManager;
34
import android.view.inputmethod.InputMethodManager;
35
import android.widget.PopupMenu;
35
import android.widget.PopupMenu;
36
import android.widget.ProgressBar;
36
import android.widget.ProgressBar;
37
import android.widget.TextView;
37
import android.widget.TextView;
38
import android.widget.Toast;
-
 
Línea 39... Línea 38...
39
 
38
 
40
 
39
 
41
import com.cesams.twogetskills.Configuration;
40
import com.cesams.twogetskills.Configuration;
42
import com.cesams.twogetskills.dao.AnswerDao;
41
import com.cesams.twogetskills.dao.AnswerDao;
43
import com.cesams.twogetskills.dao.AppDatabase;
42
import com.cesams.twogetskills.dao.AppDatabase;
44
import com.cesams.twogetskills.dao.CapsuleDao;
-
 
45
import com.cesams.twogetskills.dao.CompanyDao;
43
import com.cesams.twogetskills.dao.CapsuleDao;
46
import com.cesams.twogetskills.dao.ConfigDao;
44
import com.cesams.twogetskills.dao.CompanyDao;
47
import com.cesams.twogetskills.dao.DatabaseHelper;
45
import com.cesams.twogetskills.dao.DatabaseHelper;
48
import com.cesams.twogetskills.dao.NotificationCenterDao;
46
import com.cesams.twogetskills.dao.NotificationCenterDao;
49
import com.cesams.twogetskills.dao.ProgressDao;
47
import com.cesams.twogetskills.dao.ProgressDao;
Línea 66... Línea 64...
66
import com.cesams.twogetskills.fragment.ProgressFragment;
64
import com.cesams.twogetskills.fragment.ProgressFragment;
67
import com.cesams.twogetskills.fragment.SlideFragment;
65
import com.cesams.twogetskills.fragment.SlideFragment;
68
import com.cesams.twogetskills.fragment.TimelineFragment;
66
import com.cesams.twogetskills.fragment.TimelineFragment;
69
import com.cesams.twogetskills.fragment.TopicFragment;
67
import com.cesams.twogetskills.fragment.TopicFragment;
70
import com.cesams.twogetskills.fragment.UserProfileFragment;
68
import com.cesams.twogetskills.fragment.UserProfileFragment;
71
import com.cesams.twogetskills.fragment.WelcomeFragment;
69
import com.cesams.twogetskills.fragment.MyCapsulesFragment;
72
import com.cesams.twogetskills.library.AesCipher;
-
 
73
import com.cesams.twogetskills.library.Http;
70
import com.cesams.twogetskills.library.Http;
74
import com.cesams.twogetskills.library.MD5;
71
import com.cesams.twogetskills.library.MD5;
75
import com.cesams.twogetskills.library.UniqueID;
72
import com.cesams.twogetskills.library.UniqueID;
76
import com.cesams.twogetskills.entity.Answer;
73
import com.cesams.twogetskills.entity.Answer;
77
import com.cesams.twogetskills.entity.Capsule;
74
import com.cesams.twogetskills.entity.Capsule;
Línea 181... Línea 178...
181
 
178
 
Línea 182... Línea 179...
182
        Log.d(TAG, "MainActivity onCreate");
179
        Log.d(TAG, "MainActivity onCreate");
Línea 183... Línea 180...
183
 
180
 
Línea 184... Línea 181...
184
        mAppDatabase = DatabaseHelper.getInstance(getApplicationContext()).getAppDatabase();
181
        mAppDatabase = DatabaseHelper.getInstance(getApplicationContext()).getAppDatabase();
185
 
-
 
186
        setNoCapsuleActive();
182
 
Línea 187... Línea 183...
187
 
183
       // setNoCapsuleActive();
188
        preference = Preference.getInstance(getApplicationContext());
184
 
189
 
185
        preference = Preference.getInstance(getApplicationContext());
Línea 248... Línea 244...
248
                    hideKeyboard(mNavigationView);
244
                    hideKeyboard(mNavigationView);
Línea 249... Línea 245...
249
 
245
 
Línea 250... Línea 246...
250
              if(item.getItemId()==R.id.action_home){
246
              if(item.getItemId()==R.id.action_home){
-
 
247
 
251
 
248
                  setTitleActionBar(getString(R.string.app_name));
252
                  setTitleActionBar(getString(R.string.app_name));
249
                  preference.setSourceNavigation(Constants.SOURCE_NAVIGATION_MY_CAPSULES);
Línea 253... Línea 250...
253
                  invokeFragment(Constants.IDX_FRAGMENT_WELCOME);
250
                  invokeFragment(Constants.IDX_FRAGMENT_MY_CAPSULES);
Línea 254... Línea 251...
254
                  mNavigationView.getMenu().getItem(0).setChecked(true);
251
                  mNavigationView.getMenu().getItem(0).setChecked(true);
Línea 255... Línea 252...
255
 
252
 
256
 
253
 
257
              }
254
              }
258
 
255
 
Línea 259... Línea 256...
259
                if(item.getItemId()==R.id.action_topicos){
256
                if(item.getItemId()==R.id.action_topicos){
Línea 368... Línea 365...
368
            e.printStackTrace();
365
            e.printStackTrace();
369
        }
366
        }
Línea 370... Línea 367...
370
 
367
 
Línea -... Línea 368...
-
 
368
    }
371
    }
369
 
372
 
370
    /*
Línea 373... Línea 371...
373
    public void setNoCapsuleActive()
371
    public void setNoCapsuleActive()
Línea 397... Línea 395...
397
 
395
 
398
            configuracion.update(confignueva);
396
            configuracion.update(confignueva);
Línea 399... Línea 397...
399
        }
397
        }
Línea 400... Línea 398...
400
 
398
 
401
 
399
 
402
    }
400
    }*/
Línea 449... Línea 447...
449
            }
447
            }
Línea 450... Línea 448...
450
 
448
 
451
 
449
 
452
        } else {
450
        } else {
453
            if(preference.getFragmentIdxActive() == 0) {
451
            if(preference.getFragmentIdxActive() == 0) {
-
 
452
                invokeFragment(Constants.IDX_FRAGMENT_MY_CAPSULES); //La pantalla principal ahora es Welcome, no Topic
-
 
453
            } else {
-
 
454
                switch (preference.getFragmentIdxActive())
-
 
455
                {
-
 
456
                    case Constants.IDX_FRAGMENT_GALLERY:
-
 
457
                    case Constants.IDX_FRAGMENT_SLIDES:
-
 
458
 
-
 
459
                        if (preference.getCapsuleUuidActive().isEmpty() || preference.getSlideUuidActive().isEmpty()) {
-
 
460
                            invokeFragment(Constants.IDX_FRAGMENT_MY_CAPSULES);
-
 
461
                        } else {
-
 
462
                            invokeFragment(preference.getFragmentIdxActive());
-
 
463
                        }
-
 
464
                        break;
-
 
465
 
-
 
466
                    case Constants.IDX_FRAGMENT_CAPSULES:
-
 
467
                        if (preference.getTopicUuidActive().isEmpty()) {
-
 
468
                            invokeFragment(Constants.IDX_FRAGMENT_MY_CAPSULES);
-
 
469
                        } else {
-
 
470
                            invokeFragment(preference.getFragmentIdxActive());
-
 
471
                        }
-
 
472
                        break;
454
                invokeFragment(Constants.IDX_FRAGMENT_WELCOME); //La pantalla principal ahora es Welcome, no Topic
473
 
-
 
474
                    default :
-
 
475
                        invokeFragment(preference.getFragmentIdxActive());
-
 
476
                        break;
-
 
477
                }
-
 
478
 
455
            } else {
479
 
456
                invokeFragment(preference.getFragmentIdxActive());
480
 
Línea 457... Línea 481...
457
            }
481
            }
Línea 657... Línea 681...
657
        preference.setImage("");
681
        preference.setImage("");
658
        preference.setMaxDateChanges("");
682
        preference.setMaxDateChanges("");
659
        preference.setCompanyCount(0);
683
        preference.setCompanyCount(0);
660
        preference.setCompanyUuidActive("");
684
        preference.setCompanyUuidActive("");
661
        preference.setTopicUuidActive("");
685
        preference.setTopicUuidActive("");
662
      //  preference.setCapsuleUuidActive("");
686
        preference.setCapsuleUuidActive("");
663
        setNoCapsuleActive();
687
       // setNoCapsuleActive();
664
        preference.setSlideUuidActive("");
688
        preference.setSlideUuidActive("");
665
        preference.save();
689
        preference.save();
Línea 666... Línea 690...
666
 
690
 
Línea 695... Línea 719...
695
 
719
 
696
            case Constants.IDX_FRAGMENT_COMPANIES:
720
            case Constants.IDX_FRAGMENT_COMPANIES:
697
            case Constants.IDX_FRAGMENT_TIMELINE  :
721
            case Constants.IDX_FRAGMENT_TIMELINE  :
698
                break;
722
                break;
699
            case Constants.IDX_FRAGMENT_CAPSULES :
-
 
700
 
-
 
701
                if(preference.getOrigenNavigation().equals(""))
-
 
702
                {
-
 
703
                    preference.setOrigennavigation("");
-
 
704
                    setTitleActionBar(getString(R.string.app_name));
723
            case Constants.IDX_FRAGMENT_CAPSULES :
705
                    invokeFragment(Constants.IDX_FRAGMENT_TOPICS);
-
 
706
 
-
 
707
                }
-
 
708
                else {
-
 
709
                    invokeFragment(Constants.IDX_FRAGMENT_CAPSULES);
-
 
710
                }
-
 
711
 
724
                invokeFragment(Constants.IDX_FRAGMENT_TOPICS);
-
 
725
                break;
712
                break;
726
 
Línea 713... Línea 727...
713
            case Constants.IDX_FRAGMENT_FINISH_TOPIC :
727
            case Constants.IDX_FRAGMENT_FINISH_TOPIC :
714
 
728
 
715
                preference.setTopicUuidActive("");
-
 
716
               // preference.setCapsuleUuidActive("");
729
                preference.setTopicUuidActive("");
717
                setNoCapsuleActive();
730
                preference.setCapsuleUuidActive("");
Línea 718... Línea 731...
718
                preference.setSlideUuidActive("");
731
                preference.setSlideUuidActive("");
719
                preference.save();
732
                preference.save();
Línea 720... Línea 733...
720
 
733
 
Línea 721... Línea 734...
721
                invokeFragment(Constants.IDX_FRAGMENT_TOPICS);
734
                invokeFragment(Constants.IDX_FRAGMENT_TOPICS);
722
                return;
-
 
723
 
735
                return;
724
            case Constants.IDX_FRAGMENT_SLIDES :
-
 
725
 
-
 
Línea -... Línea 736...
-
 
736
 
726
                if(preference.getOrigenNavigation().equals("welcome"))
737
            case Constants.IDX_FRAGMENT_SLIDES :
-
 
738
 
727
                {
739
                preference.setSlideUuidActive("");
728
                    preference.setOrigennavigation("");
740
                preference.save();
729
                    setTitleActionBar(getString(R.string.app_name));
741
 
Línea 730... Línea -...
730
                    invokeFragment(Constants.IDX_FRAGMENT_WELCOME);
-
 
731
 
-
 
732
                }
742
                if(preference.getSourceNavigation() == Constants.SOURCE_NAVIGATION_MY_CAPSULES) {
Línea 733... Línea 743...
733
                else {
743
                    setTitleActionBar(getString(R.string.app_name));
734
                    invokeFragment(Constants.IDX_FRAGMENT_CAPSULES);
-
 
735
                }
-
 
736
 
-
 
737
 
-
 
738
 
-
 
739
                return;
-
 
740
 
-
 
741
            case Constants.IDX_FRAGMENT_GALLERY :
-
 
742
 
-
 
743
                if(preference.getOrigenNavigation().equals("welcome"))
744
                    invokeFragment(Constants.IDX_FRAGMENT_MY_CAPSULES);
744
                {
-
 
745
                    preference.setOrigennavigation("");
745
                } else {
Línea 746... Línea 746...
746
                    setTitleActionBar(getString(R.string.app_name));
746
                    invokeFragment(Constants.IDX_FRAGMENT_CAPSULES);
747
                    invokeFragment(Constants.IDX_FRAGMENT_WELCOME);
-
 
748
 
-
 
749
                }
747
                }
750
                else {
748
 
Línea 751... Línea 749...
751
                    invokeFragment(Constants.IDX_FRAGMENT_SLIDES);
749
                return;
752
                }
750
 
Línea 1223... Línea 1221...
1223
                    add = true;
1221
                    add = true;
1224
                    fragment = new UserProfileFragment();
1222
                    fragment = new UserProfileFragment();
1225
                }
1223
                }
1226
                break;
1224
                break;
Línea 1227... Línea 1225...
1227
 
1225
 
1228
            case Constants.IDX_FRAGMENT_WELCOME:
1226
            case Constants.IDX_FRAGMENT_MY_CAPSULES:
1229
               // badgenotification.setVisibility(View.VISIBLE);
1227
               // badgenotification.setVisibility(View.VISIBLE);
1230
                // getSupportActionBar().show();
1228
                // getSupportActionBar().show();
1231
                //  mDrawerToggle.setDrawerIndicatorEnabled(true);
1229
                //  mDrawerToggle.setDrawerIndicatorEnabled(true);
1232
                if(fragmentHashMap.containsKey(fragmentKeyNuevo)) {
1230
                if(fragmentHashMap.containsKey(fragmentKeyNuevo)) {
1233
                    fragment = fragmentHashMap.get(fragmentKeyNuevo);
1231
                    fragment = fragmentHashMap.get(fragmentKeyNuevo);
1234
                } else {
1232
                } else {
1235
                    add = true;
1233
                    add = true;
1236
                    fragment = new WelcomeFragment();
1234
                    fragment = new MyCapsulesFragment();
1237
                  //  Log.e("Vete"," a welcome");
1235
                  //  Log.e("Vete"," a welcome");
1238
                }
1236
                }
Línea 1239... Línea 1237...
1239
                break;
1237
                break;
Línea 1288... Línea 1286...
1288
        Log.d(TAG, "changeTopicActive : " + topicUuid);
1286
        Log.d(TAG, "changeTopicActive : " + topicUuid);
1289
       // Log.e("Guardo", "Topico en Main");
1287
       // Log.e("Guardo", "Topico en Main");
Línea 1290... Línea 1288...
1290
 
1288
 
1291
        preference.setTopicUuidActive(topicUuid);
1289
        preference.setTopicUuidActive(topicUuid);
1292
       // preference.setCapsuleUuidActive("");
1290
       // preference.setCapsuleUuidActive("");
1293
        setNoCapsuleActive();
1291
        //setNoCapsuleActive();
1294
        preference.setSlideUuidActive("");
1292
        preference.setSlideUuidActive("");
Línea 1295... Línea 1293...
1295
        preference.save();
1293
        preference.save();
1296
 
1294
 
Línea 1297... Línea 1295...
1297
        invokeFragment(Constants.IDX_FRAGMENT_CAPSULES);
1295
        invokeFragment(Constants.IDX_FRAGMENT_CAPSULES);
1298
    }
1296
    }
1299
 
1297
 
1300
    @Override
1298
    @Override
Línea 1301... Línea -...
1301
    public void changeCapsuleActive(String capsuleUuid)
-
 
1302
    {
1299
    public void changeCapsuleActiveSourceNavigationMyCapsules(String topicUuid, String capsuleUuid)
1303
        Log.d(TAG, "changeCapsuleActive : " + capsuleUuid);
1300
    {
1304
 
1301
        Log.d(TAG, "changeCapsuleActiveSourceNavigationMyCapsules topicUuid : " + topicUuid + " capsuleUuid : " + capsuleUuid );
-
 
1302
 
1305
 
1303
        preference.setTopicUuidActive(topicUuid);
Línea 1306... Línea -...
1306
     //   preference.setCapsuleUuidActive(capsuleUuid);
-
 
1307
        setCapsulaActiva(capsuleUuid);
1304
        preference.setCapsuleUuidActive(capsuleUuid);
Línea 1308... Línea 1305...
1308
        preference.setSlideUuidActive("");
1305
        preference.setSlideUuidActive("");
-
 
1306
        preference.setSourceNavigation(Constants.SOURCE_NAVIGATION_MY_CAPSULES);
-
 
1307
        preference.save();
1309
        preference.save();
1308
 
1310
 
1309
        invokeFragment(Constants.IDX_FRAGMENT_SLIDES);
1311
        Progress progress; ProgressDao progressDao = getDatabase().getProgressDao();
1310
 
1312
        progress = progressDao.selectByCapsuleUuid(capsuleUuid);
1311
        ProgressDao progressDao = getDatabase().getProgressDao();
1313
 
-
 
1314
        if(progress != null) {
1312
        Progress progress = progressDao.selectByCapsuleUuid(capsuleUuid);
-
 
1313
 
-
 
1314
        if (progress != null && progress.getCompleted() == 1) {
1315
            if (progress.getProgress() >= 100 && progress.getCompleted() == 1) {
1315
            invokeFragment(Constants.IDX_FRAGMENT_DETAIL_CAPSULE);
-
 
1316
        } else {
1316
                invokeFragment(Constants.IDX_FRAGMENT_DETAIL_CAPSULE);
1317
            invokeFragment(Constants.IDX_FRAGMENT_SLIDES);
-
 
1318
        }
-
 
1319
    }
-
 
1320
 
-
 
1321
    @Override
-
 
1322
    public void changeCapsuleActiveSourceNavigationTopics(String capsuleUuid)
-
 
1323
    {
-
 
1324
        Log.d(TAG, "changeCapsuleActiveSourceNavigationTopics capsuleUuid : " + capsuleUuid );
-
 
1325
 
-
 
1326
        preference.setCapsuleUuidActive(capsuleUuid);
-
 
1327
        preference.setSlideUuidActive("");
-
 
1328
        preference.setSourceNavigation(Constants.SOURCE_NAVIGATION_TOPICS);
-
 
1329
        preference.save();
-
 
1330
 
1317
            } else {
1331
        ProgressDao progressDao = getDatabase().getProgressDao();
-
 
1332
        Progress progress = progressDao.selectByCapsuleUuid(capsuleUuid);
-
 
1333
 
-
 
1334
        if (progress != null && progress.getCompleted() == 1) {
-
 
1335
            invokeFragment(Constants.IDX_FRAGMENT_DETAIL_CAPSULE);
-
 
1336
        } else {
-
 
1337
            invokeFragment(Constants.IDX_FRAGMENT_SLIDES);
-
 
1338
        }
-
 
1339
    }
-
 
1340
 
-
 
1341
    @Override
-
 
1342
    public void changeCapsuleActive(String capsuleUuid)
-
 
1343
    {
-
 
1344
        Log.d(TAG, "changeCapsuleActive capsuleUuid : " + capsuleUuid );
-
 
1345
 
Línea -... Línea 1346...
-
 
1346
        preference.setCapsuleUuidActive(capsuleUuid);
-
 
1347
        preference.setSlideUuidActive("");
-
 
1348
        preference.save();
-
 
1349
 
1318
                invokeFragment(Constants.IDX_FRAGMENT_SLIDES);
1350
        ProgressDao progressDao = getDatabase().getProgressDao();
1319
            }
1351
        Progress progress = progressDao.selectByCapsuleUuid(capsuleUuid);
Línea -... Línea 1352...
-
 
1352
 
1320
        }
1353
        if (progress != null && progress.getCompleted() == 1) {
Línea 1321... Línea 1354...
1321
        else
1354
            invokeFragment(Constants.IDX_FRAGMENT_DETAIL_CAPSULE);
Línea 1322... Línea 1355...
1322
        {
1355
        } else {
Línea 1338... Línea 1371...
1338
        confignueva.setNow(capsuleUuid);
1371
        confignueva.setNow(capsuleUuid);
Línea 1339... Línea 1372...
1339
 
1372
 
1340
        configuracion.update(confignueva);
1373
        configuracion.update(confignueva);
Línea -... Línea 1374...
-
 
1374
    }
-
 
1375
 
1341
    }
1376
     */
1342
 
1377
 
1343
    @Override
1378
    @Override
1344
    public void changeCompanyActive(String companyUuid)
1379
    public void changeCompanyActive(String companyUuid)
Línea 1369... Línea 1404...
1369
 
1404
 
1370
        }
1405
        }
Línea 1371... Línea 1406...
1371
    }
1406
    }
-
 
1407
 
-
 
1408
    @Override
-
 
1409
    public int getSourceNavigation() {
-
 
1410
        return preference.getSourceNavigation();
-
 
1411
    }
-
 
1412
 
-
 
1413
    @Override
-
 
1414
    public
-
 
1415
    void setSourceNavigation(int sourceNavigation) {
-
 
1416
        preference.setSourceNavigation(sourceNavigation);
-
 
1417
    }
-
 
1418
 
-
 
1419
    @Override
-
 
1420
    public void setTopicUuidActive(String topicUuid) {
-
 
1421
        preference.setTopicUuidActive(topicUuid);
-
 
1422
    }
-
 
1423
 
-
 
1424
    @Override
-
 
1425
    public void setCapsuleUuidActive(String capsuleUuid) {
-
 
1426
        preference.setCapsuleUuidActive(capsuleUuid);
-
 
1427
    }
-
 
1428
 
-
 
1429
    @Override
-
 
1430
    public void setSlideUuidActive(String slideUuid) {
-
 
1431
        preference.setSlideUuidActive(slideUuid);
-
 
1432
    }
1372
 
1433
 
1373
    @Override
1434
    @Override
1374
    public String getTopicUuidActive()
1435
    public String getTopicUuidActive()
1375
    {
1436
    {
Línea 1376... Línea 1437...
1376
        return preference.getTopicUuidActive();
1437
        return preference.getTopicUuidActive();
1377
    }
1438
    }
1378
 
1439
 
1379
    @Override
1440
    @Override
1380
    public String getCapsuleUuidActive()
-
 
1381
    {
-
 
1382
       // return preference.getCapsuleUuidActive();
-
 
1383
 
-
 
1384
        ConfigDao configuracion =  mAppDatabase.getConfigDao();
-
 
1385
        Config config = configuracion.selectConfigByTitle("act_capsule");
1441
    public String getCapsuleUuidActive()
Línea 1386... Línea 1442...
1386
      //  Log.e("algo","aqui"+config.getNow());
1442
    {
1387
        return config.getNow();
1443
        return preference.getCapsuleUuidActive();
1388
    }
1444
    }
Línea 1585... Línea 1641...
1585
        } else {
1641
        } else {
1586
            newRecord = false;
1642
            newRecord = false;
1587
            progressCapsule.setViewSlides(viewSlides);
1643
            progressCapsule.setViewSlides(viewSlides);
1588
            progressCapsule.setTotalSlides(totalSlides);
1644
            progressCapsule.setTotalSlides(totalSlides);
1589
            progressCapsule.setProgress(percentaje);
1645
            progressCapsule.setProgress(percentaje);
-
 
1646
            progressCapsule.setUpdatedOn(dateOn);
Línea 1590... Línea 1647...
1590
 
1647
 
1591
            Log.d(TAG, "Progress Capsule : getLastCapsuleActive : " + preference.getLastCapsuleUuidActive());
1648
            Log.d(TAG, "Progress Capsule : getLastCapsuleActive : " + preference.getLastCapsuleUuidActive());
Línea 1592... Línea 1649...
1592
           // Log.d(TAG, "Progress Capsule : CapsuleActive : " + preference.getCapsuleUuidActive());
1649
           // Log.d(TAG, "Progress Capsule : CapsuleActive : " + preference.getCapsuleUuidActive());
Línea 2304... Línea 2361...
2304
                            capsule.setDescription(objCapsule.getString("description"));
2361
                            capsule.setDescription(objCapsule.getString("description"));
2305
                            capsule.setImage(objCapsule.getString("image"));
2362
                            capsule.setImage(objCapsule.getString("image"));
2306
                            capsule.setPosition(objCapsule.getInt("position"));
2363
                            capsule.setPosition(objCapsule.getInt("position"));
2307
                            capsule.setAddedOn(objCapsule.getString("added_on"));
2364
                            capsule.setAddedOn(objCapsule.getString("added_on"));
2308
                            capsule.setUpdatedOn(objCapsule.getString("updated_on"));
2365
                            capsule.setUpdatedOn(objCapsule.getString("updated_on"));
2309
                            capsule.setLink_comments(objCapsule.getString("link_comments"));
2366
                            capsule.setLinkComments(objCapsule.getString("link_comments"));
2310
                            capsule.setLink_comment_add(objCapsule.getString("link_comment_add"));
2367
                            capsule.setLinkCommentAdd(objCapsule.getString("link_comment_add"));
2311
                            capsule.setTotal_comments(objCapsule.getInt("total_comments"));
2368
                            capsule.setTotalComments(objCapsule.getInt("total_comments"));
2312
                            capsule.setTotal_rating(objCapsule.getInt("total_rating"));
2369
                            capsule.setTotalRating(objCapsule.getInt("total_rating"));
2313
 
-
 
2314
                            Log.e("link1",""+objCapsule.getString("link_comments"));
-
 
2315
                            Log.e("link2",""+objCapsule.getString("link_comment_add"));
-
 
2316
                            Log.e("totalcom",""+objCapsule.getInt("total_comments"));
-
 
2317
                            Log.e("totalta",""+objCapsule.getInt("total_rating"));
-
 
Línea 2318... Línea 2370...
2318
 
2370
 
2319
                            // Log.e("Capsula ","added on"+objCapsule.getString("added_on"));
2371
                            // Log.e("Capsula ","added on"+objCapsule.getString("added_on"));
Línea 2320... Línea 2372...
2320
                            capsuleDao.insert(capsule);
2372
                            capsuleDao.insert(capsule);
Línea 2326... Línea 2378...
2326
                            capsule.setDescription(objCapsule.getString("description"));
2378
                            capsule.setDescription(objCapsule.getString("description"));
2327
                            capsule.setImage(objCapsule.getString("image"));
2379
                            capsule.setImage(objCapsule.getString("image"));
2328
                            capsule.setPosition(objCapsule.getInt("position"));
2380
                            capsule.setPosition(objCapsule.getInt("position"));
2329
                            capsule.setAddedOn(objCapsule.getString("added_on"));
2381
                            capsule.setAddedOn(objCapsule.getString("added_on"));
2330
                            capsule.setUpdatedOn(objCapsule.getString("updated_on"));
2382
                            capsule.setUpdatedOn(objCapsule.getString("updated_on"));
2331
                            capsule.setLink_comments(objCapsule.getString("link_comments"));
2383
                            capsule.setLinkComments(objCapsule.getString("link_comments"));
2332
                            capsule.setLink_comment_add(objCapsule.getString("link_comment_add"));
2384
                            capsule.setLinkCommentAdd(objCapsule.getString("link_comment_add"));
2333
                            capsule.setTotal_comments(objCapsule.getInt("total_comments"));
2385
                            capsule.setTotalComments(objCapsule.getInt("total_comments"));
2334
                            capsule.setTotal_rating(objCapsule.getInt("total_rating"));
2386
                            capsule.setTotalRating(objCapsule.getInt("total_rating"));
2335
                           // Log.e("Capsula ","added on"+objCapsule.getString("added_on"));
2387
                           // Log.e("Capsula ","added on"+objCapsule.getString("added_on"));
2336
                            capsuleDao.update(capsule);
2388
                            capsuleDao.update(capsule);
2337
                        }
2389
                        }