yashsingh1/xdaforums huggingface dataset:
[Android Software Development] androidworkz:
You generally should use getters and setters for accessing variables inside of another class. Meaning that you have a method to set the value of the variable and a method to retrieve the value

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class MyClass extends Activity {
private static int mMin = 0;
private static int mSec = 0;

private TextView titleText;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

TextView titleText = (TextView) findViewById(R.id.titleText);
}

public static int getSec() {
return mSec;
}

public static void setSec(int newVal) {
mSec = newVal;
}

public static int getMin() {
return mMin;
}

public static void setMin(int newVal) {
mMin = newVal;
}

public static void setTitleText(String newVal) {
if (titleText != null) {
titleText.setText(newVal);
}
}
}

Notice the "static" modifier of the class methods.

Generally, you wouldn't instantiate this activity class. Especially if it already lives in memory. What I am guessing that you are doing here is that "game" is your activity and that MyTime is an object that you are using from inside of the activity and that you need to modify variables that live in the main Activity.

If that is the case then you would just do something like this:

import java.util.TimerTask;
import com.myapp.game.MyActivity;

class MyTime extends TimerTask {

private int sec = 0;
private int min = 0;

@Override
public void run() {
sec = MyActivity.getSec();
min = MyActivity.getMin();
sec--;
if(sec==-1) {
sec=59;
min--;
}

String title = String.valueOf(min)+":"+String.valueOf(sec); //obviously you need formatting
MyActivity.SetTitle(title); // set text in title bar
MyActivity.setSec(sec);
MyActivity.setMin(min);
}
}

That said... I just did the above as an example. This is entirely the wrong way to make a game timer. There is a better example here
[Android Software Development] Rootstonian:
From what I remember from C++, you would have a "base" class and then other classes beneath that base class.

To use the base class methods, the other classes had to be "friends". I'm a little rusty on my JAVA syntax...is "extends" the same thing as a friend class?
[Android Software Development] morkon:
Java doesn't have friend functions, and "extends" means that the class is a subclass of whatever its extending.
[Android Software Development] jug6ernaut:
To access a function/variable between classes that said function/variable must be static. Beware tho when do this depending on you implementation you must check for null variables. Since its static you can access you dont need a class object to access them through.

ak. SomeClass.function();

instead of using SomClass sc = new SomeClass(); sc.function();

since u can access it at any time its contents may not be initialized and be null. So ALWAYS check for null varaibles! lol. That or u can have one variable of that class to check if its class is initialized. such as..

SomeFunction.isInit();

where isInit(); is

private static initialized = false;

public static boolean isInit()

{

return initialized;

}

where in your onCreate & on onDestroy functions you set the initialized variable accordingly.

or..u could just do if(SomeClass.this!=null) lol :S

/me stops writting wot
[Android Software Development] hyperbyteX:
Thanks for the input everyone. I've realised the problem (but still can't fix it). I can call methods in other classes from my timer class.... but my main class that has the methods that I need implements OnClickListener (public class game extends Activity implements OnClickListener) so it is ONLY updating the view methods when something is clicked on. How should I go about fixing it so that I can call methods that will update when a timer calls them (e.g. I display the remaining time in the title bar and it doesn't update the current time UNLESS a button is clicked on)
[Android Software Development] Gene Poole:
Why not run the timer as a thread in the activity class itself?
[EVO 4G Q&A, Help & Troubleshooting] the2ndtinman25:
I know linpack scores dont mean much, but I am a kinda keep up with jonses kinda person. How can I get my evo scoring in the 50's? I dont care if it is stable I just want my name on the list of top 10 for the evo.
[EVO 4G Q&A, Help & Troubleshooting] _MetalHead_:
Mine is 2nd in the list for EVOs, and I will never give up my secret.

MUAHAHAHAHA
[EVO 4G Q&A, Help & Troubleshooting] elegantai:
you sir, make me laugh way to much
[EVO 4G Q&A, Help & Troubleshooting] the2ndtinman25:
Oh come on help a poor idahonian out
[EVO 4G Q&A, Help & Troubleshooting] _MetalHead_:
I'm just messing man, the most I get right now is like 41.xx using the setup that's in my sig. I've never seen any scores as high as the ones in the list, and I've never seen anyone on here ever claim to get scores that high so I don't know what's up with those.
[EVO 4G Q&A, Help & Troubleshooting] the2ndtinman25:
Can't see your sig I'm using tapatalk
[EVO 4G Q&A, Help & Troubleshooting] elegantai:
I bet you I can reverse engineer the app to get some crazy scores lol. JJ..........
[EVO 4G Q&A, Help & Troubleshooting] _MetalHead_:
MIUI 1.1.28 with the SavageKernel 1.6 CFS-HAVS. I overclock to 1190 and set governor at performance for the test, smartass for normal use.
[Streak 5 General] DJSYNTHVIRUS:
Should i await the htc inspire(desire HD) since there will be roms for that, buy a streak and wait around a little longer or someone locally is selling a white streak but it has a tiny crack in it. I cant decide, is that even fixable?
[Streak 5 General] RussianSolja:
Do what I did, do some research on both phones. Read a couple of FAQs on both devices and then decide if thats what you want. Or you have option #2 buy the streak, test drive it, if you don't like it then just simply return it. :)

Sent from the phone killer of ALL phone's, Dell Streak!
[Streak 5 General] Spectre51:
Well seeing as how the inspire comes out next week its a toss up. I love my streak especially since loading streakdroid. I would say go play with the streak at best buy to see how you like the screen size. Its really what would be the difference.

Dell Streak powered by Streakdroid 1.7
[Streak 5 General] stormtrooper1:
I say go with the Streak because of screen size. I've been running HSPA+ on my Streak before ATTs 4G launch. Basically same features if not the same phone minus the 8mpxl camera, but the Streak will always dominate in screen size and is by far the king of phones in the ATT lineup.

Sent from my Dell Streak

DJ_Steve STREAKDROID v1.7.0 HD7

*******Superuser Rooted*******
[Streak 5 General] fogozito:
this :p:D:p
[Streak 5 General] stoney73:
I think I would wait a while. wait til some release dates come out for upcoming phones.
[Streak 5 General] mellojoe:
i'm in love with my Streak. Whipping out the 5" monster in a crowded room is sure to draw attention.

However, if you like customizing and custom ROMs, there is only one developer, DJ_Steve. He's awesome, and his newest ROM 1.7.0 so far seems as good as stock, while being faster without the pre-loaded bloatware. But there is only one of him. HTC has a much bigger community, much more developers, and more of a conventional layout.

With the HTC you are going with the grain, with the Streak you are going against it.

If I had to make the choice today, I would chose the Streak over the Inspire. The technology is similar, yet the Streak has the bigger, easier to read screen and the "WOW" factor that other phones don't.

Now, if the choice included the dual core Atrix ... that's a much tougher choice.
[Streak 5 General] Alahdal:
After 2 weeks of thinking and search I decided to go with Streak...
[Streak 5 General] rvbarton:
Good choice!
[Streak 5 General] mellojoe:
Step 1: Buy Streak

Step 2: QDL Tool

Step 3: StreakMod clockwork recovery

Step 4: Honeycomb! (Well, OK, for now DJ_Steve's 1.7.0, but hopefully soon...)
[EVO 4G Themes and Apps] douglaprincesz:
I really like the Samsung theme it's kinda like the iPhone, I was wondering if there was any way to get that theme on my HTC Evo
[EVO 4G Themes and Apps] LudoGris:
Try MIUI, just like the iPhone. Check under the development thread for the post on MIUI.
[EVO 4G Themes and Apps] Maddball:
Install ADW launcher and install the galaxy s theme.
[Captivate General] scooterjes:
I recently installed the Firefly Rom onto my Captivate(super sweet rom BTW) and went a little crazy adding fonts and it would let me get to the font selection screen until I removed some every time I tried to access the font menu it just force closed? Just curious thats all.
[Captivate General] Mcnia:
I had a Helvetica font that was causing the font menu to FC, that might have been the problem. I got it from the font thread in the Themes and Apps forum.
[Captivate General] flashman2002:
Same thing happened with me. Remove the helvetica font and all should be well.

This is my captivate. There are many like it buy this one is mine.
[Hero CDMA Q&A, Help & Troubleshooting] spleef:
Anyone have a link for the android Guy battery mod that works on aospcmod2/6?
[Epic 4G Q&A, Help & Troubleshooting] Mamucas:
Hi, I just have this problem trying to install DK28

ODIN gets stucked at boot.ini

I have to remove battery so I can put the phone in download mode again.

Any ideas? Thanks in advance!
[Epic 4G Q&A, Help & Troubleshooting] DiGi760:
Try redownloading the file. Or download a different one. Something may be corrrupted in the one you have.
[Epic 4G Q&A, Help & Troubleshooting] Mamucas:
Thanks a lot! :)
[Epic 4G Q&A, Help & Troubleshooting] musclehead84:
Did you get it to work?
[Epic 4G Q&A, Help & Troubleshooting] apatcas:
I would suggest clicking the re-partition check box, you might be getting stuck there if you're coming from ext4
[Epic 4G Q&A, Help & Troubleshooting] DiGi760:
He hasn't come back, so I'm guess his problem was really that simple.
[Epic 4G Q&A, Help & Troubleshooting] Mamucas:
Hi again! I did what Digi760 kindly suggest me. Tried with another file. The DI18 file and get over the stucked ODIN. The phone starto to download it ufff

Then I went again to DK28 and this time worked OK. Finally I did install TrulyEpic ROM

It was a long way till a working GPS. :D

Thanks!
[Epic 4G Q&A, Help & Troubleshooting] DiGi760:
Good to hear.

Now you should change the [Q] in your title to [SOLVED] so everyone knows there is no longer an unanswered question here.
[Android Apps and Games] AlexGT1:
Hi all!

I have SlideIT Ver 3.0 for android and need the Spanish language pack, I have a Pandigital E-reader and I don't have access to the Android Marketplace, can someone please download it (I think the language pack is Free) and share the link or email it to me?

Marketplace link (I can't open it on my device)

market://search/?q=pname:com.dasur.language.spa.pack

Thanks in advance for your help.

AlexGT
[Android Apps and Games] AlexGT1:
Bump, Still in need!
[EVO 4G General] smokingmango:
Ok i am a network admin, and we were having issues with our exchange server. So i was going though the event log to see what was going on... I noticed all these activesyc errors. ........Let me back a step

I had this lady i work with that has the HTC evo...i told her to get this over the BB b/c it was just a mcuh better phone and plus we got rid of the BES server...Well the first monthy everything worked fine. then one day her calendar stopped syncing....i have done pages worht of works and hints and slips and want nots to fix it...well nothing would work, so i just google calendar sync and synced it up to her gmail account then to her phone...Now on to what fixed the issue..

Again i noticed all these errors in the event log. Did some research and low and behold MS said what the fix was...

If you have access to your OWA *online exchange*, click on options, then on the right side click on phone. You should have a profile for syncing there...delete it or you may have multiple. delete them all. Then reset up your exchange account on your phone and whamo it works. NOW this fix not only works with Evo, but with Iphone, Palm, Windows mobile and all android devices, this lady wasnt the only one i was having this issue with. Hope this helps someone.
[EVO 4G General] khov07:
I've posted this solution in the past, as I myself ran into it (also a network admin). On initial sync with the new device, you have to wipe out all their old sync relationships on your server.

Beware that all the high-end Android Motorola's display an even more unusual issue: the original Droid, the X, and the Droid 2 all need to be synced at least twice before the calendar, contacts, and email items all sync properly. When I say twice, I mean to say that you have to perform an initial sync and let it finish (something inevitably doesn't sync, either the calendar is empty or the contacts are). Then you have to delete the account, wipe out the entire local cache that remains, reboot, then re-sync. It's odd, and I've never found a reason why, but it's a consistent issue with all Droids.

Some EVO's get weird sync errors too every once in a while. The Froyo upgrade solved a few, hopefully Gingerbread (if it ever shows up) doesn't create any new ones. I've got about a dozen EVO's in our environment.
[Galaxy Tab Accessories] cellwarrior6:
I found this Bluetooth keyboard accessories combination package on Amazon which looks nice. Really what I'm interested in is the keyboard and the stylus.

My question is has anyone used this keyboard on they're tab and would it work for my T-mobile USA galaxy tab. The description says Gt-P1000. Not sure if my t-mobile galaxy tab is the Gt-P1000.

Accessories combination link:

http://www.amazon.com/gp/aw/d.html/...=AKIAJ6Z6I5RK25FTZMMA&creativeASIN=B004J7MPEE

Pic:

Here is a youtube link to what I believe to be the same Bluetooth keyboard.

http://www.youtube.com/watch?v=IeTK_cwkcao&feature=youtube_gdata_player
[Galaxy Tab Accessories] ordio:
While i don't have your Galaxy Tab version, mine is the P1000 (Bell/Canadian), flashed with Modaco.

I have the keyboard and the stylus.

The keyboard is great... its small enough to do some simple typing. It was very easy to pair :)

The stylus itself i don't like and doesn't scroll like i thought it would. It does however allow me to select each part of the screen individually. In this case, i'd rather use my fingers to do that part.

Hope that helps!
[Galaxy Tab Accessories] lambstone:
yeah, i've seen this "keyboard" before, but it's actually more like a keypad. tiny.
[Captivate Q&A, Help & Troubleshooting] davidreidy:
Using latest Firefly Rom, and tried taking a video last night and the highest res just crashes the app. Tried rebooting phone, clearing out the videos / pics I had and still had the same problem. Lower resolution video works fine.

Thanks in advance for any help.
[Captivate Q&A, Help & Troubleshooting] MastaBetta:
Are you using the Speedmod "bigmem" kernel?

*Edit*

Looking back at the Firefly thread, It contains Speedmod version Q Bigmem. With Bigmem, you trade off more ram for the system in exchange for low quality video.

you can easily flash a new kernel with SGS Kernel Flasher.

Here is the latest Speedmod kernel http://xdaforums.com/attachment.php?attachmentid=510300&d=1296977210
[Captivate Q&A, Help & Troubleshooting] olwe:
I just tried this and it's giving me the same error. When I start the camera and switch to video, the app crashes.. I also installed the latest speedmod kernel. hmmm.. what to do?
[Captivate Q&A, Help & Troubleshooting] diablo009:
App crashing when switching to video means an issue with the camera app. This used to happen sometime way back on certain roms. And this crash doesn't have anything to do with video resolution. Check for the updated camera app. When I had this, I finally got hold for the camera app that worked, after like 3-4 failed attempts.

Try the two versions of camera apps I am attaching to this post. Make sure u rename the camera_old to camera before copying it. Do NOT try to install. Manually copy to /system/app folder.
[Captivate Q&A, Help & Troubleshooting] davidreidy:
Anyone know if the latest Firefly uses a speedmod with the same 720p camera issue?
[Galaxy S I9000 Q&A, Help & Troubleshooting] HDplease:
MY htc droid eris, unhacked, unrooted, is a piece of **** and i dont want to void the warranty, so i want a HD pmp.

camera

touchscreen

hd games

hd movies

support

1080p

after me research, im down to two devices. the ngp(psp2) or the galaxy player yp-gb1(gt I9000 minus the phone capabilities) which one should i get?
[Galaxy S I9000 Q&A, Help & Troubleshooting] INeedYourHelp:
Are you planning on making a purchase soon?

The PSP2 isn't coming out anytime soon (next Christmas).
[Galaxy S I9000 Q&A, Help & Troubleshooting] HDplease:
Maybe

If i decide to get the galaxy player, ill probably get it in june, if not then ill wait for psp2 and get it after thanksgiving
[Epic 4G Q&A, Help & Troubleshooting] zanderman112:
Is it possible to force the software keyboard to stay open with the hardware keyboard open?

Sent from my non-rooted, stock Epic.
[Epic 4G Q&A, Help & Troubleshooting] DiGi760:
I'm sure it is possible, but I bet someone will need source to make the modification, which means they have to do it on 2.1 or wait until an official 2.2 to come out.
[Epic 4G Q&A, Help & Troubleshooting] 063_XOBX:
I'm sure its possible but for the life of me I cannot find any use for it.
[Epic 4G Q&A, Help & Troubleshooting] zanderman112:
Idk I just think it would be cool. Just a question.

Sent from my non-rooted, stock Epic.
[Epic 4G Q&A, Help & Troubleshooting] socos25:
I believe anything is possible, but why would you want too? The reason for a hardware keyboard is that your screen gets to stay fully useable.. PLus playing games it is nice to have a hardware keyboard.
[Epic 4G Q&A, Help & Troubleshooting] musclehead84:
What would you use that for?
[Epic 4G Q&A, Help & Troubleshooting] DiGi760:
Yo dawg! I heard you like to type, so I put a keyboard above your keyboard so you can type while you type!
[Epic 4G Q&A, Help & Troubleshooting] zanderman112:
I actually know someone who can use the screen better with the screen out. Should it matter why i want it? Not really.

Sent from my non-rooted, stock Epic.
[Epic 4G Q&A, Help & Troubleshooting] zanderman112:
So, is anyone going to try and attempt this?

Sent from my non-rooted, stock Epic.
[Epic 4G Q&A, Help & Troubleshooting] knx2:
No
[Epic 4G Q&A, Help & Troubleshooting] endurance1:
i believe "smart keyboard" has this option.
[Epic 4G Q&A, Help & Troubleshooting] zanderman112:
I have smart keyboard trial, and I don't think I see that anywhere in the options. If its there tell me what its called.

Sent from my non-rooted, stock Epic.
[Epic 4G Q&A, Help & Troubleshooting] irule9000:
ultra keyboard

im 100% sure ultra keyboard has that option in its settings
[Epic 4G Q&A, Help & Troubleshooting] zanderman112:
That's a paid app, and the free version is a 24 hour trial.

Sent from my non-rooted, stock Epic.
[Android Software/Hacking General [Developers Only]] acsooley:
What is everyone using for tracking stocks? I cannot find anything useful with good widgets. Something that can: use google finance portfolio, track shares and costs, nice widget display for all stock ect....

Any suggestions?

Thx....

Adam
[Android Software/Hacking General [Developers Only]] SrMoure:
Stock quote is the best I found.

Sent from my Motorola StarTAC
[General Questions and Answers] carlo67:
hi

I have the Android to x86

I need to copy file in the \nnt\sdcard from my hard disc?
[EVO 4G Q&A, Help & Troubleshooting] nooomoto:
Ok so, I was flashing CM7-GX4...everything was going fine until I flashed GAPPS, now I'm stuck at two screens alternating between the CM7 boot animation and the screen that says "Welcome to PC36100", upon this screen loading it quickly restarts the CM7 boot animation, so on and so forth. I am able to get into CWM recovery. Please help.

Thank you in advance.
[EVO 4G Q&A, Help & Troubleshooting] elegantai:
thats a boot loop, looks like you want to wipe everything and try again
[EVO 4G Q&A, Help & Troubleshooting] nooomoto:
What if the PC36IMG file is renamed? I changed the name previously per the instructions of some thread I saw somewhere. Could this be the problem?
[EVO 4G Q&A, Help & Troubleshooting] elegantai:
well you lost me at the hboot image. The only time i have ever had to use a file like that is when i was rooting my phone.

I also do not use cwm, so i am kinda limited in the help i can provide. Did you wipe your system/data/cache before you flashed cm7?
[EVO 4G Q&A, Help & Troubleshooting] nooomoto:
I wiped everything. I've put the SD card in another phone and renamed it back to PC36IMG...lets see what happens LOL
[EVO 4G Q&A, Help & Troubleshooting] nooomoto:
Renamed file back to PC36IMG...still stuck in boot loop
[EVO 4G Q&A, Help & Troubleshooting] elegantai:
What exactly are you using the pc36img for?
[EVO 4G Q&A, Help & Troubleshooting] nooomoto:
I'm not using it for anything. It's just there from back when I rooted the phone. I had renamed it a while ago. Everything was going fine, install CM7 GX4 ROM, rebooted, attempted to install GAPPS and thats when I got stuck going back and forth between the two screens. I have put the SD card in another phone and renamed it to the original PC36IMG (figuring since I was stuck at a screen saying Welcome to PC36100 it couldnt find the file or something), and I'm still having the same problems. I've wiped and wiped and wiped using CWM and reinstalled CM7-GX4 several times and am still getting the same bootloop.
[EVO 4G Q&A, Help & Troubleshooting] nooomoto:
I'm running a restore from CWM...hopefully that will take me back to a point where I can do something.
[EVO 4G Q&A, Help & Troubleshooting] elegantai:
yeah, you dont need the pc36img after you root so that is not the problem. My only guess is that cwm is not wiping everything properly or you are missing a step in the install process. I guess you can try a few things:

See if your cwm recovery is up to date (i know earlier versions had issues clearing out properly, but that has since been fixed)

Start back from the beginning of the install process with that rom. Make sure to wipe data, system, and cache, and go back through step by step (sometimes it is easy to overlook a step). Also i noticed in the rom you are using it says to make sure to flash the wi-max kernel, so make sure you do that.

Lastly, I have never used that rom, but if you do not need 4g you can try flashing the actual cyanogenmod nightlies. They are very stable (its what i am running now), and you can grab the latest nightly from:http://mirror.teamdouche.net and grab the gapps from: http://goo-inside.me (universal package)

Sorry to lay a crap load of info on you, but i just don't know what would cause it. A bootloop (which is what you are experiencing with the going back and forth between screens) basically means something did not install right and is making your phone restart over and over.
[EVO 4G Q&A, Help & Troubleshooting] nooomoto:
I ran the recovery and got back to an old point. I guess I'll try again! Weird that it happened after flashing GAPPS as everything was fine up until that point. I'll grab the gapps from your source. Thanks!
[EVO 4G Q&A, Help & Troubleshooting] elegantai:
Well, i would only use the gapps from the link i provided if you are going to flash the official cm7 nightlies. I wouldnt mix and match! i surely don't want to cause further problems for you! lol. I was reading over that rom and I am not sure why you would need to reboot between installing the rom and the gapps. But again, not familiar with that version!

Sorry i couldnt help more :D hope you get it!
[EVO 4G Q&A, Help & Troubleshooting] nooomoto:
I used the gapps from your source and everything went fine. Thanks again for the help!
[EVO 4G Q&A, Help & Troubleshooting] elegantai:
no problemo, glad you got it working!