Ammon Miranda

Greenhorn
+ Follow
since Aug 09, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ammon Miranda

Lester you are my hero!! It now works!! well, at least it ready for my further development. Thanks SOO much. I dont know if I will need all the permissions I added to get around the security issue but I will leave them anyway for now. Thanks again. I am not going to worry yet about the other warnings more posts and new threads coming I am sure :-/
13 years ago
ok sorry bout all that. I just included in case needed. Basically, as you see, there are no problems in the strings.xml or mail.xml. The error seems to be coming from permissions not being allowed to certain threads. I have created only two threads, the main UI thread and an additional getLocThread to process getting locations. You can view the latest posts before for all details but here is the simplification and I will give the gist first:

I created the main UI (obv auto) I then created a Runnable called updateLocTV to send with the handler mCallback back to the main thread from the getLocThread used to run all of this OUTSIDE of UI thread. I am getting errors involving permissions that you can see inside of LogCat. I just noticed [in LogCat] that the Package Manager doesnt recognize permissions I added into the manifest. I added a few more permission just now during debugging and none of them are recognized.

The error arises when the locationManager requests updates
lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
on line 138 below in Main.java

Now, here is the code for:

Main.java
AndroidManifest.xml
LogCat <-- all errors and warnings displayed, nothing else

not sure if you need any other quick reference but, here are a few
Reference:

onCreate -------------------- line 61
final Handler mCallback --- line 76
Runnable updateLocTV ---- line 78
getLocThread --------------- line 118
where error occurs --------- line 138


Main.java



AndroidManifest.xml



LogCat



13 years ago
Thanks guys and sorry bout that here is some update code that I have done and I seem to be having some issues with thread permissions/management. I added the Looper.prepare() which an error told me was missing and that I needed in order to create a handler within the new thread. The layout_width I noticed just after I posted the code, but thanks. I posted [relevant] LogCat. Anyway, here is the updated code:

Main.java



main.xml


strings.xml



AndroidManifest.xml



LogCat




13 years ago
cant figure out where error is coming from and how to fix it. I am new to android programming(not java) so sorry for possible slowness :P Here is files I think you need to see

Main.java



main.xml


Manifest.xml



LogCat



Project Specs:
Build Target: Android 2.1 update-1


sorry for commented out code in there but debugging like crazy. I am new to debugging on here. I am running this in an emulator through Eclipse. thanks in advance
13 years ago