Re: [android-developers] Re: Activity Help

2011-09-23 Thread Derek Winstead
My SQL queries are fine, I copy and paste the queries into SQLite Database 
Browser with the current database that is on the VM. Runs fine and returns 
the results expected.

If it was a SQL error wouldn't the program error out before finishing the 
load? No breakpoints get hit on my debug mode and the layout loads with the 
data filled in on the VM. It's after everything runs I then get the error.

Any thoughts about that?

-- 
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] Re: Activity Help

2011-09-23 Thread Derek Winstead
I changed the name of my variable in the fetchLiteratureTypes function on 
the LiteratureEditor.java file so it wasn't the same as the one in the 
LiteratureManager.java.

That seemed to work and fix my problem. I no longer error when running my 
app.

I assume it had something to do with the variable name being used in the 
previous activity since I never called finish() on the activity when calling 
the next Intent.

Thanks for the help everyone!

-- 
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: Activity Help

2011-09-22 Thread kdı gjofd
SQL prolem ..

2011/9/22, Derek Winstead derekwinste...@gmail.com:
 Here is my trace:

 09-22 10:28:09.341: WARN/ActivityManager(59): Activity idle timeout for
 HistoryRecord{450d4220 com.myMinistry/.gui.LiteratureEditor}
 09-22 10:28:14.575: DEBUG/dalvikvm(128): GC_EXPLICIT freed 908 objects /
 48408 bytes in 203ms
 09-22 10:29:11.155: DEBUG/SntpClient(59): request time failed:
 java.net.SocketException: Address family not supported by protocol
 09-22 10:29:49.635: DEBUG/dalvikvm(299): GC_FOR_MALLOC freed 3416 objects /
 255088 bytes in 69ms
 09-22 10:29:49.814: ERROR/Cursor(299): Finalizing a Cursor that has not been
 deactivated or closed. database =
 /data/data/com.myMinistry/databases/myministry, table = null, query = SELECT
 *  FROM literatureNames WHERE isActive = 1 AND typeID = 0 ORDER BY
 sortOrder,name
 09-22 10:29:49.814: ERROR/Cursor(299):
 android.database.sqlite.DatabaseObjectNotClosedException: Application did
 not close the cursor or database object that was opened here
 09-22 10:29:49.814: ERROR/Cursor(299): at
 android.database.sqlite.SQLiteCursor.init(SQLiteCursor.java:210)
 09-22 10:29:49.814: ERROR/Cursor(299): at
 android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:53)
 09-22 10:29:49.814: ERROR/Cursor(299): at
 android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1345)
 09-22 10:29:49.814: ERROR/Cursor(299): at
 android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1315)
 09-22 10:29:49.814: ERROR/Cursor(299): at
 com.myMinistry.db.MinistryDatabase.fetchLiterature(MinistryDatabase.java:262)
 09-22 10:29:49.814: ERROR/Cursor(299): at
 com.myMinistry.gui.LiteratureManager.fillData(LiteratureManager.java:68)
 09-22 10:29:49.814: ERROR/Cursor(299): at
 com.myMinistry.gui.LiteratureManager.onResume(LiteratureManager.java:26)
 09-22 10:29:49.814: ERROR/Cursor(299): at
 android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1149)
 09-22 10:29:49.814: ERROR/Cursor(299): at
 android.app.Activity.performResume(Activity.java:3823)
 09-22 10:29:49.814: ERROR/Cursor(299): at
 android.app.ActivityThread.performResumeActivity(ActivityThread.java:3118)
 09-22 10:29:49.814: ERROR/Cursor(299): at
 android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3143)
 09-22 10:29:49.814: ERROR/Cursor(299): at
 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2684)
 09-22 10:29:49.814: ERROR/Cursor(299): at
 android.app.ActivityThread.access$2300(ActivityThread.java:125)
 09-22 10:29:49.814: ERROR/Cursor(299): at
 android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
 09-22 10:29:49.814: ERROR/Cursor(299): at
 android.os.Handler.dispatchMessage(Handler.java:99)
 09-22 10:29:49.814: ERROR/Cursor(299): at
 android.os.Looper.loop(Looper.java:123)
 09-22 10:29:49.814: ERROR/Cursor(299): at
 android.app.ActivityThread.main(ActivityThread.java:4627)
 09-22 10:29:49.814: ERROR/Cursor(299): at
 java.lang.reflect.Method.invokeNative(Native Method)
 09-22 10:29:49.814: ERROR/Cursor(299): at
 java.lang.reflect.Method.invoke(Method.java:521)
 09-22 10:29:49.814: ERROR/Cursor(299): at
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
 09-22 10:29:49.814: ERROR/Cursor(299): at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
 09-22 10:29:49.814: ERROR/Cursor(299): at
 dalvik.system.NativeStart.main(Native Method)
 09-22 10:29:50.006: ERROR/Cursor(299): Finalizing a Cursor that has not been
 deactivated or closed. database =
 /data/data/com.myMinistry/databases/myministry, table = null, query = SELECT
 SUM(total) FROM time time LEFT OUTER JOIN entryTypes types ON types._id =
 time.entryType WHER
 09-22 10:29:50.006: ERROR/Cursor(299):
 android.database.sqlite.DatabaseObjectNotClosedException: Application did
 not close the cursor or database object that was opened here
 09-22 10:29:50.006: ERROR/Cursor(299): at
 android.database.sqlite.SQLiteCursor.init(SQLiteCursor.java:210)
 09-22 10:29:50.006: ERROR/Cursor(299): at
 android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:53)
 09-22 10:29:50.006: ERROR/Cursor(299): at
 android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1345)
 09-22 10:29:50.006: ERROR/Cursor(299): at
 android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1315)
 09-22 10:29:50.006: ERROR/Cursor(299): at
 com.myMinistry.db.MinistryDatabase.getTimeTotalNoRBC(MinistryDatabase.java:175)
 09-22 10:29:50.006: ERROR/Cursor(299): at
 com.myMinistry.gui.SummaryMonth.fillData(SummaryMonth.java:170)
 09-22 10:29:50.006: ERROR/Cursor(299): at
 com.myMinistry.gui.SummaryMonth.onResume(SummaryMonth.java:64)
 09-22 10:29:50.006: ERROR/Cursor(299): at
 android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1149)
 09-22 10:29:50.006: 

[android-developers] Re: Activity Help

2011-09-21 Thread Derek Winstead
It starts in the LiteratureManager.java and the intent goes to 
LiteratureEditor.java

-- 
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] Re: Activity Help

2011-09-21 Thread Richard Schilling
The spinner and the list on the first activity are self contained - that 
is their state won't directly affect the activity that you're calling. 
 Sounds like the activity you start is trying to access some data/resource 
that is not there (e.g. your layout is missing a resource). 

Check the state of variables during the onCreate/onResume/etc lifecycle 
functions to see where the NPE is generated.

Can you post a stacktrace?

Richard

-- 
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] Re: Activity Help

2011-09-21 Thread Derek Winstead
Thanks Richard,

I have directly skipped the LiteratureManager.java and run the intent 
LiteratureEditor.java from an activity before that normally calls the 
manager file. The editor works just fine and doesn't crash.

I will post a stack trace tomorrow when I'm at work and can run the 
program... This leads me to another question that has stopped any 
development on my laptop at home (I didn't upgrade my work computer).

I have upgraded the SDK and AVD to to most recent release, which has broken 
my build. Seems the code:
 

style name=WindowTitleBackground parent=android:WindowTitleBackground
item name=android:background@android:color/transparent/item
/style


breaks my build. I read that I am calling android:WindowTitleBackground 
which was wrong to begin with and Google fixed this in the most recent 
release. I have no idea how to fix this and make my app work with the newest 
SDK/AVD release. I am a novice to Java and Android so this is a foreign 
problem.

I have my source publicly hosted by Google if you want to check it out and 
see for yourself.

http://code.google.com/p/myministryapp/source/checkout

Thanks for the help!

-- 
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