[android-developers]

2011-11-08 Thread kirti waykole
hello friends,
  I am designing new application in that application i want to connect
two android pad via WiFi.
Please guide me
can implement video calling with in network. i want to access another
device camera for video calling.

Please help me..

thanks in advance

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Help for IP camera

2011-09-27 Thread kirti waykole
yes i want live video .. on my device..

On Mon, Sep 26, 2011 at 7:30 PM, J Handal  wrote:

>
> Hi Kirti,
>
> "directly coonect through cross cable to my pc now for testing on
> emulator."
>
> Are you streaming live video?
>
>
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] How to communicate two android device

2011-09-17 Thread kirti waykole
hello friends,
  I am new in android. I want to communicate two android device .
Blue-tooth is there but I want another option for communicating two
device. Please Help me for this to solve.

thanks in advance.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Help for IP camera

2011-09-14 Thread kirti waykole
directly coonect through cross cable to my pc now for testing on emulator.

On 9/14/11, swapnil26sharma  wrote:
> is there any proxy or directly from internet ?
>
> On Sep 14, 12:18 am, kirti waykole  wrote:
>> hello Friends,
>>  I want use IP camera in my application just to capture image or
>> video. As i am new in android . Please help me for how i can use IP
>> camera in my program.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Help for IP camera

2011-09-14 Thread kirti waykole
hello Friends,
 I want use IP camera in my application just to capture image or
video. As i am new in android . Please help me for how i can use IP
camera in my program.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] [android-discuss] Help for IP Camera

2011-09-14 Thread kirti waykole
hello Friends,
 I want use IP camera in my application just to capture image or
video. As i am new in android . Please help me for how i can use IP
camera in my program.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] ListView and Database

2011-08-29 Thread kirti waykole
Hello Friends,
  i want to display selected column from database in the form of list. But
application is forcibly closed when I try to  run this application.  Please
help to solve this bug.
Here is my code,
main Activity


package com.example.android;

import android.app.AlertDialog;
import android.app.Dialog;
import android.app.ListActivity;
import android.content.ContentValues;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.provider.BaseColumns;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;

import android.widget.EditText;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;
import android.widget.Toast;

public class SQLiteDemo extends ListActivity {
private static final int DIALOG_ID = 100;

private SQLiteDatabase database;

private SimpleCursorAdapter dataSource;

private View entryView;

private EditText firstNameEditor;

private EditText lastNameEditor;
DBHelper helper;
Cursor cursor;
String t,t1;
Intent intent;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
helper = new DBHelper(this);

fillData();
 }

private void fillData()
{
//Cursor c=helper.getAllEmployees();
 Cursor c = helper.fetchAllNotes();
//startManagingCursor(c);
 String[] from = new String[] { DBHelper.colName};
 int[] to = new int[] {R.id.first};

dataSource = new SimpleCursorAdapter(this, R.layout.row1, c, from,to);
ListView view = getListView();
view.setHeaderDividersEnabled(true);
view.addHeaderView(getLayoutInflater().inflate(R.layout.row1, null));

setListAdapter(dataSource);
}

 @Override
protected void onListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id);
// Get the item that was clicked
 int p1=position-1;
 cursor = (Cursor)this.getListAdapter().getItem(p1);
 t = cursor.getString(cursor.getColumnIndex(DBHelper.colName));
 t1 = cursor.getString(cursor.getColumnIndex(DBHelper.colDate));
intent=new Intent(this,Edit.class);
intent.putExtra("first",t);
intent.putExtra("last",t1);
startActivity(intent);
 //showDialog(DIALOG_ID);
Toast.makeText(this, "You selected: " + t +" "+t1,
Toast.LENGTH_LONG).show();
}
}


this my Xml file


http://schemas.android.com/apk/res/android";
android:layout_height="wrap_content" android:id="@+id/rowLayout"
android:orientation="horizontal" android:layout_width="fill_parent">




-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] IP Camera

2011-08-24 Thread kirti waykole
Hello Friends,
  I am going to design new application for my Apad .I want to use IP camera
out side the door. When I click on my ip camera Icon on Apad then it shows
doors front preview. Please Guide me to proceed . How the Ip camera use in
program. Please help me.

Thanks in Advance

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Database and ListView

2011-08-16 Thread kirti waykole
hello friends,

 I am displaying data from database in listview. when i select any
row, that row detail should display into toast or into Dialog box .
Here i am using Toast. But instead of displaying the names it shows
android.SQLite@4376f048.

Please help me how i solve this problem

this is my main Activity:


package org.kah;

import android.app.AlertDialog;
import android.app.Dialog;
import android.app.ListActivity;
import android.content.ContentValues;
import android.content.DialogInterface;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.provider.BaseColumns;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.CursorAdapter;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;
import android.widget.Toast;


public class SQLiteDemo extends ListActivity
{
private static final int DIALOG_ID = 100;

private SQLiteDatabase database;

private CursorAdapter dataSource;

private View entryView;

private EditText firstNameEditor;

private EditText lastNameEditor;

private static final String fields[] = { "first", "last", 
BaseColumns._ID };

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
DatabaseHelper helper = new DatabaseHelper(this);
database = helper.getWritableDatabase();
Cursor data = database.query("names", fields, null, null, null, 
null,
null);

dataSource = new SimpleCursorAdapter(this, R.layout.row, data, 
fields,
new int[] { R.id.first, R.id.last });

ListView view = getListView();
view.setHeaderDividersEnabled(true);
view.addHeaderView(getLayoutInflater().inflate(R.layout.row, 
null));

setListAdapter(dataSource);
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
menu.add(0, DIALOG_ID, 1, R.string.addItem);
return true;
}

@Override
protected void onListItemClick(ListView l, View v, int position, long 
id) {
super.onListItemClick(l, v, position, id);
// Get the item that was clicked
Object o = this.getListAdapter().getItem(position);
String keyword = o.toString();
Toast.makeText(this, "You selected: " + keyword, 
Toast.LENGTH_LONG)
.show();
}

@Override
public boolean onMenuItemSelected(int featureId, MenuItem item) {
if (item.getItemId() == DIALOG_ID) {
showDialog(DIALOG_ID);
}
return true;
}

@Override
protected Dialog onCreateDialog(int id)
{
AlertDialog.Builder builder = new AlertDialog.Builder(this);
entryView = getLayoutInflater().inflate(R.layout.entry, null);
builder.setView(entryView);
firstNameEditor = (EditText) 
entryView.findViewById(R.id.firstName);
lastNameEditor = (EditText) 
entryView.findViewById(R.id.lastName);
builder.setTitle(R.string.addDialogTitle);
builder.setPositiveButton(R.string.addItem,
new DialogInterface.OnClickListener() {

@Override
public void onClick(DialogInterface 
dialog, int which) {
dialog.dismiss();
ContentValues values = new 
ContentValues();
values.put("first", 
firstNameEditor.getText()
.toString());
values.put("last", 
lastNameEditor.getText().toString());
database.insert("names", null, 
values);

dataSource.getCursor().requery();
}
});

builder.setNegativeButton(R.string.cancelItem,
new DialogInterface.OnClickListener()
{

@Override
public void onClick(DialogInterface 
dialog, int which) {
dialog.cancel();
}
});
return builder.crea

[android-developers] AlarmManager and Service

2011-08-03 Thread kirti waykole
hello friends,
  I am new in android . I want to design a Wake-up Alarm . In this i design
page in that we can set Alarm time and date. all data is sotred in database.
but when i set calender to particular date it wont work. Please help me i
don't  understand where i am going wrong.

this is my Activity

package com.example.android;


import java.util.Calendar;


import android.app.Activity;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Intent;
import android.os.Bundle;
import android.os.SystemClock;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;

public class AlarmServiceActivity extends Activity
{
Toast mToast;
String full="";
PendingIntent pendingIntent;

@Override
public void onCreate(Bundle savedInstanceState)
{

super.onCreate(savedInstanceState);
Intent myIntent = new Intent(AlarmServiceActivity.this,
MyAlarmService.class);
pendingIntent =
PendingIntent.getBroadcast(AlarmServiceActivity.this, 0, myIntent, 0);

setContentView(R.layout.main);

Button start=(Button)findViewById(R.id.start);
start.setOnClickListener(new OnClickListener()
{

@Override
public void onClick(View v)
{
startAlarm();

}

});

}

protected void startAlarm()
{
AlarmManager alarmManager =
(AlarmManager)getSystemService(ALARM_SERVICE);

Calendar calendar = Calendar.getInstance();


int month=calendar.get(Calendar.MONTH);
long firstTime =System.currentTimeMillis();
int month1=month+1;
int date=calendar.get(Calendar.DATE);
int year=calendar.get(Calendar.YEAR);
full=month1+"/"+date+"/"+year;

int h=calendar.get(Calendar.HOUR_OF_DAY);
int m=calendar.get(Calendar.MINUTE);



calendar.set(Calendar.MONTH,8);
calendar.set(Calendar.DATE, 1);
calendar.set(Calendar.YEAR, 2011);

calendar.set(Calendar.HOUR_OF_DAY, 18);
calendar.set(Calendar.MINUTE,18);

calendar.set(Calendar.SECOND, 0);


alarmManager.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP,
calendar.getTimeInMillis(), SystemClock.elapsedRealtime(),
pendingIntent);

// Tell the user about what we did.
if (mToast != null) {
mToast.cancel();
}


mToast = Toast.makeText(AlarmServiceActivity.this, "repeating Alarm
Schedule",
Toast.LENGTH_LONG);
mToast.show();
}
}


this is Receiver . I declared receiver in AndroidManifest.xml

package com.example.android;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

public class MyAlarmService extends BroadcastReceiver
{
String full="";
public static final String ACTION_REFRESH_ALERT_ALARM =
"com.example.android.ACTION_REFRESH_ALERT_ALARM";


@Override
public void onReceive(Context cxt, Intent intent)
{
Intent startIntent = new Intent(cxt, AlarmServiceActivity.class);
cxt.startService(startIntent);

 Toast.makeText(cxt, "Start() "+ full, Toast.LENGTH_LONG).show();

}

}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] how to set reminder for Future event

2011-08-01 Thread kirti waykole
hello friends,
  I am new in android . I am getting problem while using AlarmManager.
i want to use AlarmManager for setting future event. please send me
code for how i set future event. Please guide me.

Thanks in Advance

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] AlarmManager and Service

2011-07-31 Thread kirti waykole
this is main.xml


http://schemas.android.com/apk/res/android";
 android:orientation="vertical"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent"
 >






this is Androidmenifest.xml

http://schemas.android.com/apk/res/android";
  package="com.exercise.AndroidAlarmService"
  android:versionCode="1"
  android:versionName="1.0">













On 7/30/11, narasimha venkat  wrote:
> hi friend
>
> send me the xml file also i am checking
>
> On Fri, Jul 29, 2011 at 12:12 PM, kirti waykole
> wrote:
>
>> Hello,
>>I am new in android. I am using AlarmMagener in my
>> application. i am setting Alarm to some date. now i am giving direct
>> date. when the system date is not equal to hardcoded date alarm in not
>> invoking. But when i change system date to given date still is not
>> invoking.
>>
>> Please help me where i am going wrong and  how i proceed.
>>
>>
>>
>> this is my Activity
>>
>>
>> package com.exercise.AndroidAlarmService;
>>
>> import java.util.Calendar;
>>
>>
>> import android.app.Activity;
>> import android.app.AlarmManager;
>> import android.app.PendingIntent;
>> import android.content.Intent;
>> import android.os.Bundle;
>> import android.os.SystemClock;
>> import android.view.View;
>> import android.widget.Button;
>> import android.widget.Toast;
>>
>> public class AndroidAlarmService extends Activity
>> {
>>
>>
>>private PendingIntent pendingIntent;
>>String full="";
>>
>> @Override
>> public void onCreate(Bundle savedInstanceState)
>> {
>> super.onCreate(savedInstanceState);
>> Intent myIntent = new Intent(AndroidAlarmService.this,
>> MyAlarmService.class);
>>   pendingIntent =
>> PendingIntent.getService(AndroidAlarmService.this, 0, myIntent, 0);
>>
>> setContentView(R.layout.main);
>> Button buttonStart = (Button)findViewById(R.id.startalarm);
>> Button buttonCancel = (Button)findViewById(R.id.cancelalarm);
>>
>> buttonStart.setOnClickListener(new Button.OnClickListener()
>> {
>>
>>  @Override
>> public void onClick(View arg0)
>> {
>>
>>
>>AlarmManager alarmManager =
>> (AlarmManager)getSystemService(ALARM_SERVICE);
>>
>>Calendar calendar =
>> Calendar.getInstance();
>>
>>int month=calendar.get(Calendar.MONTH);
>>int month1=month+1;
>>int date=calendar.get(Calendar.DATE);
>>int year=calendar.get(Calendar.YEAR);
>>full=month1+"/"+date+"/"+year;
>>
>>int
>> h=calendar.get(Calendar.HOUR_OF_DAY);
>>int m=calendar.get(Calendar.MINUTE);
>>
>>calendar.set(Calendar.HOUR_OF_DAY, h);
>>
>>calendar.set(Calendar.MINUTE,55);
>>calendar.set(Calendar.SECOND, 0);
>>calendar.set(Calendar.MILLISECOND, 0);
>>
>>
>>
>>  //calendar.setTimeInMillis(System.currentTimeMillis());
>>//calendar.add(Calendar.SECOND, 10);
>>if(full.equals("7/31/2011"))
>>{
>>
>>  alarmManager.setRepeating(AlarmManager.RTC_WAKEUP,
>> calendar.getTimeInMillis(), SystemClock.elapsedRealtime(),
>> pendingIntent);
>>
>>
>>  Toast.makeText(AndroidAlarmService.this, "Start Alarm
>> " +" "+full+"- "+h+":"+m , Toast.LENGTH_LONG).show();
>>
>>  //Alerts.ShowEmpAddedAlert(this);
>>}
>>}
>>  });
>>
>> buttonCancel.setOnClickListener(new Button.OnClickListener()
>>{
>>
>>  @Override
>>  

[android-developers] AlarmManager and Service

2011-07-28 Thread kirti waykole
Hello,
I am new in android. I am using AlarmMagener in my
application. i am setting Alarm to some date. now i am giving direct
date. when the system date is not equal to hardcoded date alarm in not
invoking. But when i change system date to given date still is not
invoking.

Please help me where i am going wrong and  how i proceed.



this is my Activity


package com.exercise.AndroidAlarmService;

import java.util.Calendar;


import android.app.Activity;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Intent;
import android.os.Bundle;
import android.os.SystemClock;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class AndroidAlarmService extends Activity
{


private PendingIntent pendingIntent;
String full="";

 @Override
 public void onCreate(Bundle savedInstanceState)
 {
 super.onCreate(savedInstanceState);
 Intent myIntent = new Intent(AndroidAlarmService.this,
MyAlarmService.class);
   pendingIntent =
PendingIntent.getService(AndroidAlarmService.this, 0, myIntent, 0);

 setContentView(R.layout.main);
 Button buttonStart = (Button)findViewById(R.id.startalarm);
 Button buttonCancel = (Button)findViewById(R.id.cancelalarm);

 buttonStart.setOnClickListener(new Button.OnClickListener()
 {

  @Override
 public void onClick(View arg0)
 {


AlarmManager alarmManager =
(AlarmManager)getSystemService(ALARM_SERVICE);

Calendar calendar = Calendar.getInstance();

int month=calendar.get(Calendar.MONTH);
int month1=month+1;
int date=calendar.get(Calendar.DATE);
int year=calendar.get(Calendar.YEAR);
full=month1+"/"+date+"/"+year;

int h=calendar.get(Calendar.HOUR_OF_DAY);
int m=calendar.get(Calendar.MINUTE);

calendar.set(Calendar.HOUR_OF_DAY, h);

calendar.set(Calendar.MINUTE,55);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);



//calendar.setTimeInMillis(System.currentTimeMillis());
//calendar.add(Calendar.SECOND, 10);
if(full.equals("7/31/2011"))
{

alarmManager.setRepeating(AlarmManager.RTC_WAKEUP,
calendar.getTimeInMillis(), SystemClock.elapsedRealtime(),
pendingIntent);


Toast.makeText(AndroidAlarmService.this, "Start Alarm
" +" "+full+"- "+h+":"+m , Toast.LENGTH_LONG).show();
//Alerts.ShowEmpAddedAlert(this);
}
}
  });

 buttonCancel.setOnClickListener(new Button.OnClickListener()
{

  @Override
  public void onClick(View arg0)
  {
   // TODO Auto-generated method stub
   AlarmManager alarmManager =
(AlarmManager)getSystemService(ALARM_SERVICE);
   alarmManager.cancel(pendingIntent);

// Tell the user about what we did.

Toast.makeText(AndroidAlarmService.this, "Cancel!",
Toast.LENGTH_LONG).show();
  }
 });

}
}



this is my Service

package com.exercise.AndroidAlarmService;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.widget.Toast;

public class MyAlarmService extends Service {

@Override
public void onCreate() {
 // TODO Auto-generated method stub
 Toast.makeText(this, "MyAlarmService.onCreate()", Toast.LENGTH_LONG).show();
}

@Override
public IBinder onBind(Intent intent) {
 // TODO Auto-generated method stub
 Toast.makeText(this, "MyAlarmService.onBind()", Toast.LENGTH_LONG).show();
 

[android-developers] [android] pending Intent

2011-07-27 Thread kirti waykole
hi,
I am implementing Alarm Manager in my application. I also using Pending
Intent. when i set alarm to current date its working fine. but when i set
alarm for dynamic date its not working. alarm not in invoking after changing
the date.

plz help whats going wrong or something i missed to used in program. pl
guide me

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Date Query

2011-07-25 Thread kirti waykole
thanks to all... to give your valuable feed back

2011/7/25 ΙΟΥΛΙΑ ΓΡΗΓΟΡΙΑΔΟΥ 

>  you could convert you date like this:
>
>  private Date ConvertToDate(String dateString){
>
> SimpleDateFormat dateFormat = new SimpleDateFormat("-MM-dd HH:mm");
>
> Date convertedDate;
> try {
> Log.i("SocialFeedLatestBuzz", "Date before convert =  " + dateString);
>  convertedDate = dateFormat.parse(dateString);
> Log.i("SocialFeedLatestBuzz", "convertedDate =  " + convertedDate);
>
> } catch (ParseException e) {
> Log.i("SocialFeedLatestBuzz", "parse exceptrion " );
>  e.printStackTrace();
> return null;
> }
>
> return convertedDate;
>
>  }
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Date Query

2011-07-25 Thread kirti waykole
hello ,
I am new in Android. I am trying to make reminder system. i made 1 database
and storing all data in that database.
now i want to get date from database in (dd/mm/) format. I want to
compare that date with system .

Plz guide me how can i do this.

thanks in advance

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Query database

2011-07-19 Thread kirti waykole
hello all,
 I am new in android . I have problem with database. Plz see the below code.
database is not creating. Plz help me
thanksin advance

this is my dBHelper class

package com.example.android;



import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;




public class DBHelper extends SQLiteOpenHelper {

static final String dbName="demoDB";
static final String employeeTable="Employees";

static final String colName="EmployeeName";
String colDeptID = "EmployeeID";
static final String viewEmps="ViewEmps";


public DBHelper(Context context) {
super(context, dbName, null,33);

// TODO Auto-generated constructor stub
}

@Override
public void onCreate(SQLiteDatabase db) {
// TODO Auto-generated method stub


db.execSQL("CREATE TABLE "+employeeTable+" ("+colDeptID+ " INTEGER
PRIMARY KEY , "+
colName+ " TEXT)");



}

@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
{
// TODO Auto-generated method stub

db.execSQL("DROP TABLE IF EXISTS "+employeeTable);
//db.execSQL("DROP TABLE IF EXISTS "+deptTable);

db.execSQL("DROP TRIGGER IF EXISTS dept_id_trigger");
db.execSQL("DROP TRIGGER IF EXISTS dept_id_trigger22");
db.execSQL("DROP TRIGGER IF EXISTS fk_empdept_deptid");
db.execSQL("DROP VIEW IF EXISTS "+viewEmps);
onCreate(db);
}

 void AddEmployee(String name)
{


 SQLiteDatabase db= this.getWritableDatabase();


ContentValues cv=new ContentValues();

cv.put(colName,name);

db.insert(employeeTable, colName, cv);
db.close();


}

 int getEmployeeCount()
 {
SQLiteDatabase db=this.getWritableDatabase();
Cursor cur= db.rawQuery("Select * from "+employeeTable, null);
int x= cur.getCount();
cur.close();
return x;
 }

 Cursor getAllEmployees()
 {
 SQLiteDatabase db=this.getWritableDatabase();



 //Cursor cur= db.rawQuery("Select "+colID+" as _id , "+colName+",
"+colAge+" from "+employeeTable, new String [] {});
 Cursor cur= db.rawQuery("SELECT * FROM "+viewEmps,null);
 return cur;

 }


}




this is my Activity class..

package com.example.android;

import android.app.Activity;
import android.app.Dialog;
import android.database.Cursor;
import android.os.Bundle;
import android.text.Spannable;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.SimpleCursorAdapter;
import android.widget.TextView;

public class TryActivity extends Activity
{
EditText txtName;

TextView txtEmps;
DBHelper dbHelper;
//Spinner spinDept;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

txtName=(EditText)findViewById(R.id.nametext);
txtEmps=(TextView)findViewById(R.id.text);

}

@Override
public void onStart()
{
try
{
super.onStart();
dbHelper=new DBHelper(this);

txtEmps.setText(txtEmps.getText()+String.valueOf(dbHelper.getEmployeeCount()));

}


//never close cursor

catch(Exception ex)
{
CatchError(ex.toString());
}
}

public void btnAddEmp_Click(View view)
{
boolean ok=true;
try
{
Spannable spn=txtName.getText();
String name=txtName.getText().toString();

dbHelper.AddEmployee(name);

}
catch(Exception ex)
{
ok=false;
CatchError(ex.toString());
}
finally
{
if(ok)
{
//NotifyEmpAdded();
Alerts.ShowEmpAddedAlert(this);
txtEmps.setText("Number of employees
"+String.valueOf(dbHelper.getEmployeeCount()));
}
}
}

void CatchError(String Exception)
{
Dialog diag=new Dialog(this);
diag.setTitle("Add new Employee");
TextView txt=new TextView(this);
txt.setText(Exception);
diag.setContentView(txt);
diag.show();
}

void NotifyEmpAdded()
{
Dialog diag=new Dialog(this);
diag.setTitle("Add new Employee");
TextView txt=new TextView(this);
txt.setText("Employee Added Successfully");
diag.setContentView(txt);
diag.show();
try {
diag.wait(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
CatchError(e.toString());
}
diag.notify();
diag.dismiss();
}
}

-- 
You received this message because 

[android-developers] Display on Screen

2011-07-15 Thread kirti waykole
hello all,
 I am new in android . I want display all data from database. i am not using
any gridview.on plan Screen i want display all data from database. How
should i do this . plz guide me.
Thanks in advance

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: database query

2011-07-14 Thread kirti waykole
thank you so much for your valuable reply...it works

On Fri, Jul 15, 2011 at 8:09 AM, Chris  wrote:

> http://lmgtfy.com/?q=android+application+database
>
> That should help you.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] database query

2011-07-14 Thread kirti waykole
hello all,
 I am new in android . I want to use database for storing my application
data.Plz tell me how to use database in android application
Thanks in advance

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en