android.location.Address
是否可以将with的实例放到Intent
另一个活动中?
Address current_location;
我的意思是,我试图通过以下方式直接将 current_location 与意图放在一起:
IntentName.putExtra("current_location",current_location);
或间接通过捆绑:
Bundle b = new Bundle(); b.put....("current_location",current_location); IntentName.put(b);
如果上述策略都不支持“地址”,那么将地址实例传递给另一个活动的最佳方法应该是什么?如果我声明,
public static Address current_location;
并尝试从另一个活动中访问它,那么无法保证 Android 将保存 current_location 数据。还是我错了?
在这种情况下,应该采取什么方法?