dbclass1
This commit is contained in:
@@ -28,6 +28,7 @@ import java.io.StringReader;
|
|||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
|
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||||
import cpm.com.gskmtorange.LoginActivity;
|
import cpm.com.gskmtorange.LoginActivity;
|
||||||
import cpm.com.gskmtorange.R;
|
import cpm.com.gskmtorange.R;
|
||||||
import cpm.com.gskmtorange.constant.CommonString;
|
import cpm.com.gskmtorange.constant.CommonString;
|
||||||
@@ -44,7 +45,7 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
private TextView percentage, message;
|
private TextView percentage, message;
|
||||||
Data data;
|
Data data;
|
||||||
int eventType;
|
int eventType;
|
||||||
|
GSKOrangeDB db;
|
||||||
private SharedPreferences preferences = null;
|
private SharedPreferences preferences = null;
|
||||||
String userId, culture_id;
|
String userId, culture_id;
|
||||||
|
|
||||||
@@ -57,6 +58,8 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_download);
|
setContentView(R.layout.activity_download);
|
||||||
|
|
||||||
|
db = new GSKOrangeDB(this);
|
||||||
|
|
||||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
userId = preferences.getString(CommonString.KEY_USERNAME, null);
|
userId = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||||
culture_id = preferences.getString(CommonString.KEY_CULTURE_ID, null);
|
culture_id = preferences.getString(CommonString.KEY_CULTURE_ID, null);
|
||||||
@@ -310,6 +313,28 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
publishProgress(data);
|
publishProgress(data);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
db.open();
|
||||||
|
|
||||||
|
db.InsertJCP(jcpgettersetter);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}catch (MalformedURLException e) {
|
}catch (MalformedURLException e) {
|
||||||
|
|
||||||
/*final AlertMessage message = new AlertMessage(
|
/*final AlertMessage message = new AlertMessage(
|
||||||
|
|||||||
Reference in New Issue
Block a user