[THINK TANK] Widget Restorer - Android Software Development

If any of you have flashed a ROM and then promptly restored everything with TiBu, then you know the pain that is Restoring the Widgets that get the "Problem Loading Widget" error. Now you might say "You're just lazy its only 4 widgets!" Which I would reply "Yes that would be the case unless I'm a user that
1) likes widgets...a lot.
or
2)likes the WP7 theme idea...a lot.
So you see that is where this app/hack/script will come in handy.
Now I think if anyone would like to help me(I'm a complete linux noob, in fact the only thing i know how to do is a little bit of Java!) I would gladly use all the resources I can, anything from project management to learning a whole new Prog Language.
Now let's start with phase one: Identifying the problem.
My guess is that this error stems from the launcher-widget communication. The only way I can rationalize it is that the launcher requests the widget and the responsible activity can't find it. I have no clue. I'm going to go find the source code of a launcher and analyse it.
If anyone can chime in or even leave some source(s) that would be wonderful!
Thanks!

Related

Help please - Root / ROM info

Greetings all
I realize the info I need is probably posted here... somewhere. But, at this point I am beyond confused.
I did the first, 2nd and the 3rd Eris leaks and my info is as follows
[Firmware - 2.1
baseband - 2.42.00.04.12
kernel - 2.6.29-8a03cb9a
htc-kernel and18-2#1
build - 2.36.605.1 cl165907 release-keys
software - 2.36.605.1
browser - 3.1
pri - 2.11_002
prl - 51920
Truthfully, I dont know what any of it means. I don't know if I am able to Root or not or even what I would be getting If I did or if I need to.
I also Don't know which of the dozen or so tutorials, fixes, ROM's etc I should trust, try or attempt or what they mean
What I do know is simple. I want the phone to work when all is said and done. Meaning, I want the GPS, Bluetooth, WiFi etc to all function properly.
What I would like is also simple and that is, to be able to get rid of the 1.2 dozen or so apps that I must constantly kill on this phone ( MP3 store, Voce Dialer, my uploads etc.) and the 20+ I have to kill on reboot. And have my phone run as smooth, fast and trouble free as possible.
The only widget I run is the weather, currently either 9s or weather bug and I also have a widget for Pandora and an app called music player on the home screen, but neither of those should be or need to be running, all syncs, auto updates, message / mail pushing are turned off or set to manual, this phone is a phone first, weather 2nd, and internet & email 3rd. all the other things are just toys to me. I would use the Sense weather widget if I could but I am
using Launcherpro so can only Open the sense weather app manually, not with the perfect 1x2 widget or full screen one. I also use the Sense Calender/ agenda app and would like to continue to do so.
I would also like, as I said, have everything else just work, the google account syncing, the market, all the other stuff that is needed in the background to make the unit function properly.
I Hope somebody out there understands what I am trying to convey to all of you, and I don't come off as being to demanding or inflexible. I am open to anything as long as it will do what I need. I know a lot of people here are Techies and want the latest, greatest, fastest etc. but I just need things to work. If that means staying with what I got, so be it.
My biggest grips with the phone is the crap that runs in the background, that I must kill and constantly restarts, even when the phone is idle. If this can be fixed in Root, I am all for it, if android 2.2 fixes this, ditto. if there is another way that doens't require any of this, I am open to suggestions on that as well.
But, I must stress, I do need this phone to simply work as intended. I am in the minority I am sure but I actually use the "phone" part more then anything else and need it to just work.
Maybe I don't need root! I really don't know. But as it stands now, with leak3 I will get no future updates or fixes unless I have it or something similar, Correct?
Thanks for any simplified help or advice on this
P.S if at all possible, please dont direct me to another link to read. Unless, that will do exactly what I am trying to accomplish and need the phone to do. And, is fairly simple to understand and execute. Not one full of links telling me, you need this, so go here and u will want that so go there etc..
This is realy important with the"ROM" issue, which I realy dont understand at all
Thanks in advance
Kalie
yes you can root it is benificial to most, and follow these instructions to ROOT after reading more into the matter. If you need any personal help still you may PM me tomorrow and i will at least help you find all the necessary resources and knowledge to decide if you should root or not.
Please move to general discussion.
I think the first thing that you really need to understand is that with Android things are going to run in the background, regardless of what you do. Background process run whether stock or rooted. There are no custom ROMs that somehow prevent background processes from running. It took me a long time to come to terms with this concept because I want to feel like everything on my phone is "clean". However, with Android the system is meant to run this way and the OS will stop processes only when needed. When you kill processes via task manager app or whatever you are simply wasting time, slowing down your phone, wasting battery, and maybe causing other "hiccups" in the operation of the system. As much as it feels good to make sure that stuff is not running you are really doing no good by constantly chasing your tail on this issue.
With leak v3 you can receive future updates. If you haven't already, you should be receiving the MR4 OTA update which includes some minor bug fixes.
Obtaining root is going to give you the ability to apply custom ROMs but I am not sure that this will accomplish what you have in mind. Custom ROMs do offer some significant performance enhancements but they will not stop background apps from running and all of them include a good number of the native apps that you want to get rid of (amazon mp3, etc). With root you can remove native apps but it is another required learning process.
Rooting your phone is more than just loading a custom ROM, it is a learning process that requires a lot of reading and understanding of how the operating system works, how to load custom ROMs, and all of the other things that come along with rooting.
I understand that you want to make this as easy as possible but learning is only easy if you are interested in what you are trying to do. I don't want to discourage you from rooting your Eris but I do think that you need to take some time to understand what it is that you are considering doing.
There are a lot of great resources on this site to use to educate yourself on the root process and what rooting really means for you. Good luck
mod, please move this to the general section, not a development topic, thanks.
"With leak v3 you can receive future updates. If you haven't already, you should be receiving the MR4 OTA update which includes some minor bug fixes.
"
Did I read this correctly?
Since I installed Leak 1 and the subsequent leak 2 and leak 3, I have not had any updates from verizon.
At what point in time, if ever, will I get an update from Verizon that does not come from a forum and or somebody claiming they figured it out and it's the same as the official, just "Not Official" since i am on the leaked version of Android 2.1
If I can eventually get 2.2 android, without going thru the Agg. of rooting and the trial and eroor with the many different ROMS, I would love that.
With that said, if there is something proven I can do , to undo what I have done ( Leak 1, 2 and 3) that will allow my phone then to be "Officialy" updated by verizon I would love to know how to do this
Thanks again for the Help
Kalie S

[Q] Learning Loops

Using the SkeletonApp default code, how would I insert a void or whatever (sorry not knowing the terminology yet) that would run each cycle of the program like a counter or something?
Just keep it simple, just a "run this always" loop while maintaining the button functions would be great.
OR-
I did read something on the web that said Java/Android does not use a main run void() like C#,C++ and others do, but in fact it uses more than one function/class or something as it's loop.
Is that true?
I know, it's a tough one huh?
Nobody knows?
If I understand what you're saying, and I'm not sure I do, use a timer/service/new thread and update the UI from that timer/service/new thread with listeners.
Using a loop means that the program will be tied up in your loop and it will appear like your application is frozen.
So are you trying to create a loop which will run forever until a certain condition is flagged? That shouldn't be too hard to do, you'd have to create a service that does it in the background i think, so it doesn't affect anything else.
Some of my uni lecture notes have info on the different loops (while, do and do-while), they might help in some way
http://forum.xda-developers.com/showthread.php?t=854462
any chance of you guys showing me some code that will work in your basic "helloworld" app the counts from 2min to 0 or something so I can get my feeble mind around it

Programming help with views

I could use some help with an app I'm working on. I need to know how to control the views and work with which things are in focus. I also want it to work even while in the background so using a handler or something else is knowledge I could use help with. I've been sifting through the javadoc and multiple other forums and am pretty much stuck. Anyone with decent knowledge that would be willing to help me out should message me. Thanks in advance.
First I would move this to the Android dev forum
Android uses Intents to display and run processes. Activities are Intents (views)that you can actually see on the screen and Services are Intents that can be run in the background.
Starting on the Android dev site is really the best place to find the answers to the problems.
That and using the Android examples that come with the SDK. Good luck and I hope you were talking about Android! XD
I was talking about android so here's what i'm trying to do. I want to take in trackball movements and pretty much make it so they don't affect my program or others. I'm not sure how to make it so that requestFocus() will take whatever view is currently on the screen, capture it, and pretty much revert right back to it if the trackball is used. I've tried a lot of different things, but I have been stuck on this forever. Anyone know how to accomplish this because for the most part I think that the trackball is not documented all that well. Any suggestions would be great!
I would look at the http://developer.android.com/guide/topics/ui/ui-events.html , onTrackballEvent(MotionEvent) . You should be able to override that in your service, and just process the motion however you want and not call super.onTrackballEvent();
The problem is that although onTrackBall does captures events, it does not capture all of them. In the docs it says that the method will handle all events not already handled by a view. So I guess my question overall is how do you do just that? Take in every trackball movement no matter what view is reading it? Whether it be another app or anything else. How would I capture the remaining movements?
So after a bit more research here's what I've come up with for what I need to do. Either access the event queue or make it so any time the trackball is used, whether on the homescreen or something else, my application will be able to take these events and manipulate then as i need to. So anyone willing to help with this? I figure I need to make a thread, but how do I get it to read in other applications readings? Is this even possible?

[Q] Debugging help needed

I have a user of my app who is having a problem running it. My code launches another activity in the same app, and he is saying it is stopping before it should & returning to the previous activity, and he doesn't see any Force Close warnings.
I have run my code in the emulator & on my phone, I can't reproduce the error. We both run Android 2.2 on our phones, his is an HTC EVO & mine is a HTC Wildfire, as far as I can tell his specs are better than mine so shouldn't cause an issue - I deliberately chose a low spec for for my dev work so the code ought to run on anything.
As a bit of an Andoid dev noob (but been coding for years), is there any easy way I can make a special build of the app to send to him that would log any errors that happen ? I'd like to get a stack dump as well if possible, as I'm not sure exactly what routine in the activity its crashing out in. The activity that crashes is Gallery with 9 images in it, he can't flick through them or select one. I'm stumped as to whats causing it, any assistance would be gratefully received.
Thanks.
Why not point to your app and let others here try it on their phones? It could simply be other apps installed on his phone interfering with your app.
Long time programmer here too and when I get to where you're at (and I"m sure you've put some hours into this LOL), I go back to STEP 1.
I comment-out any and all code but the bare minimum; break it down to the Intent, startActivity and maybe a Toast message in the second activity. Even parse down your XML files to bare minimum.
See if that works. Then, ADD BACK ONE LINE OF CODE AT A TIME Run program and make sure it works. Yeah, it's painful, but in my 20 years of coding, I've learned to put my pride aside and to not "pretend" all the code I've written is correct.
Sometimes on bigger projects, I"ll change or add a couple of lines of code, run a back up and test. Rinse and repeat LOL. That way, I know I"m only a couple of lines of code from what "used" to work.
Good Luck!
Thanks both of you.
old_dude - Its a paid app. Only £0.99 but I don't think people would pay to help me. There is a free version of the same app (with less functionality) that this guy can get to work. If your really interested the 2 versions are -
Plink Log - Free Version
Plink Log Pro - Paid version
Rootstonian - agreed thats the approach I'd normally take if I was having problems on my dev phone or the emulator. The problem is that its OK on my HTC Wildfire/Android2.2 but on this guys HTC EVO/Android2.2 its having problems. I dont really want to keep sending him .apks with 1 or 2 lines extra enabled just to see if that fixes his specific issue. I was hoping there was something I could code to catch whatever crashes the activity & log it somewhere for me to analyse. When I do PC dev work, I have a global exception handler that catches anything I dont explicitly handle, and dumps the full call stack into a Log File I can read later.
I think I'll just have to take the existing app & put loads of debug code into it to save messages into a log file & see what bits of code are being called & what isn't & then get him to email me the results.
Thanks for the ideas guys, its always useful to get input from another perspective.
Dave
Hmmmm, just discovered setDefaultUncaughtExceptionHandler - might be able to use that with printStackTrace. Sounds interesting.

[Q] Need minimal ROM for ATM like project

I need some info on getting a project going. I have been tasked to create an ATM type of application for the A500. It needs a minimal OS with only my program running, which uses a USB card reader and WiFi. The power is always connected and it is securely mounted. It's not, but think ATM.
I have read there are minimal OS source builds that we can get for this purpose. I haven't found where to get them, or what to Google for. Searching has found ROM's for other devices people have created. I have basically finished the program and now just need to get the system ready for install without a user being able to press the Home button or back button to get out of the program.
I'm too new to post in the dev forum, but I'm not a novice programmer. Ive done embedded dev, just not on android.
thanks
You could also PM some of the devs, they might be able to help you...
PMs
I hadn't thought of that, but I am too new on here to know who would be good to PM. Besides, I didn't want to bother busy people. But I'll continue to read up on the posts and see who seems to know what they are talking about.
Most decent Rom "modders" can strip most stuff out of the system. Heck, you can do it yourself with a little trial and error and a lot of time and patience.
Example, my newest mod in beta, has 2 services running at boot. Google services, and Keyboard. That's about as bare bones as one can get, and still maintain functionality and be called a tablet. Note that most apps, will have to be downloaded.
Anything past that, and you would need something like an old ASOP rom.

Categories

Resources