Monday, May 20, 2013

[General] Google Hangout Contact Picture Incorrect


Does anyone know how to correct the google hangout pictures? I have a contact that has the correct picture in my phone but when it comes to the google hangout application and on the web it shows the picture of another friend of mine. I have tried everything I know to do. 1) Reset the picture for that contact on my phone. 2). Look for "hidden" contacts to see if he is in there. 3). Looked for a way to change it on google hangouts.

Any help is appreciated.

EDIT: I FIGURED IT OUT.

If you are experiencing the same issue. Go into gmail on your computer. Then switch it to looking at your contacts.

Start typing the name in the search bar. You will probably see two entries for this person just like I did. Find the incorrect one and then clear the photo. I then just merged the two contacts together an that fixed the issue.



.

forum.xda-developers.com

[General] Can't access playstore


Hi,
After a long process of trying to get my s3 working I finally got it up and running. When I tried to access the play store After trying to log into my gmail account i would get "unfortunately, google+ has stopped" followed by "unfortunately google pay store has stopped". whenever I try to access the play store it just repeats the same thing. I think it might have to do with me screwing up the gapps but I have factory reset it 5 or so times still get the same problem. Any advice?



.

forum.xda-developers.com

[General] Can a 4G Network Smart Phone Plan Provide Internet Connection to a Desktop PC?


Hi everyone.
I'm not really sure where to ask this question, so I hope you don't mind if I post it here. It has to do with smart phones.

I'll try to keep this brief, but please permit me to include enough detail to get an informed response.

I am shopping for both a smart phone and a carrier. It will most likely be Verizon. I don't know which phone I'd purchase yet.

I visited a local Verizon store, and the salesman told me there is no data usage if I use a smart phone with a wireless router. He said if a smart phone runs off WiFi, it doesn't count towards my data usage.

Is this true?

I have a wireless router connected to my desktop PC to run my wireless printer, and to feed my Google Nexus 7. (So yes, I am a current Android user.)

The salesman said this is different. The wireless router he's talking about is for the 4G network. It would feed up to ten peripherals, including the smart phone.

When he found out I'm using Comcast as my ISP, he said, "It would also feed your desktop PC." He offered to throw the wireless router--which he said would be portable--in with the contract.
This is important to me. Is this true? If I get a smart phone and a contract for 4G service, would it be able to run my desktop PC?

Even more importantly, would the 4G service equal my Comcast service speed, which is 50 mbps (I'm using Comcast's so-called "Burst" plan.)

To me, it doesn't sound right. Could a wireless 4G network equal or surpass a wired connection? If it can…if it DOES…then I'd seriously consider dropping Comcast and going purely with Verizon.

Instead of costing $175 per month for Comcast plus Verizon's monthly fees, it might cost only $100-$100 (depending on the data plan I'd choose).

Or is what he said too good to be true? Thank you for any feedback you care to provide.
Jd



.

forum.xda-developers.com

[General] Google Now Widget


Is there a way to make the widget ALWAYS show more cards? As it is now, I have to tap the widget, open Now, tap "show more cards" and only then will it show more than a couple cards. I have to do this anytime I want to see more as it always defaults back to just showing a couple of cards. I would like it to show baseball scores, upcoming game, weather, upcoming appointments, etc. I don't want to always have to "show more cards".
Any ideas?

From my HTC One X running ViperXL 3.2



.

forum.xda-developers.com

[General] Android cant log in to google


Today after unroot my phone my google store start saying that can't establish a reliable data connection to the server.

I tried unboot,looking date and time, reseting to factory data reset but it still not working

Please if someone know what i can do pls help me is urgent



.

forum.xda-developers.com

[General] Site support email address


Where can I find the email address for the Androidcentral web site support. I am trying to reply to a comment to an article on androidcentral and I get an error message asking me to remove links or references to money, and if I need additional help to email site support. I've looked all over this place and I don't see anything that looks like a site support email address.



.

forum.xda-developers.com

[android help] Android View and ViewGroup

Android View and ViewGroup - Stack Overflow







Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

















In Android ViewGroup inherits from View. A ViewGroup is a container which holds Views.



ViewGroup (LinearLayout)
View (TextView)


Why did folks at Android defined this relationship as Inheritance instead of composition. As the ViewGroup contains Views shouldn't it be composition ?





























I think you're getting too hung up on the wording.


A "ViewGroup" has every bit as much reason to inherit from a "View" as a "TextView", and "ImageView" or ... more to the point ... a "ScrollView" or a "SurfaceView" (the latter two both "contain things").


Perhaps "View" wasn't necessarily the best choice of terms ... but the class heirarchy makes complete sense. Regardless of what it's subclasses are named :)


IMHO ...























Viewgroup inherits properties of views and does more with other views and viewgroup






















I think this is a great example of the Composite design pattern:


http://en.wikipedia.org/wiki/Composite_pattern


Even though the naming might not be the best...




















default






.

stackoverflow.comm

[android help] How to catch Android soft keyboard next button event

How to catch Android soft keyboard next button event - Stack Overflow







Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

















I am using phonegap plugin for my app written for android. I want to catch/handle the next key event in android soft keyboard because i have some plugins like niceditor for textarea, so when i click on next button from the field before to niceditor my app gets collapsed as device does not recognize the niceditor as text field. so i want it to be handled manually.


Thanks in advance if anybody can help me out to get the solution.


























editText = (EditText)layout.findViewById(R.id.editText);



editText.setOnEditorActionListener(new TextView.OnEditorActionListener() {

@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {

return false;
}
});



















default






.

stackoverflow.comm

[android help] Android NullPointerException on onCreateOptionsMenu


This is my code:



public class className extends Activity{
private MenuActivity menuActivity;

@Override
public void onCreate(Bundle savedInstanceState) {

try {
ViewConfiguration config = ViewConfiguration.get(this);
Field menuKeyField = ViewConfiguration.class
.getDeclaredField("sHasPermanentMenuKey");
if (menuKeyField != null) {
menuKeyField.setAccessible(true);
menuKeyField.setBoolean(config, false);
}
} catch (Exception e) {
e.printStackTrace();
}

menuActivity = new MenuActivity(this, context, R.menu.menu);
);
}
@Override


public boolean onCreateOptionsMenu(Menu menu) {
menuActivity.onCreateOptionsMenu(menu); // <--
return super.onCreateOptionsMenu(menu);
}
}

public class MenuActivity {
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = mRootActivity.getMenuInflater();
inflater.inflate(typeMenu, menu);
return true;
}

public boolean onOptionsItemSelected(MenuItem item) {
}

// ...
}


I receive a NullPointerException on row:



menuActivity.onCreateOptionsMenu(menu);


This exception is present only some moble like Galaxy note. Do you know why there is this exception?



.

stackoverflow.comm

[android help] Webview App as default browser

android - Webview App as default browser - Stack Overflow







Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

















Hey I have made a browser app for android, but now I need to give the user a change to set my browser as default. Can someone please help me with this?


























That is upto user. When user sets your app as default browser, it will be default untill he changes it.




















default






.

stackoverflow.comm

[android help] Removing common elements between two different Arraylist

java - Removing common elements between two different Arraylist - Stack Overflow







Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

















Sorry If you are thinking that it is a repeated post. But the situation is different here. I have read several posts for it but not getting the exact thing I am looking for. I know How to develop a complex logic for this but please take a look this is for android and we can't expect too much processing on the device due to to limited resources available.


I have an ArrayList of an bean class objects consisting five fields as


Java Bean -- MyShares


  1. fileName

  2. filePath

  3. fileSize

  4. isShared

  5. Creator

I have another ArrayList of String which contains only filepaths. Now what I want is to remove all the common elements between the two arraylist means the file paths in seconds arraylist and file path in first arraylist objects are similar then I have to remove from both of the arraylist But I Don't want a new arraylist which contains the uncommon elemenst But I want to get my both arraylist only without their common elements.


Please help me.





























You could use a Map from String to your object type (I used Obj in order to make a SSCCE).


Assume we are given a list objects and a list strings.


Steps:


  1. Put all objects in a map with their str variable as key

  2. Get all those str variables using map.keySet()

  3. Get all strings that are in objects but not in strings by keys.removeAll(strings)

  4. Get all strings that are in strings but not in objects by strings.removeAll(keys)

  5. Get the objects that correspond to the remaining keys

Note that you need to be careful in steps 3 and 4, because you need to back up one of the collections.



import java.util.*;

public class Test {
public static void main(String[] args) throws Exception {
new Test();
}

public Test() {
List objects = new ArrayList<>();
objects.add(new Obj("a"));
objects.add(new Obj("b"));
objects.add(new Obj("c"));

List strings = new ArrayList<>();
strings.add("a");
strings.add("d");
strings.add("e");

remove(objects, strings);

System.out.println(objects);
System.out.println(strings);
}

public void remove(List objects, List strings) {
Map map = new HashMap<>();
for (Obj object : objects) {
map.put(object.str, object);
}

Set keys = map.keySet();
List oldStrings = new ArrayList<>(strings);

strings.removeAll(keys);
keys.removeAll(oldStrings);

objects.clear();
for (String key: keys) {
objects.add(map.get(key));
}
}

public class Obj {
public String str;
public Obj(String str) {
this.str = str;
}
@Override
public String toString() {
return str;
}
}
}


Prints:



[b, c]
[d, e]

























Rough Java code:



HashSet commonKeys = new HashSet();
for (Share share : shares) {
commonKeys.add(share.filePath);
}
commonKeys.retainAll(filePaths);
for (Iterator it = shares.iterator(); it.hasNext(); ) {
Share share = it.next();
if (commonKeys.contains(share.filePath)) {
it.remove();
}
}
filePaths.removeAll(commonKeys);


This won't be O(N) because remove on an ArrayList is expensive. To get O(N) behavior you either need to create new ArrayList instances, or add the elements you don't want removed to temporary lists, and then clear() and add them back into the original lists.

























I will go with some clues for you


Suppose you have two lists one for bean objects namely myBeans and another for filePaths namely filePaths



List beansToRemove = new ArrayList();
List filePathsToRemove = new ArrayList();

for(Bean myBean : myBeans) {
for(FilePath filePath : filePaths) {
if(myBean.getfilePath.equals(filePath.getFilePath())) {
beansToRemove.add(myBean);
filePathsToRemove.add(filePath);
}
}
}

//Now remove filePaths and beans if any

for(Bean myBean : beansToRemove) {
myBeans.remove(myBean);
}

for(FilePath filePath : filePathsToRemove) {
filePaths.remove(filePath);
}


it is just a flow to make you clear for what to do; you can further customize it according to your needs.






















You can use an outer loop to scan over the Bean objects, and an inner loop to scan over the file paths.


pseudo code:



for (Bean i in beans) {
for (String p in paths) {
if (i.path.equals(p)) {
beansToRemove.add(i);
pathsToRemove.add(p);
}
}
}
beans.removeAll(beansToRemove);
paths.removeAll(pathsToRemove);


I'm not sure if my extra arraylists to track the removed arraylists go against your question or not since the original arrays remain. If you presort both arrays on the path and keep track of the position in each area (not exhaustive search) you can improve it from n2 to nlgn























lang-java






.

stackoverflow.comm

[android help] How to get the number of the largest value in a string


Ok, so I have the following string



String test= "0, 1, 3, 2, 2, 1, 1, 4, 2, 5, 1, 1, 0, 1, 241";


As you can see the largest value is the last one (241). I need to find a way to get the place of this String, not the number, so I need the result to be 15 (since 241 is the 15th number in the string, and the largest number in the row.


Another example



String test= "0, 1, 3, 2, 2, 1, 1, 4, 30, 5, 1, 1, 0, 1, 5";


Here the result should be 9 (since the highest number is on the 9th place in the string. But I have no idea how to do this, can anyone give me a good start?



.

stackoverflow.comm

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...