StackOverflowError in getString() - Java for Android App Development

Here's crash stack http://pastebin.com/C5pGuhKh
this started after I moved hardcoded strings into .xml with automatic refactoring (IDEA13)
Very strange

GR0S said:
Here's crash stack http://pastebin.com/C5pGuhKh
this started after I moved hardcoded strings into .xml with automatic refactoring (IDEA13)
Very strange
Click to expand...
Click to collapse
Well it seems that you are recursively calling your toString method in the HeroFragment... Could you give us the code of that method?

http://pastebin.com/pFK2TTEe

http://pastebin.com/nkwsxCsb PagerAdapter
http://pastebin.com/BnTu6Bni Fragment

GR0S said:
http://pastebin.com/nkwsxCsb PagerAdapter
http://pastebin.com/BnTu6Bni Fragment
Click to expand...
Click to collapse
That's a really funny error... from the logs I would guess that somehow the getString(R.blabla) method needs to get the calling class and also calls toString... Although I don't see that in the Android source code.
My solution would be to just don't override toString at all and use a different name like getTitle to prevent the system from calling that...

Well it worked before I moved strings. It was return "string"

SimplicityApks said:
That's a really funny error... from the logs I would guess that somehow the getString(R.blabla) method needs to get the calling class and also calls toString... Although I don't see that in the Android source code.
My solution would be to just don't override toString at all and use a different name like getTitle to prevent the system from calling that...
Click to expand...
Click to collapse
Well I won't be able to do that without my own fragment implementation. I found mistake, it's not possible to use getString() before activity attachment, probably I have to mess with reflection.

GR0S said:
Well I won't be able to do that without my own fragment implementation. I found mistake, it's not possible to use getString() before activity attachment, probably I have to mess with reflection.
Click to expand...
Click to collapse
Right, or you could just make a method returning the required title per id inside your activity that is then called by the ViewPager

Related

Schedule a dayly script execution and soft reset

Schedule Reset is a small utility that offers these capabilities.
- Soft reset of your device every day at a specified time.
- Optional warning sound and countdown before actual reset (just in case you are using the device).
- Optional execution of a script before the reset to delete garbage files, backup, etc.
- Automatical aborting of the script if its execution time exceeds a specified timeout.
- Default script engine is nScript (freely available at http://www.s-k-tools.com/util.html).
- Other script engine can be used by changing some registry keys.
Screen captures
been using it for the last 2 days...
not much to say about it except that it works and works well...
haven't tried the scripts thing 'cause I can't program, but nice option!
Has anyone else been using this on a Wizard? Any bugs?
Works great on the Universal
does anyone know how to automatic enter the pin of the phone after the softreset?
does anyone know how to automatic enter the pin of the phone after the softreset?
@oruam57: thanks for the ns info. May i know how you were able to create the exe files?
Why need a Pin in the First place?
_onoff said:
does anyone know how to automatic enter the pin of the phone after the softreset?
Click to expand...
Click to collapse
Why need a Pin in the First place?
Normally we require a PIN for security; If the software is bypassing that , why not DISABLE PIN REQUEST alltogether?
Prompt me if I am wrong pls..
We are all learning :idea:
oldsap said:
@oruam57: thanks for the ns info. May i know how you were able to create the exe files?
Click to expand...
Click to collapse
You mean what development environment I used to develop ScheduleReset.exe? I used Borlard Delphi 2006.
thanks. is there an easier way to make an exe file?
Re: Why need a Pin in the First place?
jeasbe said:
_onoff said:
does anyone know how to automatic enter the pin of the phone after the softreset?
Click to expand...
Click to collapse
Why need a Pin in the First place?
Normally we require a PIN for security; If the software is bypassing that , why not DISABLE PIN REQUEST alltogether?
Prompt me if I am wrong pls..
We are all learning :idea:
Click to expand...
Click to collapse
when you have 2 or more numbers on the same card, and their only activated by the PIN you enter... like... CARD 1 - PIN 0001 CARD2 - PIN 0002 ... google for sim emu
Nice app thanks - set mine to reset at 0400 every day.
Give me a chance to learn script writing
Anyone have some ready made scripts to try?
Would like a script to clear certain directories - temp/volatile etc...
meschle said:
Nice app thanks - set mine to reset at 0400 every day.
Give me a chance to learn script writing
Anyone have some ready made scripts to try?
Would like a script to clear certain directories - temp/volatile etc...
Click to expand...
Click to collapse
ScheduleReset.ns.sample1 is a ready made sample that deletes the contents of the \temp directory (including subdirectories). Just rename it to ScheduleReset.ns and copy under the directory where ScheduleReset.exe is.
To add more directories just add calls to ClearDirectory with the full path, that is
function main()
{
ClearDirectory("\\temp",0);
ClearDirectory("<your directory here>",0);
}
Notice that you should use a double slash ("\\"), its a quirk of the ns string syntax.
WARNING: be very careful with ClearDirectory as it can delete very much in very short time. A full backup before starting is highly advisable.
oruam57 said:
meschle said:
Nice app thanks - set mine to reset at 0400 every day.
Give me a chance to learn script writing
Anyone have some ready made scripts to try?
Would like a script to clear certain directories - temp/volatile etc...
Click to expand...
Click to collapse
ScheduleReset.ns.sample1 is a ready made sample that deletes the contents of the \temp directory (including subdirectories). Just rename it to ScheduleReset.ns and copy under the directory where ScheduleReset.exe is.
To add more directories just add calls to ClearDirectory with the full path, that is
function main()
{
ClearDirectory("\\temp",0);
ClearDirectory("<your directory here>",0);
}
Notice that you should use a double slash ("\\"), its a quirk of the ns string syntax.
WARNING: be very careful with ClearDirectory as it can delete very much in very short time. A full backup before starting is highly advisable.
Click to expand...
Click to collapse
Many thanks for that - yes i use spb backup and will set too editing your script - ta
Has anyone been using this on a Wizard? Any bugs?
matheprat said:
Has anyone been using this on a Wizard? Any bugs?
Click to expand...
Click to collapse
Works good on my wizard no bugs so far :wink:
Think the warning sound should sound for the full 20 secs countdown. As it is you get 1 beep and thats it. Maybe a selectable countdown sound.
Azriaphale said:
Think the warning sound should sound for the full 20 secs countdown. As it is you get 1 beep and thats it. Maybe a selectable countdown sound.
Click to expand...
Click to collapse
Well, the idea is to have the reset time set deep in the night. Therefore, too much noise would be annoying. The sound and the countdown are there only in the unlikely case the phone is in use, so you can stop the reset sequence.
Anyway the registry entry
HKEY_CURRENT_USER\Software\ScheduleReset\SoundFilePath
contains the path of the sound file. Replacing it with someting more noisy and longer (for example \Windows\Jig.wma) should suit you.
Cheers for the info.

[APP][Update 07-11-08] LockDown, keeping stuff private

Don't you hate it when you let someone play with your shiny new WM phone
they usually go right to your SMS inbox?
jonesj8 had the same irritation, so inspired by him I threw something together
Original thread :
http://forum.xda-developers.com/showthread.php?t=375057
I created a new thread to have a bit more overview, and also to get it under the attention of other users who might be interested
@mods
I can understand if you close this thread...
How does it work.
this version requires you to change all the .lnk files pointing to tmail.exe, or to the dll...maybe even other ones...
I say all lnk's but the most important are the ones the "friend" is going see/use.
I've included a shortcut creator in the attachment.
In FileList.ini specify the application to block,
in the included file it's \WIndows\tmail.exe
and i've used msg as argument.
so in the .lnk would point to lockdown.exe with the argument msg
if the passcode is correct the file will be opened.
it's not very quick (since it needs to be opened) but this should change in the next version.
the passcode can be changed in the settings.ini, default is 12345
Let me know what you think or if you have any ideas
Update Version 0.4
Well I finally got around to an update, which is attached below
The application has been rebuild from the ground up, I've used a Lock and Key method, e.g. the lnk uses key.exe which communicates with the server (the lock) this way the server only needs to read the filelist once which should save time.
<note>
because of this you will need to enter the items in the FileList.ini prior to starting the server, when the server is running it will create the used shortcuts for you
which you can then place.
if you add stuff while it is running the shortcuts wont be created...
pointers on making the FileList.ini is in the readme below.
New in this version
- installer (cab)
- app to date support
- redesigned layout
- support for arguments, opening the sms should work now, it does for me
- locking of other files should work now too (thesed with a html file)
- automatically create the proper lnk files in sub folder
To do
- include support for different screen sizes
- way to customize the colors
- mask input with *
- skinning...?
In case someone is bored and wants to create the graphics, be my guest,
My creativity in that department is next to null
Sounds great. Any chance of a screenshot of the lock screen?
Mr_Gee said:
Click to expand...
Click to collapse
Thanks, trying it now
works good, cant seem to get arguments passed to tmail.exe in settings.ini
ie.
msg=\Windows\tmail.exe -service "SMS"
just opens account picker, is on todo list? not bugging you, good app,
thx!
great will it run on VGA? make it as simple as you can so when we are in hurry the soft won't load so long
This looks nice and configurable.
Are we able to make it request the pin for any application listed in FileList? First try didn't work, I want to restrict more than just the inbox
sorry, double post
badaas said:
works good, cant seem to get arguments passed to tmail.exe in settings.ini
ie.
msg=\Windows\tmail.exe -service "SMS"
just opens account picker, is on todo list? not bugging you, good app,
thx!
Click to expand...
Click to collapse
Correct that isn't working... also i'm not sure if it will be in there,
the reason is I wanted to change the app so it looks at the window name,
this would close all message related windows, and there is no need to change the .lnk files
theme freak said:
great will it run on VGA? make it as simple as you can so when we are in hurry the soft won't load so long
Click to expand...
Click to collapse
Not yet, but is planned for future versions, I'll add it to the todo list.
evojulz said:
This looks nice and configurable.
Are we able to make it request the pin for any application listed in FileList? First try didn't work, I want to restrict more than just the inbox
Click to expand...
Click to collapse
Currently any application can be restricted by providing a ID + location, e.g
xyz=\Program Files\TCPMP\player.exe
changing the link to tcpmp would have lockdown popup first
What application would you like to restrict?
Mr_Gee said:
Correct that isn't working... also i'm not sure if it will be in there,
the reason is I wanted to change the app so it looks at the window name,
this would close all message related windows, and there is no need to change the .lnk files
Click to expand...
Click to collapse
hmmm, not sure i know what you mean. But basically, as it is now, I can't go direct to the inbox of sms using your lockdown? \o?
thanks
badaas said:
hmmm, not sure i know what you mean. But basically, as it is now, I can't go direct to the inbox of sms using your lockdown? \o?
thanks
Click to expand...
Click to collapse
Basically, no
but as a workaround you could try making an lnk to tmail.exe with the -service etc. in there, next change the FileList.ini pointing to that new lnk...
not sure if it will work though
Mr_Gee said:
Basically, no
but as a workaround you could try making an lnk to tmail.exe with the -service etc. in there, next change the FileList.ini pointing to that new lnk...
not sure if it will work though
Click to expand...
Click to collapse
bLEhg! lol, ok, will look into that (scratches head )
some novelty things to add: skins, mask input with '*', maybe use symbols instead of numbers, 'jumble' keypad/symbols random for added security (if using symbols )
thanks for infos and keep up the good work
badaas said:
bLEhg! lol, ok, will look into that (scratches head )
some novelty things to add: skins, mask input with '*', maybe use symbols instead of numbers, 'jumble' keypad/symbols random for added security (if using symbols )
thanks for infos and keep up the good work
Click to expand...
Click to collapse
Let me know if it worked, I'll look into the symbols
Skinning was already on my list great minds ....
input mask is also a good one
Any chance you can re-scale the images to fit a 240x240 screen res?
Can test it you want.
Cheers, Mike.
Mike1002 said:
Any chance you can re-scale the images to fit a 240x240 screen res?
Can test it you want.
Cheers, Mike.
Click to expand...
Click to collapse
I'll give it a shot
@ the rest
there are 4 basic resolutions right?
320 X 240
320 X 320
240 X 240
640 X 480
the rest is pretty exotic (Omni & X1)
is this possible on htm files?
Hi Mr_Gee, thanks for sharing
I have an couple of offline files I would also like to lockdown. Is it possible to lockdown those htm files as well? tia.
adomila said:
Hi Mr_Gee, thanks for sharing
I have an couple of offline files I would also like to lockdown. Is it possible to lockdown those htm files as well? tia.
Click to expand...
Click to collapse
probably...
have you tried entering them in the FileList.ini file?
currently not working on html files
Mr_Gee said:
probably...
have you tried entering them in the FileList.ini file?
Click to expand...
Click to collapse
now, that you mention it yes, i have tried it and it does not work, if it is the specific html file. the lockdown screen would still appear but nothing happens after entering the code. maybe it will work, if the iexplore.exe itself is lockdown but this will lock down every/all html files. would it be a big change to code it, just for specific html files? i'm also thinking on specific text files just like the said html files. i keep notes on pure text files like tax account number, passwords, pincodes, etc in a text or word file. maybe this is pushing too far. maybe in the next version/release? hehehe thank you for sharing and more power...
Sorry I was on holidays
I've tested with PIE.exe and i plan this for the next version.
Please note though that this tool is only for making sure "friends" don't read your personal stuff very easy, but passwords/pin codes might be a bit too high risk..
I think this should be further developed! It really should come standard on winmob... hey Gee, if you need a cab builder or photoshop, I'd be happy to help! Let's make this idea the next ROM must-have!
I wanna use this program because every time someone wants to see my phone, they get to snooping into my personal info. However, I'm afriad if I start changing things manually, I'll screw my phone up.

[REQ] Registry help with Diamond2 GSensor

I'm working witht he Diamond 2 Gsensor sdk on my Diamond and I have been able to successfully add string values to the whitlist section in the gsensors registry. (HKCU\Software\HTC\HTCSENSOR\Whitelist)
The whitelist values enable rotation. My question is how can I create a "Blacklist" so to speak that would contain values for apps I dont want rotated? Is it possible? If so is it as easy as crating the said paths?
Anybody?...
powe6563 said:
I'm working witht he Diamond 2 Gsensor sdk on my Diamond and I have been able to successfully add string values to the whitlist section in the gsensors registry. (HKCU\Software\HTC\HTCSENSOR\Whitelist)
The whitelist values enable rotation. My question is how can I create a "Blacklist" so to speak that would contain values for apps I dont want rotated? Is it possible? If so is it as easy as crating the said paths?
Click to expand...
Click to collapse
I have not tried this yet myself but i would guess, and tell me if im wrong, that the only time it will rotate is if the app is in the white list if its not in the white list then it will not rotate.
irus said:
I have not tried this yet myself but i would guess, and tell me if im wrong, that the only time it will rotate is if the app is in the white list if its not in the white list then it will not rotate.
Click to expand...
Click to collapse
Well this is true, however, the whitelist uses class names to determine what apps to rotate. The class name "dialog" refers to multiple apps like the phone dialer, call status, sms composer, and more. So when I add "dialog" in the whitelist it rotates all of these. I would like to try and make an exception list that uses the process name or window name as the identifyer. That way I could have dialog in the whitelist and cprog.exe in the exceptions or blacklist key. It may not be possible but thats what I'm asking I guess.
bump... c'mon guys theres gotta be an answer to this.
I found this in http://www.htcmania.com/showthread.php?t=36214
is in spanish.
[HKEY_CURRENT_USER\Software\HTC\HTCSENSOR\GSensor\M oduleName]
"Album"="\\Windows\\HTCAlbum.exe"
"Calculator"="\\Windows\\htcCalculator.exe"
[HKEY_CURRENT_USER\Software\HTC\HTCSENSOR\GSensor\W hiteList]
"TestHTCSensorDemoAP"="TESTHTCSENSORDEMOAP"
"Album"="HTCAlbumClass"
"Calculator"="CalculatorMain"
"Opera"="Opera_MainWndClass"
"SMS"="Dialog"
"Calendar"="Calendar"
"FileExplorer"="FEXPLORE"
"PROGRAM"="Explore"
"IExplore"="IExplore"
"Manila"="Manila"
vengadorhq said:
I found this in http://www.htcmania.com/showthread.php?t=36214
is in spanish.
[HKEY_CURRENT_USER\Software\HTC\HTCSENSOR\GSensor\M oduleName]
"Album"="\\Windows\\HTCAlbum.exe"
"Calculator"="\\Windows\\htcCalculator.exe"
[HKEY_CURRENT_USER\Software\HTC\HTCSENSOR\GSensor\W hiteList]
"TestHTCSensorDemoAP"="TESTHTCSENSORDEMOAP"
"Album"="HTCAlbumClass"
"Calculator"="CalculatorMain"
"Opera"="Opera_MainWndClass"
"SMS"="Dialog"
"Calendar"="Calendar"
"FileExplorer"="FEXPLORE"
"PROGRAM"="Explore"
"IExplore"="IExplore"
"Manila"="Manila"
Click to expand...
Click to collapse
Thanks, I have that much so far but I'm still looking for a way to specify between cprog and tmail in the whitelist because they both use Dialog as a class name. Thanks for the effort though
can someone make it cab file?
powe6563 said:
Thanks, I have that much so far but I'm still looking for a way to specify between cprog and tmail in the whitelist because they both use Dialog as a class name. Thanks for the effort though
Click to expand...
Click to collapse
Did you try:
HKEY_CURRENT_USER\Software\HTC\HTCSENSOR\GSensor\M oduleName]
"Album"="\\Windows\\HTCAlbum.exe"
"Calculator"="\\Windows\\htcCalculator.exe"
"SMS"="\\Windows\\tmail.exe"
[HKEY_CURRENT_USER\Software\HTC\HTCSENSOR\GSensor\W hiteList]
"TestHTCSensorDemoAP"="TESTHTCSENSORDEMOAP"
"Album"="HTCAlbumClass"
"Calculator"="CalculatorMain"
"Opera"="Opera_MainWndClass"
"SMS"="Dialog"
Seems logical to me. But as always the logical thing isn't the right choice by definition.
One tip though, if you want to know something, just try! That's the way other people get their knowledge about these things....
And afterwards, please share your results with the rest of the world ofcourse!
rondol1 said:
Did you try:
HKEY_CURRENT_USER\Software\HTC\HTCSENSOR\GSensor\M oduleName]
"Album"="\\Windows\\HTCAlbum.exe"
"Calculator"="\\Windows\\htcCalculator.exe"
"SMS"="\\Windows\\tmail.exe"
[HKEY_CURRENT_USER\Software\HTC\HTCSENSOR\GSensor\W hiteList]
"TestHTCSensorDemoAP"="TESTHTCSENSORDEMOAP"
"Album"="HTCAlbumClass"
"Calculator"="CalculatorMain"
"Opera"="Opera_MainWndClass"
"SMS"="Dialog"
Seems logical to me. But as always the logical thing isn't the right choice by definition.
One tip though, if you want to know something, just try! That's the way other people get their knowledge about these things....
And afterwards, please share your results with the rest of the world ofcourse!
Click to expand...
Click to collapse
I've tried, negative...
dingil said:
I've tried, negative...
Click to expand...
Click to collapse
Same here. I still havent figured out a way around this.

HEX-Edit DLLs?

Hello, been trying to figure out how to change hex values in a X1 panel (only one dll file). I found what I want to change, I can edit the bits manually or automatically thru XVI32. But as soon as I load it into X1 the panel just freezes on load. Is it not possible to change anything within a dll file without making it corrupt? I open and save it and it works. I open and swap places of two letters and it freezes. Trying to figure this out, but it's driving me insane just about now. Maybe someone has some words of wisdom for me?
Did you re-sign after the edit?
jhoffa said:
Did you re-sign after the edit?
Click to expand...
Click to collapse
Yes I used siggner.exe, got successful on signing, but not timestamped. Is timestamp a neccessity?
Could someone perhaps explain to me how to extend a bit-string? I can replace the characters that are there, but how do I replace the current string with a longer string without messing up the references?
MrRusch said:
Could someone perhaps explain to me how to extend a bit-string? I can replace the characters that are there, but how do I replace the current string with a longer string without messing up the references?
Click to expand...
Click to collapse
To put it simply, you can't.
You can remove data and leave blank areas because all pointers refer to the same important locations afterwards, but adding data you can't without changing every reference to that and every following location.
alias_neo said:
To put it simply, you can't.
You can remove data and leave blank areas because all pointers refer to the same important locations afterwards, but adding data you can't without changing every reference to that and every following location.
Click to expand...
Click to collapse
Figured it would be something like that. But maybe it is possible to create a script which does this automatically if I input how many bits have been added at which offset..? Guessing it's not since then someone should already have made it by now..?
Nope
Again, not so simple, you would have to disassemble the DLL in order to find all the references to other locations and rewrite the DLL. I'm not aware of a simpler way.

How to overcome titanium limit on no. of elements?

Hi, there seems to be a limitation on the number of elements one can show on each panel. I've got to the stage where every time I add a new text element it replaces an existing one... i.e. I can't add more. I've heard there's a way around this, can anyone point me in the right direction?
Thanks.
Yes - at the moment no solution, only workaround, like I wrote you.
But in the dialog of drkfngthdragnlrd there could come out some new findings.
Let's go on here to continue the posts of *20items-limit* from JMLToday-Skins-Thread.
Last post there from
drkfngthdragnlrd said:
Try manually entering it, do not use ATPluginInstaller, It's designed for known working formats, not trying custom code.
EDIT: Speaking of ATPluginInstaller, great app, but maybe time for someone to make a newer version as it is getting old now & custom code like this will give errors. Plus, it doesn't support writing to specific CPR's that aren't named Titanium_###.cpr. I wonder what ever happened to AppStar...
HUM: Just noticed something to do with T-Mobile's Myfaves Plugin for CHome. We're missing a dll.
Code:
[HKEY_CLASSES_ROOT\CLSID\{3BA1B2A6-CFE8-4220-91C1-526CB9F00337}]
@="CMHOME MyFaves plugin"
[HKEY_CLASSES_ROOT\CLSID\{3BA1B2A6-CFE8-4220-91C1-526CB9F00337}\InprocServer32]
@="CMHOMEaddon.dll"
"ThreadingModel"="free"
Click to expand...
Click to collapse
MichelDiamond said:
Then we should find it
OK - I tried again - and Plugin-Installer is only used to make a copy to cpr in JMLToday for changing skins. No different to manual edit... but Plugin disappears with Layers per Page (No error message, only disappear)
Yes - we need an update of ATPluginInstaller. Mortscript 4.2. provides also a customized Setup.dll.
Perhaps we should go on talking about the limit in the thread, which Jumba opened:
http://forum.xda-developers.com/showthread.php?t=544576
to have the finding in one place?
I'll answer there and set a link to this page
Click to expand...
Click to collapse

Categories

Resources