有没有办法检查特定word文档是否打开?当我打开应用程序打开应用程序之前,当我告诉我的应用程序在文档中写入内容时,首先尝试打开文档,然后我的应用程序卡在哪里。如果文件已经在我尝试打开之前有一种方法可以检查打开?此时我的代码看起来像这样:
Try to implement the OnMapReadyCallback in your activity
and override the onMapReady method of Google Map to add marker
@Override
public void onMapReady(GoogleMap map)
{
googleMap = map;
LatLng UserlatLng = new LatLng(latitude, longitude);
map.moveCamera(CameraUpdateFactory.newLatLngZoom(UserlatLng, 10));
map.addMarker(new MarkerOptions().position(UserlatLng));
map.getUiSettings().setMapToolbarEnabled(true);
map.moveCamera(CameraUpdateFactory.newLatLng(UserlatLng));
map.animateCamera(CameraUpdateFactory.zoomTo(15));
map.getUiSettings().setZoomControlsEnabled(true);
}
答案 0 :(得分:0)
只需将您的代码放入
即可try
{
//your code here
}
catch (Exception e)
{
//your behavior when the file is opened
}