Skip to content
Snippets Groups Projects
Commit c6c1e4d7 authored by Niharika K's avatar Niharika K
Browse files

delete

parent 14a0f031
No related branches found
No related tags found
No related merge requests found
...@@ -30,5 +30,9 @@ dependencies { ...@@ -30,5 +30,9 @@ dependencies {
compile 'com.google.android.gms:play-services:10.0.1' compile 'com.google.android.gms:play-services:10.0.1'
compile 'com.android.support:support-annotations:25.3.1' compile 'com.android.support:support-annotations:25.3.1'
compile 'com.google.android.gms:play-services-maps:10.0.1' compile 'com.google.android.gms:play-services-maps:10.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'
testCompile 'junit:junit:4.12' testCompile 'junit:junit:4.12'
} }
apply plugin: 'com.google.gms.google-services'
\ No newline at end of file
{
"project_info": {
"project_number": "477340074780",
"firebase_url": "https://smart-planner-7b229.firebaseio.com",
"project_id": "smart-planner-7b229",
"storage_bucket": "smart-planner-7b229.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:477340074780:android:18ce7667b55938c5",
"android_client_info": {
"package_name": "com.example.chan24.smartplanner"
}
},
"oauth_client": [
{
"client_id": "477340074780-rrks8jemkjp2oc6ceaa9mcsniu2bmrb3.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.example.chan24.smartplanner",
"certificate_hash": "f53f3fec6181f5d4a0f6d7b2393350dd41fb83cf"
}
},
{
"client_id": "477340074780-djd9ij8k9rg56jd7bol6919uasfqi7f8.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyAiHgVrSYVR46I7knNFRgObAOfTdxXn65g"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 2,
"other_platform_oauth_client": [
{
"client_id": "477340074780-djd9ij8k9rg56jd7bol6919uasfqi7f8.apps.googleusercontent.com",
"client_type": 3
}
]
},
"ads_service": {
"status": 2
}
}
}
],
"configuration_version": "1"
}
\ No newline at end of file
package com.example.chan24.smartplanner;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
/**
* Created by Niharika on 19-04-2017.
*/
public class DatabaseHelper2 extends SQLiteOpenHelper {
final static public String dbname = "ProfileDetails";
final static public String tablename ="ExtraDetails";
final static public String col1 ="Gender";
final static public String col2 ="Age";
final static public String col3= "Phone";
final static public String query ="create table "+tablename+"(Gender varchar(10),Age number(2),Phone number(11))";
public DatabaseHelper2(Context context) {
super(context, dbname, null, 1);
}
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL(query);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
onCreate(db);
}
public boolean insertdata(String gender ,int age ,long phone )
{
SQLiteDatabase db = this.getWritableDatabase();
ContentValues cv= new ContentValues();
cv.put(col1,gender);
cv.put(col2,age);
cv.put(col3,phone);
long res=db.insert(tablename,null,cv);
if(res==-1)
return false;
else
return true;
}
Cursor retriving()
{
SQLiteDatabase db =this.getWritableDatabase();
Cursor c =db.rawQuery("select * from "+tablename,null);
return c;
}
}
...@@ -16,6 +16,8 @@ import android.widget.Toast; ...@@ -16,6 +16,8 @@ import android.widget.Toast;
public class LoginActivity extends AppCompatActivity { public class LoginActivity extends AppCompatActivity {
DatabaseHelper db =new DatabaseHelper(this); DatabaseHelper db =new DatabaseHelper(this);
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
......
...@@ -9,6 +9,7 @@ buildscript { ...@@ -9,6 +9,7 @@ buildscript {
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.0.0'
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment