0
我目前正在创建使用基于位置的变量的应用程序和参数的缘故,我想利用这是从getThoroughfare()
和AFAIK指定字符串中,它是根据API一个字符串,但可以说我做这个android getThoroughfare为可写字符串?
class Game extends MapActivity{
public random function(){
if(addresses!= null){
Address address = addresses.get(0);
this.locationText.append("\n" + address.getThoroughfare() + ", " + address.getLocality());
userLoc = address.getThoroughfare();
System.out.println(userLoc);
}
}
这工作,并打印出街的名字,但在另一个类中,如果我检查它像
if(Game.userLoc == myStreetString){
//do stuff
}
它不会工作,让我有保险相匹配的字符串,怎么办?任何帮助将是伟大的
为地址的API文档无法相信我错过了,我草率的编码。非常感谢你! – 2013-04-21 14:05:12