Merge branch 'master' of https://github.com/CPM-INDIA-SALES-AND-MARKETING-PVT-LTD/GSKORANGEV1 into Category_G
# Conflicts: # GSKMTOrange/src/main/AndroidManifest.xml # GSKMTOrange/src/main/java/cpm/com/gskmtorange/MainActivity.java
This commit is contained in:
@@ -13,23 +13,18 @@ import cpm.com.gskmtorange.xmlHandlers.TableBean;
|
|||||||
* Created by ashishc on 29-12-2016.
|
* Created by ashishc on 29-12-2016.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class GSKOrangeDB extends SQLiteOpenHelper{
|
public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||||
|
public static final String DATABASE_NAME = "GSK_ORANGE";
|
||||||
|
public static final int DATABASE_VERSION = 13;
|
||||||
public static final String DATABASE_NAME = "GSK_ORANGE";
|
private SQLiteDatabase db;
|
||||||
public static final int DATABASE_VERSION = 13;
|
TableBean tableBean;
|
||||||
private SQLiteDatabase db;
|
|
||||||
TableBean tableBean;
|
|
||||||
|
|
||||||
|
|
||||||
public GSKOrangeDB(Context context) {
|
public GSKOrangeDB(Context context) {
|
||||||
super(context, DATABASE_NAME, null, DATABASE_VERSION);
|
super(context, DATABASE_NAME, null, DATABASE_VERSION);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void open() {
|
public void open() {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
db = this.getWritableDatabase();
|
db = this.getWritableDatabase();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -38,39 +33,26 @@ public class GSKOrangeDB extends SQLiteOpenHelper{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(SQLiteDatabase db) {
|
public void onCreate(SQLiteDatabase db) {
|
||||||
|
|
||||||
db.execSQL(TableBean.getJourneyPlan());
|
db.execSQL(TableBean.getJourneyPlan());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
|
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
|
||||||
|
|
||||||
db.execSQL("DROP TABLE IF EXISTS " + TableBean.getJourneyPlan());
|
db.execSQL("DROP TABLE IF EXISTS " + TableBean.getJourneyPlan());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteTableWithStoreID(String storeid, String process_id) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteTableWithStoreID(String storeid, String process_id){
|
public void deleteAllTables() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteAllTables(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void InsertJCP(JourneyPlanGetterSetter data) {
|
public void InsertJCP(JourneyPlanGetterSetter data) {
|
||||||
|
|
||||||
db.delete("JOURNEY_PLAN", null, null);
|
db.delete("JOURNEY_PLAN", null, null);
|
||||||
|
|
||||||
ContentValues values = new ContentValues();
|
ContentValues values = new ContentValues();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
for (int i = 0; i < data.getSTORE_ID().size(); i++) {
|
for (int i = 0; i < data.getSTORE_ID().size(); i++) {
|
||||||
@@ -110,30 +92,9 @@ public class GSKOrangeDB extends SQLiteOpenHelper{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} catch (Exception ex) {
|
||||||
catch (Exception ex) {
|
|
||||||
Log.d("Exception in JCP", ex.toString());
|
Log.d("Exception in JCP", ex.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ import cpm.com.gskmtorange.R;
|
|||||||
* Created by ashishc on 27-12-2016.
|
* Created by ashishc on 27-12-2016.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallback,GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener, LocationListener{
|
public class GeoTagActivity extends AppCompatActivity {
|
||||||
|
//implements OnMapReadyCallback,GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener, LocationListener{
|
||||||
|
|
||||||
private GoogleMap mMap;
|
private GoogleMap mMap;
|
||||||
double latitude =0.0;
|
double latitude =0.0;
|
||||||
@@ -40,7 +41,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCa
|
|||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
username = preferences.getString(CommonString.KEY_USERNAME, null);
|
//username = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||||
|
|
||||||
|
|
||||||
fab = (FloatingActionButton) findViewById(R.id.fab);
|
fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||||
@@ -51,7 +52,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCa
|
|||||||
|
|
||||||
mapFragment = (SupportMapFragment) getSupportFragmentManager()
|
mapFragment = (SupportMapFragment) getSupportFragmentManager()
|
||||||
.findFragmentById(R.id.map);
|
.findFragmentById(R.id.map);
|
||||||
mapFragment.getMapAsync(this);
|
//mapFragment.getMapAsync(this);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user