yashsingh1/xdaforums huggingface dataset:
[Android Software Development] alostpacket:
If I understand your question correctly, you are trying to get a reference to an Id stored in the R class, but which reference you need changes at runtime?

If that is the case, I think you may want to program a custom utility/method that can return the correct R reference for you. R is just a static generated class of ints, so it cannot evaluate something like R.id.dynamicterm1_dynamicterm2 where dynamicterm1 and dynamicterm2 change at runtime.

One way to do this might be a static util class like this:

package org.townsend.spanish.donate.util;
import org.townsend.spanish.donate.R;

public class ReferenceFinder
{
public static int find(String prefixName, String suffixName)
{
int returnValue = -1; // -1 indicates an error

if ( prefixName.equals("verb") && suffixName.equals("tense") )
{
returnValue = R.id.verb_tense;
}
else if( prefixName.equals("adj") && suffixName.equals("tense") )
{
returnValue = R.id.adjective_tense;
}

return returnValue;
}

Then you would call it like so:

Resources res = getResources();
int resourceID = ReferenceFinder.find("verb", "tense") ;
String[] listItems = res.getStringArray( resourceID );

I'm sure there are other ways to do this, but this is the first that came to mind. Hope that helps :)
[Android Software Development] tht13:
would that mean that in the resource finder class that i'd have to define every possible outcome? because i'll have hundreds of outcomes once i have loaded the full list's and their outcome array's

and i think you have understood me correctly, basically it's and app (for spanish) where in one spinner you input a verb, in another you input a tense, and when you press a button it fills a list view with the 6 conjugations.

also it seems like in the second snippet of code i would have to actually set the "verb" and "tense" or could i put something dynamic like

verbs.getSelectedItem() + "_" + verb_tenses.getSelectedItem

Thanks for the help :)
[Android Software Development] alostpacket:
hmm.... you might be able to do it via reflection actually, so that you wouldnt have to define each one.

I'm not 100% sure what the code would be but it would probably looks something like this:

String className= "com.example.myapp.R.id";
Class cl = Class.forName( className );
String fieldName = verbs.getSelectedItem() + "_" + tenses.getSelectedItem();
Field f = cl.getDeclaredField ( fieldName );

//since field is static, the "object" is ignored
int resourceID = f.getInt ( new Object() );
[Android Software Development] tht13:
ok thanks :) i'm trying to get it to fit in, and i believe i have:

@SuppressWarnings({ "unchecked", "rawtypes" })
private void verbAndTense()	{
Spinner verbs = (Spinner) findViewById(R.id.verbs);
Spinner verb_tenses = (Spinner) findViewById(R.id.verb_tenses);
verb_tenses.getSelectedItem();

String className= "org.townsend.spanish.donate.R.array";
Class cl = Class.forName( className );
String fieldName = verbs.getSelectedItem() + "_" + verb_tenses.getSelectedItem();
Field f = cl.getDeclaredField ( fieldName );

//since field is static, the "object" is ignored
int resourceID = f.getInt ( new Object() );
String[] listItems = f.getStringArray( resourceID );
ListView conjugated = (ListView) findViewById(R.id.ListView01);
conjugated.setAdapter(new ArrayAdapter(this,
android.R.layout.simple_list_item_1, listItems));

}

where it says :

String[] listItems = f.getStringArray( resourceID );

is it correct to put the "f" in there? and second is asks to define "Field" what should i import it as? or do i need to declare it in another format?
[Android Software Development] alostpacket:
should be something like

String[] listItems = getResources.getStringArray( resourceID );

resourceID is an int just like R.id.something_something
[Android Software Development] tht13:
i changed getResources to res, since it was defined as:

Resources res = getResources();

however my problem with "Field" in the line:

Field f = cl.getDeclaredField ( fieldName );

still exists, it says "Field cannot be resolved to a type" and gives me a load of options including imports, making a new class, interface, enum or adding a parameter. what should i do? I've tried several of the imports but then other segments suchs as:

cl.getDeclaredField ( fieldName );

become errored.

Thank you for all your guys' help so far :)
[Android Software Development] Rootstonian:
If you're using the Field class and don't IMPORT it, well, that's a problem :)

You're best friend --> http://developer.android.com/reference/java/lang/reflect/Field.html
[Android Software Development] tht13:
thank you :) yes my porblem was i was unsure which to import it as, although i was more confident about it being that one (i had about 8 options from eclipse)

previous code however has now given me errors, :

Class cl = [U]Class.forName( className )[/U];

this section saying : "Unhandled exception type ClassNotFoundException"

Field f = [U]cl.getDeclaredField ( fieldName )[/U];

this with: "Unhandled exception type NoSuchFieldException"

and

int resourceID = [U]f.getInt ( new Object() )[/U];

with: "Unhandled exception type IllegalAccessException"

I looked through the field resource page and the last one where it says this error occurs when the field is not accesible....:/

I then checked the Class resources page and the first one said that type ClassNotFoundException is thrown when requested class cannot be found, and i thought i had declarred it in the previous

String className= "org.townsend.spanish.donate.R.array";

I know that in the example you provided me you put R.id, howeve this is a value array so it should be array right?

and the second says its thrown when the field cannot be found.

Im guessing that means that the first one is affecting the rest? how could i correct this,

if you wish to see the entire void it is here

@SuppressWarnings({ "rawtypes", "unchecked" })
private void verbAndTense()	{
Spinner verbs = (Spinner) findViewById(R.id.verbs);
Spinner verb_tenses = (Spinner) findViewById(R.id.verb_tenses);
verb_tenses.getSelectedItem();

String className= "org.townsend.spanish.donate.R.array";
Class cl = Class.forName( className );
String fieldName = verbs.getSelectedItem() + "_" + verb_tenses.getSelectedItem();
Field f = cl.getDeclaredField ( fieldName );

//since field is static, the "object" is ignored
Resources res = getResources();
int resourceID = f.getInt ( new Object() );
String[] listItems = res.getStringArray( resourceID );
ListView conjugated = (ListView) findViewById(R.id.ListView01);
conjugated.setAdapter(new ArrayAdapter(this,
android.R.layout.simple_list_item_1, listItems));

}

Thank you :)
[Android Software Development] alostpacket:
Yes, sorry it should be R.array or whatever :)

As for the "unhandled exceptions", if you use eclipse, just do the "recommended fix" and it will add a try/catch for you.

You may have to define some fields outside the try catch block and move some stuff around a bit after eclipse adds the try/catch.

Also, just as an aside, you may want to read a tutorial or two on reflection in Java so what I am saying doesnt sound as new/strange. Not required but it always helps to know a bit of reflection I think :)
[General Questions and Answers] AdamWeee:
I recently posted that i was selling my Gtablet in the general forum for my tab. I got an infraction for not posting in the ' \"Marketplace" ' forum. I have spent quite some time combing through the forums searching for it, and can't seem to find one. Does this exist? Am I reading something wrong? I don't like infractions for not following rules that aren't possible. If you guys could point me in the right direction, and also explain why a place where you post things want actually sell would not be in a place where potential buyers/sellers could easily find it, it would be greatly appreciated.
[General Questions and Answers] sweetnsour:
marketplace
[General Questions and Answers] AdamWeee:
Is that considered a development forum? I clicked the link, and it took me to a message telling me I don't have permission to access the page, with the standard noobs can't post on dev forums disclaimer. Is it because of the infraction? Can I not even view the marketplace forum, even without posting? Is a 5 point infraction that bad, and how long does it last. I apologize for asking so many questions, but the rules are more about the stressing the iron fist policy and less about actually explaining rules, I'm somewhat frustrated.
[General Questions and Answers] DroidFreek:
Well I believe you need 10 post to access the marketplace.
[General Questions and Answers] r_wright1:
So you are not even allowed to browse the marketplace unless you have 10 posts? And if its so hard to find, whats the point of having one?
[General Questions and Answers] bulletproof1013:
Mp=general

Sent from my unbrickable cappy *bam*
[Windows Phone 7 Q&A, Help & Troubleshooting] Floods7:
I have bought some apps and I dont want to lose them when I get a new phone or change to a custom ROM? Is there a way you can get them without purchasing them again?
[Windows Phone 7 Q&A, Help & Troubleshooting] Sir. Haxalot:
Yeah, all apps are connected to your Live account, so you'll be able to download them free of charge next time. If you're installing the apps via Zune they should even automatically sync to your phone :)
[XPERIA X8 Q&A, Help & Troubleshooting] anfyd:
Hello dear xda-community,

I'm new to community OS, but I gave it a try. Rooted, xRecovery installed, App2SD - everything no problem. But I have huge problems with getting FroyoBread to work.

At first I downloaded the latest version of GingerDX, installed it (custom zip) via xRecovery and when I'm now booting, it always shows the animation of that skateboarding blue Drood (don't know the name of it, sorry). So after 5 minutes I took the Akku out and tried it again: same :/

So I thought to myself: Why not FroyoBread? It has the features you need and also a nice look. So I tried this - unfortunately the same. The animation continues until the orange Drood (sorry again) and then it freezes. In both cases I let it load for an estimated 15 minutes, maybe it takes longer at the first run - I was wrong :>

I did several full wipes, I don't know what else to do. I set up my old backup to be able to keep using it, but with FroyoBread it would be much better, wouldn't it?

Excuse my bad English, I'm German and heard of you guys being pros at you area, so I decided to demand to the highest :D

Sincerely,

anfyd
[XPERIA X8 Q&A, Help & Troubleshooting] Nikkopt:
Indeed strange.. Can you check your baseband and see if it ends in 15?
[XPERIA X8 Q&A, Help & Troubleshooting] anfyd:
First thank you for your reply.

Jup, my baseband version ends with 15, kernel is also up to date. I updated everything with SEUS. Are there maybe other ways to install FroyoBread?

Sincerely,

anfyd
[XPERIA X8 Q&A, Help & Troubleshooting] SpyderX:
Not very sure why this happened, but I suggest you do the following.

Flash back to stock rom.

Root it again.

Install xRecovery.

Boot into xRecovery.

Backup your phone.

Perform a full wipe.

Wipe cache.

Wipe dalvik-cache

Install Froyobread/GingerDX using the install custom zip method.

Perform a full wipe again.

Wipe cache again.

Wipe dalvik-cache again.

Reboot your phone.

Pray for the best (not needed).

Hope this worked!

Cheers :D,

SpyderX
[XPERIA X8 Q&A, Help & Troubleshooting] anfyd:
For some reason it's working now but sometimes it boots forever - after taking out the akku and try it again, everything works smooth.

Thanks a lot to you for replying to me (:
[XPERIA X8 Q&A, Help & Troubleshooting] sindrefs:
Happening to me :(

This is happening to me, does never start :(
[Sony Ericsson XPERIA X10 Mini] homasholz:
is it possible to port timescape from the new one which already has gingerbread to mini pro with ging or any other firmware ?

thx for reply ;D
[Optimus One, P500, V General] thingswelostinthefire:
Sometimes while I'm scrolling pages fast with Opera Mini or writing with Swype suddenly my phone hangs and the four physical buttons are blinking, with screen on freeze.

The only solution is to remove the battery.

Anyone had this strange behaviour before?

Experienced a lot with stock ROM and sometimes still with CM7...
[Optimus One, P500, V General] DaXmax:
1. That is a kernel panic

2. If u had it overclocked, lower down the freq...

3. Swype sucks badly, update newer version...

Sent from LGE XDA phone
[Optimus One, P500, V General] thingswelostinthefire:
So I've got a kernel panic... my O1 looked like christmas tree! :)

No overclock, just 600Mhz.

I've got the lastest Swype version, most of the time I have the problem with Opera Mini.

So it must be "just" an App problem, right?
[Optimus One, P500, V General] Dr.Alani:
I have had few such incidents myself. I did not have it with Opera Mini as I don't use it. I am using mik's CM7 and Franco's Kernel v18 with DT A2SD.
[Optimus One, P500, V General] aspee:
there are lots of thing which feel laggy on unrooted or 600mhz overclocked it
[Eee Pad Transformer Q&A, Help & Troubleshooting] rommark:
Guys

Rooting Asus TF B7 >> Any news?

Thanks!
[Eee Pad Transformer Q&A, Help & Troubleshooting] tryerxda:
http://tinyurl.com/3gkmx5h

Don't forget to hit that thanks button...

========================

Whatever happened to IronFist?
[Eee Pad Transformer Q&A, Help & Troubleshooting] TheDeadCPU:
Timezones mate.
[Eee Pad Transformer Q&A, Help & Troubleshooting] realdope:
rooting asustf b70+

what is the actual state of rooting our transformer b70 with new sbk?

Thanks in advance TO al devs
[Eee Pad Transformer Q&A, Help & Troubleshooting] thebadfrog:
10character
[T-Mobile LG G2x] ZeroT| Demented:
everyone start tweeting nvidiategra to get teh source code

If you cant read it all those tweets say this

You guys need to release the source code for the tegra 2 thats inside the g2x,you guys dont know how to code give it to XDA nOW
[T-Mobile LG G2x] Mister Hat:
Done ;)

10chars
[T-Mobile LG G2x] gpmartinson:
will do

done---hapy to help in any way I can.
[T-Mobile LG G2x] KRAZYADROIDMASTER:
Will do when I get on my PC tonight!
[T-Mobile LG G2x] ZeroT| Demented:
this should be stickied so eeryone can see it and we get that source code
[T-Mobile LG G2x] herzzreh:
Pointless. XDA are .2 percent of all users, they don't give a rat's ass. We've been through this on the Epic fora.
[T-Mobile LG G2x] ZeroT| Demented:
killjoy much
[T-Mobile LG G2x] jboxer:
Vendors don't release proprietary driver source code unless you are covered by an NDA. You aren't going to get it. I got Marvell to give me source code once but under an NDA and it was extremely difficult to do and took a long time. Also, since I was under an NDA it which meant I had the code but could not disclose any of it or give it to anyone else, period. Sorry, but those tweets will just be wasted key presses.
[T-Mobile LG G2x] joe75:
sorry, guys, nagging nvida will get you nowhere! :rolleyes:
[T-Mobile LG G2x] namklak:
I'm curious as to why people imagine this might happen? Is there a precedent that h/w vendors for Android platforms have released source for drivers? Or released specs (like register maps) for hardware? Some h/w vendors don't even write drivers for h/w - that's what gives embedded C programmers like me job security (I've been involved in plenty of NDAs like mentioned above).

So what is the "norm" for the Android platform?
[T-Mobile LG G2x] dkb218:
Maybe, Just Maybe

we can bug the hell out the CIA and find out who killed JFK! Was there really a UFO at Roswell?

So you really think that after sending them the above message they are going to say what? "Sure, we know we can't code so here, take all of our hard work and make it work cause we are idiots!" You have a better chance of getting the answers from the CIA.
[T-Mobile LG G2x] eagle1967:
probably right

and we all know the shot really came from roswell not the bush.

But i heard all the same things when people complained about locked bootloaders

they dont care you make up 1/2 a percent etc.

you dont get anywhere without trying.
[T-Mobile LG G2x] KingDavid63:
I think this helped us to get ginger bread... Worth a try.

Sent from my Blue Steel Weapon!
[T-Mobile LG G2x] mojorisin7178:
Done I hope this helps
[T-Mobile LG G2x] bighulk666:
Agreed. I posted on Facebook.
[T-Mobile LG G2x] navendugoyal:
hmmm seems interesting
[T-Mobile LG G2x] FatalityBoyZahy:
Did you get the source code yet? :P
[T-Mobile LG G2x] nonmindo:
hey, head on over to the nvidia developer zone at the link below and post a comment, I'm never going to buy another tegra powered device until they release the HAL source for at the very least the A2DP

Nvidia developers page, thread about opening the HAL
[T-Mobile LG G2x] fcisco13:
Sad how this is the only thing keeping my phone from being perfect, this too will be my last nvidia device...
[T-Mobile LG G2x] blestsol:
Yeah I think imma leave nvidia alone after this also.
[Nook Color Q&A, Help & Troubleshooting] Quelin:
Nook was new, 1.2.0

Rooted it with ManualNooter 4.6.16

I made a bootable CWM SD card using these directions http://xdaforums.com/showthread.php?t=987735

All that worked, I got to a rooted android OS.

Then I installed Phiremod 6.3 using this guys instructions http://quinxy.com/2011/04/14/comple...od-7-install-and-configuration-on-nook-color/

After that my nook would only go to this screen. I can still use my CWM boot SD to get to Clockworkmod

How do I progress from here? What have I done wrong which I need to set right?

I am downloading the two files from this thread, just in case its a solution.

http://xdaforums.com/showpost.php?p=17207673&postcount=5
[Eee Pad Transformer Q&A, Help & Troubleshooting] argie:
I love the stock browser, and particularly the instant menu that appears when you touch the right edge.

But I find it quite annoying that its developers haven't though of including an option to immediately close the browser, with and without clearing cache and history. A solution like hitting Home/TaskSwitcher/Kill is an idiotic design decision... as is to just leave the browser open in the background.

How do we reach the developers?
[Eee Pad Transformer Q&A, Help & Troubleshooting] thebadfrog:
This is feature not a bug. Having the browser "open" in the background is not costing you anything. This is the way android is supposed to work.
[Eee Pad Transformer Q&A, Help & Troubleshooting] RojasTKD:
Tap the "X" to close the tab and the browser will close.
[Eee Pad Transformer Q&A, Help & Troubleshooting] denenatse:
I know it looked funny at first, but like he said, the close button "X" is right below the "+"
[Windows Mobile Apps and Games] luis4ever:
Hello all, this is my first post here on the forum so i dont know if sharing this kinds of Apps is forbidden(please comment about this). Well, i have installed in my PPC the best Mobile Chess Software ever made "Pocket Fritz 4.1(i have faced against ChessMaster Grandmaster Edition with a result of 2819 ELO for Pocket Fritz)", Pocket Shredder(very good), Toga 1.4.1 SE(Add on as a Powerful Engine for Pocket Fritz) and ESET Mobile Antivirus. I want to share with all of you this Apps for Free.

All these software is full and you only need to install to your PPC.

Note: Please dont upgrade Pocket Fritz or you will deactivate it.

PD: This software works with WM 5.0, 6.0, 6.1, 6.5 and 6.5.3(i dont know if work on WM 2003)

**MOD EDIT - LINKS REMOVED**
[Windows Mobile Apps and Games] altae:
Is it cracked? If the answer is yes it is indeed forbidden.
[Windows Mobile Apps and Games] timmymarsh:
Most of the software listed is warez (cracked) and therefore against XDA rules.

Please DO NOT post cracked software on this site.

Links removed and thread closed.
[Motorola Droid 3] edru:
So basically Im stuck.

After goofing around with this thing I wanted to restore to stock. I didnt back up any bloat software and attempted this.

Now im stuck where it wants you to add accounts, upon hitting next it asks for my location permissions, then it crashes because of myaccount.apk, then that loops.

After playing around im totally botched...

Booting normally leads me to a "AP Fastboot Flash Mode (Last Flash Failed)" screen. I can kill that and get to the "Boot Mode Selection Menu" as well. Selecting recovery from that menu will erboot to the typical dual core boot screen, then back to "invalid flash mode"

Long story short - is there a file or method that will get me back to factory from here?
[Motorola Droid 3] kshen1:
You can use psouza4s tools to restore your /system/app.
[Motorola Droid 3] edru:
From what boot mode though? I cant get IN to android so I cant connect via ADB.

Boot Menu results:

Normal Mode: Invalid Flash Mode

Recovery Mode: Invalid Flash Mode

AP Fastboot: ALL GOOD

BP SBF Flash: ALL GOOD

BP Only: Sits at the M Dual Core Screen - But device is detected

AP BP USB Bypass: Sits at the M Dual Core Screen - But device is detected

BP Tools: Invalid Flash Mode

My guess is I need to flash a recovery file somehow to get to a proper recovery, then some kind of update.zip or such I can flash.
[Motorola Droid 3] rynosaur:
First of all . . . don't wipe. Second of all, have you tried the booting into bp tools method with your terminal/power shell set to:

adb wait-for-device shell
[Motorola Droid 3] edru:
Too late. Wiping is how I ended up in this position :/ - And Im unable to do the adb wait command because BPTools gives me invalid flash mode.
[Motorola Droid 3] IronFists:
if there was a way to get a backup in a recovery update.zip form place on a sd card and use the recovery menu
[Motorola Droid 3] edru:
Again here is what happens when selecting different boot modes.

Boot Menu results:

Normal Mode: Invalid Flash Mode

Recovery Mode: Invalid Flash Mode

AP Fastboot: ALL GOOD

BP SBF Flash: ALL GOOD

BP Only: Sits at the M Dual Core Screen - But device is detected

AP BP USB Bypass: Sits at the M Dual Core Screen - But device is detected

BP Tools: Invalid Flash Mode

So recovery is not an option as you can see.
[Motorola Droid 3] IronFists:
Boot to where your phone is detectable use psouza4s tools get the system restore apps he provides his tools will install them ... all bloatware will be back..
[Motorola Droid 3] psouza4:
Anyone who has a bricked DROID 3 phone (Verizon only), I may have a solution for you.

Requirements:

Windows platform

7-zip installed (and know how to extract files)

ability to follow all instructions exactly

willingness to factory reset/lose data on their phone

This unbrick method is NOT guaranteed to work, but it's very hopeful for most situations where other methods aren't working. If you are in desperate need of a fix, send me a PM and I'll link you some files to try.

Lastly: I will not be walking through anyone step by step on how to run this procedure -- the included instructions should be more than enough for most people. If you read the instructions and are thoroughly confused, then

this fix isn't for you.
[Galaxy S II Q&A, Help & Troubleshooting] TECK:
Can anyone extract the latest Google Books app from their phone and post a link? Thanks
[Galaxy S II Q&A, Help & Troubleshooting] TECK:
Never mind, I got it. Thanks.
[Galaxy Tab Q&A, Help & Troubleshooting] headphonezz:
i need the stock att firmware the galaxy tab came with. I've searched and searched and found nothing the thread with the stock firmware only gives a black screen and rotohammers link is no longer work so if any1 has a link or could send me it i thank you
[Wildfire Q&A, Help & Troubleshooting] aruda:
Hello.I've installed cyanogenmod rom 7.1 and found out that gps not working,so I used rom manager to flash custom recovery image.But rom manager flashed recovery v.5.0.1 so I still can't flash radio.Can anybody help me? Thanks for reply.
[Wildfire Q&A, Help & Troubleshooting] Scratch0805:
If you scroll to the bottom in rom manager you can choose a different version for your temporary recovery.
[Wildfire Q&A, Help & Troubleshooting] wolfway:
Yep, and version 2.0.5.7 or so should do the trick :)

PS: sorry to go a little bit offtopic, but the newer CWM versions, do they lack the ability to delete cache, dalvik and data seperately? I rooted a friends wildfire and put CMW newer version on it and I only found a single delete possibility, seemed odd to me... (worked though)