yashsingh1/xdaforums huggingface dataset:
[Desire HD General] fortuneman:
Hey there, I enjoy reading this forum but I had little to contribute with as I am an android noob. So unfortunately my first post is a question forced by the fact that something is wrong with my DHD :( Thank you in advance for your advices!

The problem is - when in areas with low 3G coverage the phone keeps on searching for 3G for too long instant of seamlessly switching to 2G, which often has full signal bars. This way the phone acts as if there was no signal and sends incoming calls to the voicemail even though all it has to do is to switch to 2G as soon as 3G gets too weak.

My previous phones had no problem with this. In my city the 3G quality varies from area to area but the 2G coverage is perfect almost everywhere. So I used to be sure that my phone never really disconnects from the network, it only might have dropped the 3G signal in favor of 2G while keeping the calls and everything.

I know I can disable the 3G and stick to 2G and EDGE but this way using full data capabilities of the phone turns into pain instead of pleasure.

Just to make sure and to show I did my homework, this is NOT:

- the death grip case

- a network related problem /I suppose.../

- a problem with data connection /I have never run into any problems with this/

My questions are:

- is anyone of you experiencing this?

- is there a way to force the phone to hand over the connection from 3G to 2G quicker without "blind spots"?

- does any custom ROM improve this? /I am running the latest stock HTC DHD android 2.2 with Sense/

- is there any hint that android 2.3 gingerbread should fix this issue?

Thank you, hope to find a piece of good advice here!
[Desire HD General] fortuneman:
I`ve found this service menu and I switched the preffered network from WCDMA preferred to GSM AUTO PRL. will see if it helps.
[Desire HD General] fortuneman:
I havent noticed any more problems since I did the switch. I think it helped. I cannot be 100% sure but I think it did the thing for me. I forgot to mention that I also switched networks mode from Auto to European but I think this has nothing to do with the issue.
[Desire HD General] Andy:
fortuneman had my answer. To access the service menu on the soft phone keypad enter *#*#4636#*#* and its under Phone Information.
[Desire HD General] Defectus:
Switching from 2g to 3g works seamlessly. But the other way around doesn't work that well. Nothing to do with the phone. Just the net tech that has its flaws. If your in a call and switch to 2g, the call will most certainly be disconnected.
[General Questions and Answers] RazorHail:
hello,

I'm writing a Android App (java) - but I guess this question is pretty general, and isn't java-specific:

so I have an Array of Elements

and I let a random-number-generator pick one array-element randomly and hand it to me.

now I've also built in a "score"-field into each array Element

so what I want to do now, is that the random-number-generator takes the array's "score" in consideration, and gives me the array-elements with the higher/lower scores with a higher/lower probability

I dont want it to ALWAYS/NEVER give me the elements with the highest/lowest score - just with a higher/lower probability

I hope I could describe my problem in a proper way....

does anybody know how to achieve this?

(as I said, i use java, but i guess code in any language - or even pseudo-code would help me out)
[General Questions and Answers] RazorHail:
*bump*

anybody?
[General Questions and Answers] stephj:
Try this, it's in C# but it's pretty close to Java.

You cannot directly weight the random function so you have to use a different method.

By applying a weight to each item in the array, then using a random function to select using the weighting values, the results of the selection can be swayed.

The weighting values are relative to each other.

Using the values in the code, 'B' should turn up about three times more often than 'A'

The only object that may need some explanation is Random:

http://msdn.microsoft.com/en-us/library/system.random(v=VS.80).aspx

using System;

namespace RandomWeighting
{
class Program
{
static void Main(string[] args)
{

char[] Select = new char[10] {'A','B','C','D','E','F','G','H','I','J'};
int[] Weight = new int[10] {10,30,25,60,20,70,10,80,20,30};
int[] WeightSum = new int[10];

int i,j,k;
Random Rnd = new Random();

WeightSum[0]=Weight[0];

for (i = 1; i < 10; i++)
WeightSum[i] = WeightSum[i - 1] + Weight[i];

for (j = 0; j < 70; j++)
{
k = Rnd.Next(WeightSum[9]);

for (i = 0; k > WeightSum[i]; i++) ;

Console.Write(Select[i]);
}
Console.WriteLine();
}
}
}

Output:

HEFIBHHCCFBCAEFFDHACHBEJHHFDFIDFEDFFCHHDJBIDJEHHFHCJJJBHJGBDDGFDDFHHHB

Note the low density of A and G as opposed to H

It is just a sample at random, but 2 'A's and 7 'B's roughly matches the conjecture above, but over a million selections, the distribution is as follows:

A 30664
B 84187
C 70648
D 168481
E 56529
F 197311
G 28145
H 225764
I 56613
J 81658

If your code changes values in the Weight array then the WeightSum array must be recalculated.
[General Questions and Answers] RazorHail:
wow, thats a lot!

The only thing I dont understand about the code is this line:

k = Rnd.Next(WeightSum[9]);

for (i = 0; k > WeightSum; i++) ;

what exactly happens here?

what kind of a for-loop is this?

why is there no body?

and strangely, while debugging this line, i noticed that the value of i jumps to some random number in this line - and I have no idea why and how

------

by the way: I've already tried it out, it works pretty good.

although I noticed that the first element always gets picked ALOT, no matter how low the weight.

I think thats a flaw in the algorithm
[General Questions and Answers] stephj:
After the following code:

for (i = 1; i < 10; i++)
WeightSum[i] = WeightSum[i - 1] + Weight[i];

The WeightSum array contains the following values:

[0]	10
[1]	40
[2]	65
[3]	125
[4]	145
[5]	215
[6]	225
[7]	305
[8]	325
[9]	355

The Random.Next() function that takes a single integer as an argument is defined as:

-------- Courtesy of MS VS .NET Help ------

public virtual int Next(int maxValue)

Parameters maxValue Type: System.Int32

The exclusive upper bound of the random number to be generated. maxValue must be greater than or equal to zero.

Return Value Type: System.Int32

A 32-bit signed integer greater than or equal to zero, and less than maxValue; that is, the range of return values ordinarily includes zero but not maxValue. However, if maxValue equals zero, maxValue is returned.

-------------- End of Help ----------------

So, we are asking for a random value between 0 and 354,(element WeightSum[9] above). The following code then finds which is the lowest element of WeightSum which holds a value greater than the one we have been given. When this happens 'i' contains the index to use for the selection.

for (i = 0; k > WeightSum[i]; i++);

The standard construction of a for loop in C is

for(One or more initialisation statements; Do_While_True Condition; One or more iteration statements)

{

loop processing code;

}

If there is nothing to do in the loop body, you don't need it, and you can replace it with the ';' at the end of the for statement. In effect, it is identical to the following code:-

i=0;
while(k > WeightSum[i])
{
i++;
}

As regards the first element being picked more than the others, have a look at the distribution table in post #3. It is what you would expect for the values given. I assume the difference is either the Random function in Java or some different implementation between C# and Java.

You may have to change some of the code slightly, i.e. change the for() loop to the while() loop above and step though it in the Java debugger to get to the root of the problem.

You can't debug a for loop followed by an immediate ';' The entire for loop is executed to completion when you use debug and try and step through it. To debug it place a dummy statement in the for loop. A breakpoint may now be set on this line.

int i,z;

for (i = 0; k > WeightSum[i]; i++)
{
z=0;
}
[General Questions and Answers] volkipp:
ActionScript and Javascript versions ...

Thanks for the great write-up! In case anyone is interested, I've adapted this into a javascript and ActionScript class. If anyone is interested, I've attached the code. For a more in-depth post, check out blog.teamthinklabs.com.

Cheers!

Kipp Ashford

Art Director

Seven2 Interactive
[Galaxy S I9000 Q&A, Help & Troubleshooting] S7AN:
Hello,

I have a SGS I9000 Gt from France I think.

Everything was running good. I installed a bunch of apps when I first got the phone, checking stuff out. After playing with it for a few months I now have a good idea of what apps I would like to keep.

I decided to do a factory reset so I could start fresh when froyo does come out.

I performed three button recovery and did factory reset and wipe cache partition.

Problem is when I reboot I constantly receive "The process "blank" has stopped unexpectedly. please try agian." message, and I hit force close and it just pops right back up. TwLauncher, Daily briefing, acore, and a google one.

I did notice that in the recovery mode menu I get some red text saying "multicsc : can not acces to /system/csc/XEF/system/" But when I go through the steps to reset and clear cache, it does it and gives me a message "wipe complete"

I removed battery and sim card No sd, and tried again with no luck, every time I boot now same thing, apps keep crashing.

I hope that makes sense I don't really know what to do.

So yea any help would be great!

Thank you so much for your time.
[Galaxy S I9000 Q&A, Help & Troubleshooting] Uraeus:
I almost have the same problem here.

I updated the firmware with Kies, using the default firware that was found by Kies.

I guess it has to be a custom made ROM made by/for my phone service provider (Bouygues, a French company).

Upon restarting, I get the same pop-up messages. Cannot close them fast enough to use anything. My phone is not usable, though not bricked.

Ps : formerly running off-the-factory custom Bouygues rom. Rooted and using OCLF or something lag fix.
[Galaxy S I9000 Q&A, Help & Troubleshooting] Uraeus:
I solved at least MY problem :

Do a factory reset and wipe cache AND user data. Simple as that

The answer was actually in the [Warning!!!] Do not flash... thread. I should slap myself for not looking into it first.

Hope it solves your problem too.
[Galaxy S I9000 Q&A, Help & Troubleshooting] S7AN:
Thanks for the help, but how do you how did you wipe user data? Maybe I am blind but I don't see it?

I think I did that when I did the factory reset. When I do boot up however, my original unlock pattern is still set...so I don't know wtf is going on.

FIXED!!

I used Kies Registry Patcher v.1.6.0.0

then reset user data and cache WORKS GREAT AND I HAVE FROYO NOW!!
[myTouch 3G, Magic General] jeffakajeff:
So my phone was acting up, so I called T-Mobile and they decided to send me a new phone, and as we were talking, he mentioned my phone was being shipped with Froyo.

Anyone else hear about an update for the 1.2? Or was that guy an idiot ;)

Will know in three days, excluding weekends and holidays.
[myTouch 3G, Magic General] cmacia06:
Yea its true. Everyone in my city with a my touch got an update to froyo and there shipping them out with it to.
[myTouch 3G, Magic General] jeffakajeff:
yeah, the original mytouch got the update last month, but not the 1.2, which is what I have.
[myTouch 3G, Magic General] bassdroid:
I just got a warranty 1.2 in the mail and it has 1.6 installed.
[myTouch 3G, Magic General] MasonGL:
Sounds like he just told you what you wanted to hear, don't worry it happens all the time.
[myTouch 3G, Magic General] bassdroid:
the non 3.5 mytouch will get the update by 12/15. As for the non 3.5mm there is no set plan for the update. I found this on the t-mobile mytouch 3g forum.

http://forums.t-mobile.com/t5/myTouch-3G/Ladies-and-Gentlemen-Froyo/td-p/496813
[Legend Android Development] totob333:
i'm using FroYo Official WWE Android 2.2 Rom.

i'm trying to make a transparent notification bar which suppose to be sooo simple.

i've replaced the status_bar_background.png in the framework-res file with a transparent one and pushed it back to system/framework.

the problem is that instead of transparent it looks black, is there another file i need to change?
[Hero CDMA Q&A, Help & Troubleshooting] Bierce22:
Okay I was bored and I was browsing YouTube and I saw this crazy Rom on higher end phones from China called Miui it combines ios with Android and it looked really nice and I was wondering if it would be possible for this Rom to be ported to the hero
[Hero CDMA Q&A, Help & Troubleshooting] tailsthecat3:
pretty sure its being worked on...
[Hero CDMA Q&A, Help & Troubleshooting] raymond4:
The miui rom is only for hdpi arm7 devices I don't think it will be ported to the sprint cdma hero
[Hero CDMA Q&A, Help & Troubleshooting] Bierce22:
There's an ios port for the mytouch 3g sapphire wich was my old phone so I don't know I want to figure out how to get that on my old phone aka craptouch lol
[Hero CDMA Q&A, Help & Troubleshooting] raymond4:
I like the way the miui rom look even if it gets ported the miui rom would probably run slow on our hero
[Hero CDMA Q&A, Help & Troubleshooting] theimpaler747:
Yeah, it's not really going to happen :o Nobody is working on it, as it would run very poorly on the hero
[Hero CDMA Q&A, Help & Troubleshooting] andronut:
theres some hope!!!

http://miui-dev.com/forums/showthread.php?226-How-to-Port-to-HTC-HERO-CDMA
[Hero CDMA Q&A, Help & Troubleshooting] theimpaler747:
Only thing is the kernel would have to run.... but perhaps it could be done to some extent, at least the images
[Hero CDMA Q&A, Help & Troubleshooting] stayclean:
bcnice20 is one of the MIUI devs for EVO, so if the images and everything get converted to mdpi, who knows. Maybe I'll end up having to put my foot in my mouth. :D
[Hero CDMA Q&A, Help & Troubleshooting] theimpaler747:
I know, I'd have to as well :) But by then I'll probably on a new phone :D
[Hero CDMA Q&A, Help & Troubleshooting] andronut:
Okay so if this only requires a resizing of images. I have a relative that is a programmer and he said he could do it. Does it require more and if so, can you give me a guide pre-made so I don't waste your time and maybe we can get this Rom.
[Hero CDMA Q&A, Help & Troubleshooting] ranger61878:
It will require more than just resizing some images.
[Hero CDMA Q&A, Help & Troubleshooting] il Duce:
There is now a thread in development about a port for hero, just started today I think.

sent from my hero, which no longer sucks ass
[HD2 General] fallenmonk:
I uninstalled office communicator the correct way. Now none off my apps except the ones that came with the hd2 work. Every one that I have put on inc clean RAM and all games do not open. Says cannot be trusted. I cannot even uninstall them. What to do ?.
[HD2 General] fallenmonk:
All my photos and music is vanished off my m.card. What the Heck is this app ?.
[HD2 General] fallenmonk:
Crap, it was wiped my memory card inc my buisness sales. Not good. Any hope?.
[Android Software Development] b3jsd73jfx:
I have a custom listview that pulls from an array, however when I reach a point that I have to scroll down to see more items, the items start to repeat themselves. According to the array, the items are fine and not repeating themselves, it looks like it's just the ListAdapter. Any help is greatly appreciated. I think the getView is really the only problem, but if you need other parts of the code, let me know.

public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder;
if (convertView == null) {
convertView = mInflater.inflate(R.layout.list_item, parent, false);
holder = new ViewHolder();
holder.title = (TextView) convertView.findViewById(R.id.row_title);
holder.summary = (TextView) convertView.findViewById(R.id.row_summary);
holder.url = (TextView) convertView.findViewById(R.id.row_link);
convertView.setTag(holder);
String item = CurbAlert.listings[position];
item = item.replace("<br>", "");
String title = item.substring(item.indexOf("<title>") + 16, item.indexOf("</title>") - 3);
String summary = item.substring(item.indexOf("<description>") + 22, item.indexOf("</description>") - 3);
if (summary.length() > 100) { summary = summary.substring(0, 100); summary += "..."; }
holder.title.setText(title);
holder.summary.setText(summary);
holder.url.setText(item.substring(item.indexOf("<link>") + 6, item.indexOf("</link>")));
} else {
holder = (ViewHolder) convertView.getTag();
}
return convertView;
}
[Android Software Development] footboydog:
Try moving everything from line 10 to 17 inclusive until after the if-else statement. You want to setup the views even if you get your holder from getTag().
[G Tablet General] dwright1542:
The viewing angles finally got the best of me...

The Electronics MGR must have seen me coming...he had the return process mostly done by the time I got to the counter. I didn't even have to give a reason.

He mention that he had gotten 30 in. He sold 8. All 8 came back.

He also mentioned that none of the sales team was recommending it, because it's bad for the bottom line...
[G Tablet General] RavenII:
Did they charge you the %15? Also, which Sears?
[G Tablet General] rayden25:
Yeah, which one. I need to pick them up at $279 a piece!
[G Tablet General] uncola:
just returned mine to the sears in pearl ridge on oahu, hawaii. fyi
[G Tablet General] rushless:
Stuff is usually more expensive in Hawaii... how much? ;)
[G Tablet General] konawayne:
Do you guys think most sears have returned gtabs?
[G Tablet General] dwcasey:
http://www.searsoutlet.com/10-Andro...md&cid=1483&pn=1&ps=10&pid=70612&mode=buyUsed
[G Tablet General] cuzzinz:
I would almost be afraid to order from there. Had anyone ordered from the outlet? The site mentions scratched items.

Inticing at 100 off retail...what do ya all think?
[G Tablet General] konawayne:
Gotta be in ny for that one.
[G Tablet General] harpua1980:
I just picked up my second G tab from the Sears in Scranton PA. Ordered from searsoutlet for 279. This one is a gift for my brother.

When I got to the customer pickup the lady said that "they don't get stuff from sears outlet" and that the tablet she got for me was from a pile of other tablets.

The package was unopened...and when i unboxed the tablet it looked completely untouched.

So bottom line is..I got a brand new tablet for 279.

Im not sure what the deal is with the searsoutlet but i know that tabs pop up a lot...and I don't see how they could have been sent back and forth to China for refurbishing?..?
[G Tablet General] rayden25:
CLick on the "refurbished" link. That is the term they use for anything NOT new! LOL!
[G Tablet General] cuzzinz:
I just realized that you cant order it to be delivered anyways... so must be a way for them to get rid of open box product and such. Closest one to me is Alabama ... and I am in California oh well.
[G Tablet General] ewitte:
Holy cow 8 out of 8 returned? After showing mine to a client the other day I told them if they wanted one to wait until Honeycomb comes out in 2011 and the bugs are worked out. Being that I would be the one supporting it.
[G Tablet General] khaytsus:
I'm waiting for one to show up in the local Sears Outlet here, with the state this thing is in by default, $400 is way too high.

Viewsonic is going to catch hell from a bunch of retailers over this one.. Sears, Staples, Office Max (?), any others selling this lemon?

The fine folks here on XDA are making good strides on the tablet, and I suspect soon there will be good ROM that "just works", but out-of-box this thing is total crap and the 8 of 8 returned doesn't surprise me one bit.
[G Tablet General] awlllwa:
THey may be out of stock but the site is now giving awat 9 quadrillion dollars with the purchase of the tablet... do you think this is a good deal

h t t p : //i92.photobucket.com/albums/l1/awlllwa/negative9quadrillion.jpg

(hmmm for some reason the forum thinks im a new user all of a sudden and wont let me insert a pic... lame, so i spaced out the http so it would post)
[G Tablet General] Deusdies:
So I'm trying to install some updates as update.zip on my G-Tablet, but I can't boot into recovery.

I hold Vol+ and Power button, then I get the boot screen saying "recovery key detected" and then "loading recovery kernel". I then release the buttons and a black screen saying ANDROID shows up. After that, I get a large exclamation mark on almost the entire screen. Then the device just reboots and boots into normal mode.

Help ?

Using stock 1.0.1 ROM
[G Tablet General] jacindc:
Make sure the zip file you're using doesn't need to be extracted. If you just renamed a downloaded file update.zip, it may have an actual update.zip file and a recovery folder inside that need to be extracted before being copied to your sdcard.
[G Tablet General] Deusdies:
That never crossed my mind. It worked. Thanks!
[G Tablet General] jacindc:
Was merely speaking from experience. :)
[Off-topic] Diamond_dawg:
hey guys i wanted to ask you all a favour, i have my facebook page and i want to uploads pictures of phones for my group. so if you have photos of your phone pls add it on the thread. due credit will be given. i want your photos not google ones

thanks
[Off-topic] orb3000:
Hope this ones works for you

Let us know your FB link to have a look:)
[Off-topic] Diamond_dawg:
thank you will uplload in a sec

edit: Link

or check my fb sig for my facebook page if the link doesnt work
[Off-topic] frigid:
Here is my mt3g

And my g1

But I'm using my hd2 sorry lol
[Off-topic] MacaronyMax:
my hero :) Taken wierdly with laptop webcam :p
[Off-topic] Shreyas Jani:
My Touch Opal!

Thats mine touch Opal aka Touch viva...:)

kinda weird to coz of the scratched inner edges!
[Epic 4G General] SammySe:
I have always wondered when the 4g sign gets the little zzz on top of it replacing the little wifi type sign, does it mean that the 4g is temporary disabled or that there's no data being transfered over its connection.

In short, is it equivalent to the arrows on the 3g sign being grayed out instead of colored in?
[Epic 4G General] shabbypenguin:
yes, in other words its sleeping :D
[Epic 4G General] Pito2k6:
Does that mean it's not draining my battery like it does on tha Evo ? Because they tell me to turn tha toggle off on my Evo if im not in a 4g area.I hope I made any sense.thx
[Epic 4G General] Silent25r:
That is a good question. I want to know the answer to that myself. If your not in a 4g area then it will use up more battery because your device will be searching for a 4g signal. But if your getting 4g signal I don't really know if it uses more battery by keeping it on.

I keep my 4g on all the time. My battery life was crappy before using 4g and it just as crappy after using it.
[Epic 4G General] shabbypenguin:
i imagine that the radio for 4g uses more then 3g radios but thats because the tech is new.. so will it eat more battery idling then 3g? i imagine so
[Epic 4G General] napoleon321:
No, while ur 4g is on it pretty much drains the same amount of battery power, my advice is if ur not in a 4g area just b safe and cut it off...but the zzz's aren't really saving power if u wanna save power ull actually have 2 turn 4g off