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