Alternative Faster than XmlPullParser? - Java for Android App Development

Was wondering if anyone knows of an alternative (faster, perhaps) way of reading XML files? I'm using XmlPullParser, and the .nextText() method is horribly slow. On a ~45kb file, it's taking my app a good 30 to 60 seconds (longer, sometimes..) to read and parse out only the fields I'm looking for. Doing a trace on it in Eclipse, the .nextText() seems to be taking up 90% of that time.
Any thoughts? I'm okay with it, but.. am afraid my users won't be.
Thanks!
-Mike

Related

Keyboard response time

Is there any way to speed up the response of the keyboard? Because when im txting, i'll be done way before it puts everything in that i typed.
Id like to know this one too or is it more the speed of the phone youre using, available storage etc?
This is one of those annoyingly simple questions that has no single easy answer.
At one level a WM phone is running a host of services that a regular phone doesn't and therefore it is unlikely to be as "crisp" as a basic phone.
However there are variables that can be looked at and some are more complex than others.
Can you reduce the number of background running programs?
Can you flash a different ROM that is lite on some greedy services and indeed do you want to if it means loss of functionality for other things?
Perhaps there are registry tweaks that are relevant
Is the phone really slow or is it you that is a very fast texter? (might sound daft but in order to decide if your phone is slower than other Hermes, then we'd need something to guage it by.
Perhaps a simple Hard Reset might clean things out?
Perhaps test with a soft reset before testing to see if it is faster. If it is then the system is getting clogged by a process or program?
Have you done much customising of the phone?
What ROM are you using?
Have you loaded customisation of the today screen and if so does it work faster without it?
Do you use push email or other polling services like weather apps?
Is the keyboard just as "laggy" when using Pocket Word or is it only laggy when texting?
Is the phone generally laggy when tapping icons for example? A very general guide to how well the device is running is how long it takes to orientate from portrait to landscape when opening the keyboard. Anything more than around 3 or 4 seconds means there are probably things that can be done to speed things up.
All things to consider and indeed speed is probably one of the most important factors behind folk choosing to flash new ROMs. However, I'd look at some of the more basic things above before flashing a new one.
It will always help people to make suggestions if you provide as much detail as possible. Lack of info. often results in few answers to questions.
Mike

Android auto-refresh web pages

I notice that sometimes android will automatically refresh a web page, one situation that it happens the most is when I am browsing the internet and open a new window from my current page, after browsing the new window and closing it, the original page gets refreshed.
Is there a way to disable this? I dont want it to refresh unless I tell it to, and its really annoying.
I guess the browser simply give up previous page when you open a new window. this is a measure to save memory and increase efficiency. a simple solution is to use a third party broswer like opera mobile.
What's worse is sites that do a perma refresh on a page. The new faceook (non mobile) is an example of that. Totally unuseable with the Android browser
i hate the auto refresh crap. especially if im google reader.
Any news on this?
billc.cn said:
I guess the browser simply give up previous page when you open a new window. this is a measure to save memory and increase efficiency. a simple solution is to use a third party broswer like opera mobile.
Click to expand...
Click to collapse
Except that is SHOWS you the entire page just fine for a second, then refreshes.
Extremely annoying on EDGE especially.
I have no idea how one would go about fixing this, get into the browser code I guess.
I, alas, am no developer, but I'll donate 10 bux toward a developer fixing this, lol.
Ya that auto refresh is terrible, all it does is slow everything down since i only get edge
Most annoying part of android. I hate it to an unmeasurable degree.
I hate opera, as well as any other browser I have seen so far.
I hate this crap too. If someone can hack multi-touch into the browser, surely this can be fixed.
ya come on we need this fixed
JakobFriedrich said:
ya come on we need this fixed
Click to expand...
Click to collapse
This is a caching issue. It has been discussed many times. Use the swapper script if it really is that important to you.
and "we" need to fix this? Yeah, I'm sure you're going to contribute a whole lot.
wow i'm really sorry, i know i can't do **** about it thats why i hope you guys help me i couldn't find a link with the swapper script
so if you could tell me that and how to apply it i would love you
+1 this problem also really bothers me, hopefully someone can put something together.
generic node i'm waiting fofr your help
Search the forums.
thank you so much generic node i owe you one for that
so i searched for g1 swapper script so if i just run that script the webpage won't auto refresh or what

Solution 4 unlimited video record on android record over 4gb and no time restricted

Hi All,
i found solution for unlimited recording on android device, it has pros and cons so hopefully some programmer will come and modify the buildin camera apk.
here are solutions they are working perfects but the problem is the quality is no where close to the buildin cam apk.
1. lgCamera
2. Snap Camera HDR
3. moto x camera apk its free and in my opinion its quality better than the other 2.
so the problem of limited recording is not due to format fat32, because htc on buildin cam apk record 30 minutes and stops and its size is 4gb, but i have tried lgcamera was recording over an hours and its size was 5.7gb.
i do not keep it long, i hope some programmer modify htc one cam apk to record unlimit or auto splitted to 30 minutes duration, also modify its zoom default to the value of 50% because htc one cam is way zoomed out.
so if any genius person modify the camera apk then it will be best solution, it just need to override the default camera apk setting when some one modifying its camera apk.
some time when we have party i do not like to go and modify zoom setting and start record again every half an hour.
Thanks for any programmer who modify this and good luck with the rest for temporary solution.
Hi,
snap camera records 30fps with 20mbit in low light, but the result is darker then htc stock camera.
regards
starbase64
I could be off here, but since you said recording stops at 30 minutes, I think I have a solution:
In /system/etc/media_profiles.xml, there is a "duration=" setting for each encoder profile. This can be set to either 30 or 60, and currently all profiles except qvga are set to 30. You may be able to set this to 60 and be able to record up to 60 minutes. Report back.
zindu said:
i do not keep it long, i hope some programmer modify htc one cam apk to record unlimit or auto splitted to 30 minutes duration, also modify its zoom default to the value of 50% because htc one cam is way zoomed out.
Click to expand...
Click to collapse
You do realise that routinely changing the zoom is a terrible idea on the One?
It's a digital zoom, not an optical one, so all you are doing by zooming in is losing pixels - this is fine if you are shooting something and wish to zoom in for effect, but as a general rule if you want to get the best quality out of the camera, you should leave zoom well alone. This is especially true of the One as it doesn't have that many pixels to play with in the first place.
See here for more info - http://www.tfpsoft.com/fun/digitalcameraguide/digitalversusopticalzoom.html
Regards,
Dave
unlimited video recording android
In /system/etc/media_profiles.xml, there is a "duration=" setting for each encoder profile. This can be set to either 30 or 60, and currently all profiles except qvga are set to 30. You may be able to set this to 60 and be able to record up to 60 minutes. Report back.[/QUOTE]
hello homeslice976
Thank you very much for the information you have provided. i have uploaded 2 screen shots of the xml file you have stated and also uploaded 2 xml file which are original xml file on my htc device, but i think the device must be rooted to replace those xml files? am i wrong?
if i need to root my device then i will try to do it later today as my connection is very slow right now.
Regards,
zindu
unlimited video recording htc one
It's a digital zoom, not an optical one, so all you are doing by zooming in is losing pixels - this is fine if you are shooting something and wish to zoom in for effect, but as a general rule if you want to get the best quality out of the camera, you should leave zoom well alone. This is especially true of the One as it doesn't have that many pixels to play with in the first place.
Regards,
Dave[/QUOTE]
Thank you Dave,
i will test to video one with zoomin at let say 40% and other will let zoom alone but i will crop the video to equivalent of 40% zoomin video, i will compare the 2 side by side and will report back the result.
Regards,
Zindu
zindu said:
In /system/etc/media_profiles.xml, there is a "duration=" setting for each encoder profile. This can be set to either 30 or 60, and currently all profiles except qvga are set to 30. You may be able to set this to 60 and be able to record up to 60 minutes. Report back.
Click to expand...
Click to collapse
hello homeslice976
Thank you very much for the information you have provided. i have uploaded 2 screen shots of the xml file you have stated and also uploaded 2 xml file which are original xml file on my htc device, but i think the device must be rooted to replace those xml files? am i wrong?
if i need to root my device then i will try to do it later today as my connection is very slow right now.
Regards,
zindu[/QUOTE]
yes you'll need to be rooted. you don't need to do anything with media_codecs.xml. Just media_profiles.xml.
unlimited video recording android
yes you'll need to be rooted. you don't need to do anything with media_codecs.xml. Just media_profiles.xml.[/QUOTE]
Thank you, i will try to rooted later on today and report back if i succeed.
regards,
zindu
zoomin htc one
hello Dave,
i have tested the video, i captured 2 video phone was at stable position, one without touching zoom and the other shoot was zoomed about 60%
then i cropped the one with 0 zoom to the same frame as the one with 60% zoom.
the result is as follows:
after cropping the video file from 1920 x 1080 became 775 x 425 well if i keep this size the file remain same quality but when i cropped back to
1920 x 1080 the quality is blury and no where near the original or the video was shooted with 60% zoomin.
so i believe the zoomin in htc one does not effect its quality as long as you are not zoomed extreme.
when you crop video and resized you will lose quality the same as zoomin, but all camcorders allow certain zoom without affecting quality, so i believe htc one zoomin is the same, but some video camera have advanced zoomin to go beyond limited for instance 72x advanced zoomin and the normal zoomin is 20x, so if you go beyond 20 you still zoomin further but you will lose quality and shaky footage.so the safe is to stay with 20x range.
all edited with after effects and even i did not export the out put, but after editing them compared them side by side, it is like day and night the quality differences between the 2 videos.
thank you though for information, i will try first to root my device and see if i can go beyond the limited recording.
homeslice976 said:
I could be off here, but since you said recording stops at 30 minutes, I think I have a solution:
In /system/etc/media_profiles.xml, there is a "duration=" setting for each encoder profile. This can be set to either 30 or 60, and currently all profiles except qvga are set to 30. You may be able to set this to 60 and be able to record up to 60 minutes. Report back.
Click to expand...
Click to collapse
hello again
i have changed those number to 60
i started from
<!ATTLIST EncoderProfile duration (60|60) #REQUIRED>
and each
<EncoderProfile quality="cif" fileFormat="mp4" duration="60">
so as you see all are in 60 minutes but no luck sofar i tried twice
1st record 25:39
2nd attempt records 26:04
both size are 3.79 gb in size
now i started recording again to see what is the the outcome if it is the same then i have to try to changed back to 30 at least its 30minutes, so i think it is the size limit thing
update: it is size limit issue, i checked again it says video size limit is reached.
i think it is be useful if some one try to write a code to state when ever the video reach limited time then start again automatically.
but thanks for the advice, i will let you know if i come with better solution..
thank you.
regards,
zindu
update: it is size limit issue, i checked again it says video size limit is reached.
zindu said:
update: it is size limit issue, i checked again it says video size limit is reached.
Click to expand...
Click to collapse
Sorry - that was just a theory anyway. I'll keep looking around for something else that might be limiting the file size.
homeslice976 said:
Sorry - that was just a theory anyway. I'll keep looking around for something else that might be limiting the file size.
Click to expand...
Click to collapse
Hi guys, this seems to be the only real discussion on this issue going on at all.
Has anyone been able to find a way around this limitation?
the problem is there are many know how to solved but they do not shared with us.
only who does not know and they spread a word over the net and same crap like, it is due to format type, let me tell you i have solved mine on htc one no problem what so ever until i stopped manually.
i am not a programmer but currently when i have time i try to learn java then i will after that develop simple app and progressing from there and will help the community but that take up to 1 to 2 years.
any way how i solved mine? i do not know my self but i did 2 things will shared with all of you.
1. i rooted my htc one device, there is plenty guide on this forum.
2. i decompile my camera apk and i change a picture and i can not remember if i mess little with codes or not but i doubt i did, so i deleted the original camera apk and replaced with my modification.
i will be glad to share my camera apk with you if you think it might be due to this modifications, i tell you what? i never update the system software now, because i am afraid i will lose the unlimited recording, so it works for me but i do not know how, but in future when i understand java programming i will help every one in this community.
zindu said:
the problem is there are many know how to solved but they do not shared with us.
only who does not know and they spread a word over the net and same crap like, it is due to format type, let me tell you i have solved mine on htc one no problem what so ever until i stopped manually.
i am not a programmer but currently when i have time i try to learn java then i will after that develop simple app and progressing from there and will help the community but that take up to 1 to 2 years.
any way how i solved mine? i do not know my self but i did 2 things will shared with all of you.
1. i rooted my htc one device, there is plenty guide on this forum.
2. i decompile my camera apk and i change a picture and i can not remember if i mess little with codes or not but i doubt i did, so i deleted the original camera apk and replaced with my modification.
i will be glad to share my camera apk with you if you think it might be due to this modifications, i tell you what? i never update the system software now, because i am afraid i will lose the unlimited recording, so it works for me but i do not know how, but in future when i understand java programming i will help every one in this community.
Click to expand...
Click to collapse
Zindu, thank you so much for sharing.
I emailed Google about this here is the response I got:
"Thank you for contacting Google. I appreciate your patience with me as I look into this issue. It seems as though the limit placed on the video data file of 2gb is written into the android operating system. This is in effect on all types of android devices.
I have researched a few video control apps, they follow the same rule and stop at 1.9-2gb. At this time I do not believe there is a work around for this issue. I do not have software update information available either. Some of the research I have done points to a possible legislative law that limits the video recording time of mobile devices as it takes away from video recorders."
pal first thing you do undock the cam apk from the bar dock on your phone, see if it is working, what i mean by the dock is the bar on your phone on the bottom which have space for 4 or 5 applications, so undock cam apk from this dock and used on the main windows view.
if that does not work root ur phone and undock cam apk from dock bar.
if both does not work then if you have htc one i will upload my cam apk so you can install it on urs.
mine was limited to 4gb now its unlimited in size and durations, a programmer can develop application to over ride the camera system settings, so if i learn java in future my first apk will be try to over ride system setting.
zindu said:
pal first thing you do undock the cam apk from the bar dock on your phone, see if it is working, what i mean by the dock is the bar on your phone on the bottom which have space for 4 or 5 applications, so undock cam apk from this dock and used on the main windows view.
if that does not work root ur phone and undock cam apk from dock bar.
if both does not work then if you have htc one i will upload my cam apk so you can install it on urs.
mine was limited to 4gb now its unlimited in size and durations, a programmer can develop application to over ride the camera system settings, so if i learn java in future my first apk will be try to over ride system setting.
Click to expand...
Click to collapse
I have a Nexus 5. My camera app is not docked. What should I do next?
if its not docked then rooted anyway see if it works?
what i did i undocked, rooted, modified a pick and some codes in xml file, and it works for me so i do not know which step caused the fix, but you need to root your device if you want to replace system application on your phone.
try to root your device first and try to modify xml file see if it works, if it was htc one i could help because i can upload xml and apk file.
that is all i know for now hope someone who have better knowledges to help you out but i hope i learn java within a year or too then i be able to fix this issue.
m__singh said:
Zindu, thank you so much for sharing.
I emailed Google about this here is the response I got:
"Thank you for contacting Google. I appreciate your patience with me as I look into this issue. It seems as though the limit placed on the video data file of 2gb is written into the android operating system. This is in effect on all types of android devices.
I have researched a few video control apps, they follow the same rule and stop at 1.9-2gb. At this time I do not believe there is a work around for this issue. I do not have software update information available either. Some of the research I have done points to a possible legislative law that limits the video recording time of mobile devices as it takes away from video recorders."
Click to expand...
Click to collapse
So far this has been the most insightful information. Still, no idea how to overcome something this stupid.
joint.striker said:
So far this has been the most insightful information. Still, no idea how to overcome something this stupid.
Click to expand...
Click to collapse
Ikr, it is pretty ridiculous. Zindu is right though, it's simple enough but the people who can figure it out don't care. Most people just don't seem to need their phone for our purpose.
My workaround has been SVR Pro:
-Upsides -It will record in fragments until your storage is full.
-You can use your device while recording
-You can record with the screen turned off !! which is epic for battery life!
-Downside -you loose like a second of video between the fragments
Link: play.google.com/store/apps/details?id=com.zeronoiseapps.secretvideorecorderpro

Screenshot photo editing

Goodmorning.
Im finding myself taking more and more screenshots lately. Currently using Photodesk to draw on them with the stylus but was wondering if there is a better app for this.
Also. I want to get a Tasker profile to open this app, Photodesk or something better, after a screen shot is taken, but i cant seem to find the trigger for screenshot. (If someone knows how to open the actual screeny, that would be even better yet.)
Thanks!

NST Screen Saver Frequency Setting?

I've successfully rooter my Nook Simple Touch and explored all of its files and databases that I can find. But I cannot locate the setting to change that will update the frequency at which the screen saver changes images.
My goal is to have a folder of image files that change every 30 seconds or so. Unfortunately, the stock screen saver's change timer is much longer than that.
As a workaround, I set the screen saver activation time to 500 hours and installed Perfect Viewer to run its slideshow function, but this is less than ideal. I'd rather just do it the right way.
Does anyone know where this setting is located?
Thanks!
Reaperducer said:
I've successfully rooter my Nook Simple Touch and explored all of its files and databases that I can find. But I cannot locate the setting to change that will update the frequency at which the screen saver changes images.
My goal is to have a folder of image files that change every 30 seconds or so. Unfortunately, the stock screen saver's change timer is much longer than that.
As a workaround, I set the screen saver activation time to 500 hours and installed Perfect Viewer to run its slideshow function, but this is less than ideal. I'd rather just do it the right way.
Does anyone know where this setting is located?
Thanks!
Click to expand...
Click to collapse
That would seem to be a poor decision as far as battery life is concerned. Are you sure you really want to do that?
nmyshkin said:
That would seem to be a poor decision as far as battery life is concerned. Are you sure you really want to do that?
Click to expand...
Click to collapse
Battery life is not a concern in my application.
Reaperducer said:
Battery life is not a concern in my application.
Click to expand...
Click to collapse
OK, so I have to admit I didn't even know this happened. It's been a long time since I used a folder of images for a screensaver. What I seem to recall from that time was the images changing each time the NST went to sleep, but not during sleep.
Let me take a look. I guess one possible approach would be to consult a logcat after an image change and see if there are clues there.
I've come up empty on a search through the various B&N app databases and settings files.
Just to see this actually happen, I changed my screensaver from a static book cover image to one of the packages of images I installed years back. That was nearly 24 hours ago and there is still no change, which is what my memory told me to expect. So without an automatic change, there is nothing to look at in the logcat.
Are you sure your images actually change by themselves during the standby/sleep process? I know they change when you wake up the device and then let it fall asleep again.
You've already tried the slideshow idea or I would suggest that, but did you know there is a built-in slideshow (probably associated with the demo mode)? I don't know what the parameters of that are or whether you could replace the images with your own without breaking it.
Maybe a better question to help me understand what you'd like to do is: will the NST be used for something other than the slideshow display (either running in the background or running on demand when the device is awakened)? If all you want is the slideshow then any number of apps (like the PerfectViewer you mention) would work. Maybe something simple if you just need the slideshow. But if you really are using the device for other things and just want the sleep screen to change periodically, that's either got to be supported in the settings in an accessible way (which I'm doubtful about) or it has to be a custom alteration of the OS.

Categories

Resources