[android-beginners] Emulator Buzzing and Can't Shutdown

2009-12-13 Thread Jeff
I have created a project using ADT in Eclipse (created the Hello World
app). When I start the emulator, about halfway into the first boot
screen that displays the "Android _" text, my laptop starts buzzing. I
don't think it's coming from the speakers, because nothing happens
when I mute, etc.

Also, when I try to close the emulator, it freezes hardcore. I
couldn't kill it it with Task Manager nor Process Explorer. I tried to
shutdown hoping Windows (XP SP3) would be able to handle it, but the
shutdown process would just hang, too. It would pop-up an End Now
dialog that also didn't work. I have to hold in the power button to
shut down the laptop. I've tried shutting down the emulator using the
power button, but it's stuck on the "Power Off Shutting down..."
screen.

Any ideas?

Eclipse Java EE IDE for Web Developers.
Build id: 20090920-1017

Android Development Tools   0.9.5.v200911191123-20404
Android SDK 2.0 and 2.0.1

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


[android-beginners] Creating Activity From User Clicking Overlay

2009-12-06 Thread Jeff T
I have a MapActivity that creates a  ItemizedOverlay where I am
displaying markers are specific locations. Using the onTap method I
want to start a new Activity with a different screen to sit on top of
the map when a user clicks one of the markers.

Does anyone have a suggestion on how I can accomplish this?

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


[android-beginners] Re: my trouble in displaying "hello,Android"

2009-11-24 Thread Jeff
Check your run as configuration, sometimes programs are set to run in
the background.

On Nov 20, 6:13 am, Julio Huang  wrote:
> Hi,I'm a beginner of Android,I use eclipse3.5+ADT 0.9.4+Android SDK2.0
> As I followed the guide of SDK to display my first "hello Android",I
> met with a problem
>
> the edited code is as follows:
>
> package com.android.hello;
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.widget.TextView;
>
> public class HelloAndroid extends Activity {
>    /** Called when the activity is first created. */
>   �...@override
>    public void onCreate(Bundle savedInstanceState) {
>        super.onCreate(savedInstanceState);
>        TextView tv = new TextView(this);
>        tv.setText("Hello, Android");
>        setContentView(tv);
>    }
>
> }
>
> When I run the program,the output the console is:
> [2009-11-04 21:18:01 - HelloAndroid] --
> [2009-11-04 21:18:01 - HelloAndroid] Android Launch!
> [2009-11-04 21:18:01 - HelloAndroid] adb is running normally.
> [2009-11-04 21:18:01 - HelloAndroid] Launching:
> com.android.hello.helloworld
> [2009-11-04 21:18:01 - HelloAndroid] Automatic Target Mode: launching
> new emulator.
> [2009-11-04 21:18:01 - HelloAndroid] Launching a new emulator.
> [2009-11-04 21:18:06 - HelloAndroid] New emulator found: emulator-5554
> [2009-11-04 21:18:06 - HelloAndroid] Waiting for HOME
> ('android.process.acore') to be launched...
>
> it just keeps hanging there for hours,what is the problem with my
> emulator?

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


[android-beginners] Re: Can't start apps in emulator

2009-11-18 Thread Jeff


On Nov 2, 8:56 am, nickoff  wrote:
> I have Eclipse Galileo with ADT Plugin installed. If i make run, the
> emulator starts but doesn't show the application. What can be wrong?

I had the same problem, and even if you look for the logcat info it
won't be there, as the device is not connected to eclipse. I'm not
entirely sure, but I believe windows firewall was blocking it. The
solution for me was to run ddms from the command line. Then launch an
android device from the command line(note: I had another program
installed which was taking priority over the android commands, so make
sure you're in the tools folder.) You should have some sort of java
virtual device manager pop up in your tray. Hope this helps.

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


[android-beginners] Play sound from Widget

2009-11-11 Thread Jeff
So, I can play sound very easily in my normal application but I can't
figure out for the life of me how play sound from my widget. Anyone
have any ideas?

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


[android-beginners] Re: Displaying Decimals with ListView

2009-08-05 Thread Jeff

Mark,

Thanks for your reply, I was able to get it working.

Here is what I did, with your ideas and also referencing
http://www.anddev.org/gtalk-t1450.html.
public class testListView extends ListActivity {
  ...
  private DecimalFormat myCustDecFormatter = new DecimalFormat
(".00");
  ...
  ...
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState)  {
...
...
...
  }

private void fillData() {
/* Get all of the rows from the database and create the item list
*/
/* for mult accts, pass in acct name? */
mEntryCursor = mDbHelper.fetchAllEntries();
startManagingCursor(mEntryCursor);

// Create an array to specify the fields we want to display in the
list (only TITLE)
String[] from = new String[]
{myDbAdapter.KEY_NMBR,myDbAdapter.KEY_DATE,myDbAdapter.KEY_DESCR,myDbAdapter.KEY_AMT};

// and an array of the fields we want to bind those fields to (in
this case just text1)
int[] to = new int[]{R.id.txtnmbr, R.id.txtdate, R.id.txtdescr,
R.id.txtamt};

// Now create a simple cursor adapter and set it to display
setListAdapter(new SimpleCursorAdapter(this, R.layout.entryrow,
mEntryCursor, from, to) {
@Override
public void setViewText(TextView v, String text) {
  super.setViewText(v, convText(v, text));
}

});

  }

  private String convText(TextView v, String text) {
switch (v.getId()) {
  case R.id.txtamt:
double dblAmt;
//dblAmt = Double.valueOf(text);
dblAmt = mEntryCursor.getDouble(AMT_COLUMN);
return myCustDecFormatter.format(dblAmt);
}
  return text;
}
...
...
...
}//end testListView


On Aug 5, 11:32 am, Mark Murphy  wrote:
> Jeff wrote:
> > Hello, I am creating a program as a learning experience.
>
> > The program keeps a running balance of individual decimal values.
>
> > What is displayed is the balance total, and below that is a list of
> > the individual entries.
>
> > The numbers are all double data type, and saved in the sqlite3
> > database as datatype "REAL NOT NULL".
>
> > When the list is displayed, the balance shows the value correctly,
> > without rounding or cutting off numbers.
>
> > However, the list item numbers get rounded, and as the numbers get
> > bigger, the decimals start getting cut off.
>
> > Any ideas?
>
> You are implicitly relying upon something like Float#toString() to
> display the numeric data.
>
> If you want control over the formatting, you will need to use something
> like setViewText() or a ViewBinder with your SimpleCursorAdapter.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android App Developer Training:http://commonsware.com/training.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Displaying Decimals with ListView

2009-08-05 Thread Jeff

Hello, I am creating a program as a learning experience.

The program keeps a running balance of individual decimal values.

What is displayed is the balance total, and below that is a list of
the individual entries.

The numbers are all double data type, and saved in the sqlite3
database as datatype "REAL NOT NULL".

When the list is displayed, the balance shows the value correctly,
without rounding or cutting off numbers.

However, the list item numbers get rounded, and as the numbers get
bigger, the decimals start getting cut off.

Any ideas?

The xml for the textview:


And the textview gets populated pulling the data from the database
like this:
private void fillData() {
   /* Get all of the rows from the database and create the item list
*/
   /* for mult accts, pass in acct name? */
   mEntryCursor = mDbHelper.fetchAllEntries();
   startManagingCursor(mEntryCursor);

   // Create an array to specify the fields we want to display in the
list (only TITLE)
   String[] from = new String[]
{CheckRegDbAdapter.KEY_CHECKNMBR,CheckRegDbAdapter.KEY_CHECKDATE,CheckRegDbAdapter.KEY_CHECKDESCR,CheckRegDbAdapter.KEY_CHECKAMT};

   // and an array of the fields we want to bind those fields to (in
this case just text1)
   int[] to = new int[]{R.id.txtchknmbr, R.id.txtchkdate,
R.id.txtchkdescr, R.id.txtchkamt};

   // Now create a simple cursor adapter and set it to display
   SimpleCursorAdapter entries =
 new SimpleCursorAdapter(this, R.layout.checkentryrow,
mEntryCursor, from, to);
setListAdapter(entries);

 }

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



[android-beginners] Textview Rounding Issues

2009-08-05 Thread Jeff

Hello, I am creating a program as a learning experience.

The program keeps a running balance of individual decimal values.

What is displayed is the balance total, and below that is a list of
the individual entries.

The numbers are all double data type, and saved in the sqlite3
database as datatype "REAL NOT NULL".

When the list is displayed, the balance shows the value correctly,
without rounding or cutting off numbers.

However, the list item numbers get rounded, and as the numbers get
bigger, the decimals start getting cut off.

Any ideas?

The xml for the textview:
 

And the textview gets populated pulling the data from the database
like this:
private void fillData() {
/* Get all of the rows from the database and create the item list
*/
/* for mult accts, pass in acct name? */
mEntryCursor = mDbHelper.fetchAllEntries();
startManagingCursor(mEntryCursor);

// Create an array to specify the fields we want to display in the
list (only TITLE)
String[] from = new String[]
{CheckRegDbAdapter.KEY_CHECKNMBR,CheckRegDbAdapter.KEY_CHECKDATE,CheckRegDbAdapter.KEY_CHECKDESCR,CheckRegDbAdapter.KEY_CHECKAMT};

// and an array of the fields we want to bind those fields to (in
this case just text1)
int[] to = new int[]{R.id.txtchknmbr, R.id.txtchkdate,
R.id.txtchkdescr, R.id.txtchkamt};

// Now create a simple cursor adapter and set it to display
SimpleCursorAdapter entries =
  new SimpleCursorAdapter(this, R.layout.checkentryrow,
mEntryCursor, from, to);
 setListAdapter(entries);

  }

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



[android-beginners] app crash at startup??

2009-03-24 Thread Jeff

Hello,

my app is crashing at startup and no idea why.  I happens sometimes in
the emulator and most of the time in the phone.  I have no clue.

I have receive a warning about NSQuickDraw being deprecated but I am
not sure what this is and were to find to get rid of it.

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



[android-beginners] Re: where are the apk located

2009-02-26 Thread Jeff Brandt AKA Androidakin

No,  I am attempting to download via the USB to the phone.  But thanks
for the emulator tip.
Jeff
www.motionPHR.com

On Feb 26, 9:11 am, "Mark Murphy"  wrote:
> > I am trying to uninstall a apk with adb and if am getting a failure.
> > but when I attempt to install I also get a failure that the apk
> > exist.  Can someone tell me where they are located on the filesystem.
>
> If this is for the emulator, it may be simpler just to run the emulator
> once with the -wipe-data switch, which will restore the emulator to its
> original state when you first started using it.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Communicating by bluetooth

2009-02-26 Thread Jeff Brandt AKA Androidakin

There is not an API for Bluetooth, yet.  You may want to look at
bonjour

Jeff
www.motionPHR.com

On Feb 25, 8:35 pm, aamir  wrote:
>     Is it possible to talk with nearby users using bluetooth or Wi-Fi,
> without using airtime?If not, is the a way to create an API to do the
> same. Thanks in advance  Aamir
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] where are the apk located

2009-02-26 Thread Jeff

I am trying to uninstall a apk with adb and if am getting a failure.
but when I attempt to install I also get a failure that the apk
exist.  Can someone tell me where they are located on the filesystem.

thanks
Jeff Brandt
www.motionPHR.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] mac jarsigner error java.util.zip.ZipException:

2009-01-27 Thread Jeff

The following works on a win but I need to be able to make it work on
a mac

keytool -genkey -v -keystore csi.keystore -alias comsi -keyalg RSA -
validity 1


jarsigner -verbose -keystore csi.keystore -signedjar spmPhr.apk
pmPhr.apk comsi
Enter Passphrase for keystore: 
jarsigner: unable to sign jar: java.util.zip.ZipException: invalid
entry compressed size (expected 1009 but got 1010 bytes)


Thanks,

Jeff


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



[android-beginners] Re: SQLite database samples

2008-11-26 Thread Jeff

I found my problem with the not being able to close the project and I
wanted to pass it on.

You have to get focus of the project by clicking on project structure
of  the Navigator screen.

Jeff

On Nov 25, 4:53 am, Mark Murphy <[EMAIL PROTECTED]> wrote:
> Nanard wrote:
> >> The NotePad example in the SDK should be up to date and working.
>
> > Is there no easyest way of using SQLite ?  with less code ?
> > Without ContentProvider ?
>
> You do not need to wrap your SQLite access in a ContentProvider.
>
> However, most tutorials are set up to demonstrate database access in
> some context, and that context might call for a ContentProvider,
> Service, or something. In the case of Notepad, I suspect they wanted to
> demonstrate the use of a ContentProvider.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
>
> Android Training on the Ranch! -- Mar 16-20, 
> 2009http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] InvocationException occurred invoking method. "no such column:"database question

2008-11-21 Thread Jeff

 Hello,  a bit more data on the problem of "_id" column not existing,
a post that I had made earlier.
Inside of my query in a ContentProvider I attempt to read the
database. The error points back to the "_id" no such column.  I don't
get it?  I have tried upper case and lowercase "_id" name.  the column
is there as you can see in the Log output.

I am still working on it but??
thanks

Jeff

public void onCreate(SQLiteDatabase db) {
db.execSQL("CREATE TABLE " + MEDS_TABLE_NAME + " ("
 + Meds._ID + " INTEGER PRIMARY KEY autoincrement,"
 + Meds.sMEDS_FK + " INTEGER ,"
 + Meds.sSTATUS + " TEXT,"
 + Meds.sSOURCE + " TEXT,"
 + Meds.sPRODUCT + " TEXT,"
 + Meds.sDIRECTIONS + " TEXT,"
 + Meds.sFULLFILLHISTORY + " TEXT,"
 + Meds.sCREATION_DATE + " TEXT,"
 + Meds.sMODIFIED_DATE + " TEXT"
   + ");");
Log.w(TAG, "onCreate");
}

Insert is working:

long rowId = db.insert(MEDS_TABLE_NAME, Meds.MED, values);
Log.e(TAG, "aft insert  rowId = " + rowId);
LOG --11-21 08:32:30.983: ERROR/MPhrProvider(195): aft insert  rowId =
10

if (rowId > 0) {
Uri medUri = ContentUris.withAppendedId
(MPhrDef.Meds.CONTENT_URI, rowId); // append rowid at end of givin uri

getContext().getContentResolver().notifyChange(medUri,
null);
return medUri;

  SQLiteDatabase db = mOpenHelper.getReadableDatabase();
Cursor c = qb.query(db, projection, selection, selectionArgs,
null, null, null);
Log.e(TAG, "OnCreate cursor.getColumnName0 = " +
c.getColumnName(0));
Log.e(TAG, "OnCreate cursor.getColumnName1 = " +
c.getColumnName(1));
   11-21 09:10:19.120: ERROR/MPhrProvider(195): OnCreate
cursor.getColumnName0 = _ID

11-21 09:10:23.240: ERROR/MPhrProvider(195): OnCreate
cursor.getColumnName1 = SOURCE



detailMessage   "Invalid column _ID"

--
Here I changed the case of _ID to _id (lower)
Cursor c = qb.query(db, projection, selection, selectionArgs, null,
null, null);
Log.e(TAG, "OnCreate cursor.getColumnName0 = " +
c.getColumnName(0));
Log.e(TAG, "OnCreate cursor.getColumnName1 = " +
c.getColumnName(1));

LOGCAT

[0] "_id"
[1] "SOURCE"

String[] p = {"_id", "SOURCE", "PRODUCT"};
String st = qb.buildQuery(p, selection, selectionArgs, null,
null, orderBy, null);
Cursor cc =db.rawQuery(st, null);
11-21 09:28:57.376: ERROR/MPhrProvider(194): OnCreate
cursor.getColumnName0 = _ID

11-21 09:29:12.129: ERROR/MPhrProvider(194): OnCreate
cursor.getColumnName1 = SOURCE



com.sun.jdi.InvocationException occurred invoking method.

Unable to start activity ComponentInfo{com.csi.android.mPHR/
com.csi.android.mPHR.MPhrList}:
android.database.sqlite.SQLiteException: no such column: modified: ,
while compiling: SELECT _id, SOURCE, PRODUCT FROM medsTbl ORDER BY
modified DESC
Detail formatter error:
An exception occurred: android.database.sqlite.SQLiteException

java.lang.RuntimeException: Unable to start activity ComponentInfo
{com.csi.android.mPHR/com.csi.android.mPHR.MPhrList}:
android.database.sqlite.SQLiteException: no such column: modified: ,
while compiling: SELECT _id, SOURCE, PRODUCT FROM medsTbl ORDER BY
modified DESC
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: IllegalArgumentException: column '_id' does not exist when call to SimpleCursorAdaptor

2008-11-19 Thread Jeff

I tried the case for id and that didn't work.  Thanks for trying!! if
you have any other idea please let me know.  This is the 4th day on
this problem.
Jeff

11-19 12:28:05.808: ERROR/AndroidRuntime(166):
java.lang.RuntimeException: Unable to start activity ComponentInfo
{com.csi.android.mPHR/com.csi.android.mPHR.MPhrList}:
java.lang.IllegalArgumentException: column '_id' does not exist

the DB is working it is the SimpleCursorAdapter that is tossing the
exception

<>
private static final String[] PROJECTION = new String[] {
//Meds._ID,
 "_id",
//Meds.sSOURCE,
Meds.sPRODUCT,
//Meds.sDIRECTIONS,
//Meds.sFULLFILLHISTORY,
};

/** The index of the title column */
private static final int PRODUCT_IDX = 1;

@Override
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
Log.e(TAG, "OnCreate");
setDefaultKeyMode(DEFAULT_KEYS_SHORTCUT);

Intent intent = getIntent();
if (intent.getData() == null) {
intent.setData(Meds.CONTENT_URI);
}

// Inform the list we provide context menus for items
getListView().setOnCreateContextMenuListener(this);

//setContentView(R.layout.medlist);

// Perform a managed query. The Activity will handle closing
and re-querying the cursor
// when needed.

Uri uri = getIntent().getData();
Cursor cursor = managedQuery(uri, PROJECTION, null, null,
Meds.DEFAULT_SORT_ORDER);
//Cursor cursor = managedQuery(Meds.CONTENT_URI, PROJECTION,
null, null, null);

Log.e(TAG, "OnCreate cursor.getCount = " + cursor.getCount());
Log.e(TAG, "OnCreate cursor.getColumnName0 = " +
cursor.getColumnName(0)); **THIS log
RETURNS  "_ID"
/* Used to map meds entries from the database to views
 */
SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
 
R.layout.mphrlist_item,
  cursor,
  new
String[] { MPhrDef.Meds.sPRODUCT}, //from
  new int
[] { android.R.id.text1 });  //to
//Log.e(TAG, "!!OnCreate cursor = " +adapter.convertToString
(cursor));





On Nov 19, 10:51 am, Romain Guy <[EMAIL PROTECTED]> wrote:
> I'm afraid the column should be named "_id" and not "_ID". sqlite3
> doesn't care but it looks like our code that throws the
> illegalargumentexception does a case-sensitive comparison.
>
>
>
> On Wed, Nov 19, 2008 at 10:43 AM, Mark Murphy <[EMAIL PROTECTED]> wrote:
>
> > Jeff wrote:
> >> Hello,  I am using a simple list and I am getting this exception.  I
> >> get the error with the _ID in or out of the projection. when calling
> >> SimpleCursorAdaptor.  The DB insert/guery is working.
> >> Anyone seen this problem?
>
> > I just *have* to stop answering emails when I have a cold...
>
> > OK, so you have an _ID column.
>
> > Can you post the Java exception traceback?
>
> > --
> > Mark Murphy (a Commons Guy)
> >http://commonsware.com
>
> > Android Training on the Ranch! -- Mar 16-20, 2009
> >http://www.bignerdranch.com/schedule.shtml
>
> --
> Romain Guywww.curious-creature.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] IllegalArgumentException: column '_id' does not exist when call to SimpleCursorAdaptor

2008-11-19 Thread Jeff

Hello,  I am using a simple list and I am getting this exception.  I
get the error with the _ID in or out of the projection. when calling
SimpleCursorAdaptor.  The DB insert/guery is working.
Anyone seen this problem?
thanks

 private static final String[] PROJECTION = new String[] {
Meds._ID,
//Meds.sSOURCE,
Meds.sPRODUCT,
//Meds.sDIRECTIONS,
//Meds.sFULLFILLHISTORY,

};

  protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
Log.e(TAG, "OnCreate");
setDefaultKeyMode(DEFAULT_KEYS_SHORTCUT);

Intent intent = getIntent();
if (intent.getData() == null) {
intent.setData(Meds.CONTENT_URI);
}

// Inform the list we provide context menus for items
getListView().setOnCreateContextMenuListener(this);

setContentView(R.layout.medlist);

// Perform a managed query. The Activity will handle closing
and re-querying the cursor
// when needed.

//Uri uri = getIntent().getData();
//Cursor cursor = managedQuery(uri, PROJECTION, null, null,
null);
Cursor cursor = managedQuery(Meds.CONTENT_URI, PROJECTION,
null, null, null);

Log.e(TAG, "OnCreate cursor.getCount = " + cursor.getCount());
/* Used to map meds entries from the database to views
 */
SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,

R.layout.mphrlist_item,
 
cursor,
  new
String[] { MPhrDef.Meds.sPRODUCT }, //from
  new int
[] { android.R.id.text1 });  //to
Log.e(TAG, "!!OnCreate cursor = " +adapter.convertToString
(cursor));

setListAdapter(adapter);

}//onCreate
--
 public static final String TITLE = "title";
public static final String _ID = "_ID";
public static final String sMEDS_FK = "MEDS_FK";
public static final String sSTATUS="STATUS";
public static final String sSOURCE = "SOURCE";
public static final String sPRODUCT = "PRODUCT";
public static final String sDIRECTIONS = "DIRECTIONS";
public static final String sFULLFILLHISTORY =
"FULLFILLHISTORY";
public static final String sCREATION_DATE =
"CREATION_DATE";
public static final String sMODIFIED_DATE =
"MODIFIED_DATE";

public String MEDCOLSTR = _ID + " INTEGER PRIMARY KEY,"
 + sMEDS_FK + " INTEGER ,"
 + sSTATUS + " TEXT,"
 + sSOURCE + " TEXT,"
 + sPRODUCT + " TEXT,"
 + sDIRECTIONS + " TEXT,"
 + sFULLFILLHISTORY+ " TEXT,"
 + sCREATION_DATE + " TEXT,"
 + sMODIFIED_DATE + " TEXT";

--
ContentProvider

   public Uri insert(Uri uri, ContentValues initialValues) {
Log.e(TAG, "insert ContentValues = " +initialValues);
// Validate the requested uri
if (sUriMatcher.match(uri) != MEDS) {
throw new IllegalArgumentException("Unknown URI " + uri);
}

//setup to insert a row into db
ContentValues values;
if (initialValues != null) {
values = new ContentValues(initialValues);
} else {
values = new ContentValues();
}

Long now = Long.valueOf(System.currentTimeMillis());

// Make sure that the fields are all set.  IF not set them

if (values.containsKey(Meds.sMODIFIED_DATE) == false) {
values.put(Meds.sMODIFIED_DATE, now);
}

if (values.containsKey(Meds.sSOURCE) == false) {
values.put(Meds.sSOURCE, now);
}

if (values.containsKey(Meds.sCREATION_DATE) == false) {
values.put(Meds.sSOURCE, now);
}
Log.e(TAG, "_ID = " + values.getAsInteger(Meds._ID));
SQLiteDatabase db;
if(mOpenHelper != null){
   db = mOpenHelper.getWritableDatabase();
}else{
Log.e(TAG, "ERROR:insert mOpenHelper = NULL");
return null;
}
//insert the entire row into DB
long rowId = db.insert(MEDS_TABLE_NAME, Meds.MED, values);

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] clearing emulator

2008-11-07 Thread Jeff

I had a problem where my changes did not take effect till I cleared
the apps from the emulator.  see link

http://getablogger.blogspot.com/2008/01/android-clean-up-all-applications.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] error in running Scrapbook from Eclipse

2008-10-31 Thread jeff

Any ideas about running scrapbook from Eclipse 3.4.1?  I get an error
when running it from an Android app...?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] SQLite database samples

2008-10-21 Thread Jeff

Does anyone know of a working 1.0 database samples.  I have been
looking and trying different things and most seam to have problems.

thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] first app ( NOT HELLO WORLD)

2008-09-30 Thread Jeff

Can anyone point me to a good tutorial that uses Eclipse. I really
want to learn how to do more thing than just type hello world. I would
love to take classes if anyone knows of some in Columbus, Ohio

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] EventHandler errors?

2008-09-22 Thread Jeff

I am getting compiler error for EventHandle inheritance and I cannot
find a Javadoc reference for the calls.
does anyone know about these?
thanks,
Jeff

The type MyEventHandler must implement the inherited abstract method
EventHandler.handleSslErrorRequest(SslError)

Severity and DescriptionPathResourceLocation
Creation Time   Id

The type MyEventHandler2 must implement the inherited abstract method
EventHandler.certificate(SslCertificate)

The type MyEventHandler2 must implement the inherited abstract method
EventHandler.handleSslErrorRequest(SslError)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] eclipse project opening problem

2008-09-11 Thread Jeff

Hello,

I am having a project opening problem.  I have tried all of the
suggestion on opening a project, none have worked.
I set a new workspace.  Built a project, ran the emulator but open/
close project dropdowns are still disabled.  I can see the .project
file.  I have tried importing samples but no luck.  Any Ideas?

thanks,
Jeff

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---