ArrayIndexOutOfBoundsException can't get String-array from other class?
once more it's me, i have a new problem:
My advancedviewactivity.java calls a my class DepotDBUtils and gives its class showItems(id) its id variable, and should get a String-array returned.... but hell it doesn't work, why? no idea. I always get an ArrayIndexOutOfBoundsException  (getting the data works, i also get the contents logged [see the stringbuffer in the end])

(advancedviewactivity itself gets the id from an intent):
this is AdvancedViewActivity.java

			Long id = Long.parseLong(extra.getString("ID"));
			Log.d("AdvancedViewActivity","ID = "+id);
			
			DepotDBUtils utils = new DepotDBUtils(this);
			String[] gInfo = utils.showItem(id);

and DepotDBUtils.showItem(Long queryid) looks like this:

	 public String[] showItem(Long queryid){
		Log.d("DepotDBUtils", "starting showItem()");
		String sQueryid=queryid.toString();
		Uri uri = ContentProviderMetaData.DepotTableMetaData.CONTENT_URI;
		Activity a = (Activity)this.mContext;
		String[] projection = new String[]{
				BaseColumns._ID,
				DepotTableMetaData.ITEM_QRCODE,
				DepotTableMetaData.ITEM_NAME,
				DepotTableMetaData.ITEM_AMOUNT,
				DepotTableMetaData.ITEM_UNIT,
				DepotTableMetaData.ITEM_PPU,
				DepotTableMetaData.ITEM_TOTAL,
				DepotTableMetaData.ITEM_COMMENT};
		Cursor c = a.managedQuery(uri, 
				projection, //projection
				"_ID=?", //selection string
				new String[]{sQueryid}, //selection args array of strings
				DepotTableMetaData.DEFAULT_SORT_ORDER); //sort order
		Log.d("DepotDBUtils","cursor created, getting ColumnIndexes");
		c.moveToFirst();
		int iId = c.getColumnIndex(BaseColumns._ID);
		int iqrcode = c.getColumnIndex(ContentProviderMetaData.DepotTableMetaData.ITEM_QRCODE);		
		int iname = c.getColumnIndex(ContentProviderMetaData.DepotTableMetaData.ITEM_NAME);
		int iamount = c.getColumnIndex(ContentProviderMetaData.DepotTableMetaData.ITEM_AMOUNT);
		int iunit = c.getColumnIndex(ContentProviderMetaData.DepotTableMetaData.ITEM_UNIT);
		int ippu = c.getColumnIndex(ContentProviderMetaData.DepotTableMetaData.ITEM_PPU);
		int itotal = c.getColumnIndex(ContentProviderMetaData.DepotTableMetaData.ITEM_TOTAL);
		int icomment = c.getColumnIndex(ContentProviderMetaData.DepotTableMetaData.ITEM_COMMENT);


			//Gather values
			
			String id = c.getString(iId);
			String qrcode = c.getString(iqrcode);
			String name = c.getString(iname);
			String amount = c.getString(iamount);
			String unit = c.getString(iunit);
			String ppu = c.getString(ippu);
			String total = c.getString(itotal);
			String comment = c.getString(icomment);

			Log.d("DepotDBUtils","putting Strings into info[]");
			String[] infos = new String[]{id,name,amount,unit,ppu,total,comment,qrcode};
			
			
			//Report or log the row
			StringBuffer cbuf = new StringBuffer(id);
			cbuf.append(",").append(qrcode);
			cbuf.append(",").append(name);
			cbuf.append(",").append(amount);
			cbuf.append(",").append(unit);
			cbuf.append(",").append(ppu);
			cbuf.append(",").append(total);
			cbuf.append(",").append(comment);
			
			Log.d("output",cbuf.toString());
			
			return infos;


ArrayIndexOutOfBoundsException can't get String-array from other class?
===

once more it's me, i have a new problem:
My advancedviewactivity.java calls a my class DepotDBUtils and gives its class showItems(id) its id variable, and should get a String-array returned.... but hell it doesn't work, why? no idea. I always get an ArrayIndexOutOfBoundsException  (getting the data works, i also get the contents logged [see the stringbuffer in the end])

(advancedviewactivity itself gets the id from an intent):
this is AdvancedViewActivity.java

			Long id = Long.parseLong(extra.getString("ID"));
			Log.d("AdvancedViewActivity","ID = "+id);
			
			DepotDBUtils utils = new DepotDBUtils(this);
			String[] gInfo = utils.showItem(id);

and DepotDBUtils.showItem(Long queryid) looks like this:

	 public String[] showItem(Long queryid){
		Log.d("DepotDBUtils", "starting showItem()");
		String sQueryid=queryid.toString();
		Uri uri = ContentProviderMetaData.DepotTableMetaData.CONTENT_URI;
		Activity a = (Activity)this.mContext;
		String[] projection = new String[]{
				BaseColumns._ID,
				DepotTableMetaData.ITEM_QRCODE,
				DepotTableMetaData.ITEM_NAME,
				DepotTableMetaData.ITEM_AMOUNT,
				DepotTableMetaData.ITEM_UNIT,
				DepotTableMetaData.ITEM_PPU,
				DepotTableMetaData.ITEM_TOTAL,
				DepotTableMetaData.ITEM_COMMENT};
		Cursor c = a.managedQuery(uri, 
				projection, //projection
				"_ID=?", //selection string
				new String[]{sQueryid}, //selection args array of strings
				DepotTableMetaData.DEFAULT_SORT_ORDER); //sort order
		Log.d("DepotDBUtils","cursor created, getting ColumnIndexes");
		c.moveToFirst();
		int iId = c.getColumnIndex(BaseColumns._ID);
		int iqrcode = c.getColumnIndex(ContentProviderMetaData.DepotTableMetaData.ITEM_QRCODE);		
		int iname = c.getColumnIndex(ContentProviderMetaData.DepotTableMetaData.ITEM_NAME);
		int iamount = c.getColumnIndex(ContentProviderMetaData.DepotTableMetaData.ITEM_AMOUNT);
		int iunit = c.getColumnIndex(ContentProviderMetaData.DepotTableMetaData.ITEM_UNIT);
		int ippu = c.getColumnIndex(ContentProviderMetaData.DepotTableMetaData.ITEM_PPU);
		int itotal = c.getColumnIndex(ContentProviderMetaData.DepotTableMetaData.ITEM_TOTAL);
		int icomment = c.getColumnIndex(ContentProviderMetaData.DepotTableMetaData.ITEM_COMMENT);


			//Gather values
			
			String id = c.getString(iId);
			String qrcode = c.getString(iqrcode);
			String name = c.getString(iname);
			String amount = c.getString(iamount);
			String unit = c.getString(iunit);
			String ppu = c.getString(ippu);
			String total = c.getString(itotal);
			String comment = c.getString(icomment);

			Log.d("DepotDBUtils","putting Strings into info[]");
			String[] infos = new String[]{id,name,amount,unit,ppu,total,comment,qrcode};
			
			
			//Report or log the row
			StringBuffer cbuf = new StringBuffer(id);
			cbuf.append(",").append(qrcode);
			cbuf.append(",").append(name);
			cbuf.append(",").append(amount);
			cbuf.append(",").append(unit);
			cbuf.append(",").append(ppu);
			cbuf.append(",").append(total);
			cbuf.append(",").append(comment);
			
			Log.d("output",cbuf.toString());
			
			return infos;

