I have made some code for my google map, where I position the camera to one place when the camera is positioned to the first place I toast a message and then I move the camera to another position but the problem is that the toast action doesn't appear for enough time in order to read the message. Is there anyway so I can set the toast lets say for 10 seconds or so ? Here is my code.
public void onFinish() {
LatLng 1= new LatLng(x , y);
LatLng 2= new LatLng(x , y);
GoogleMap map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
map.animateCamera(CameraUpdateFactory.zoomTo(10), 30000,null);
Toast.makeText(getBaseContext(), " I want this message to displayed for 10 seconds.",
Toast.LENGTH_SHORT)
.show();
CameraPosition cameraPosition3 = new CameraPosition.Builder()
.target(1)
.zoom(16)
.bearing(300)
.tilt(30)
.build();
map.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition3 ),30000,new
CancelableCallback()
{ public void onFinish() {
LatLng 2= new LatLng(x, y);
GoogleMap map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
map.animateCamera(CameraUpdateFactory.zoomTo(10), 30000,null);
Toast.makeText(getBaseContext(), " This message for 10 seconds.", Toast.LENGTH_SHORT)
CameraPosition cameraPosition3 = new CameraPosition.Builder()
.target(2)
.zoom(16)
.bearing(300)
.tilt(30)
.build();
map.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition3 ),30000,null);
Try this surely it will help you i already tried it
final Toast toast = Toast.makeText(getBaseContext(), "YOUR MESSAGE",Toast.LENGTH_SHORT);
toast.show();
new CountDownTimer(10000, 1000)
{
public void onTick(long millisUntilFinished) {toast.show();}
public void onFinish() {toast.cancel();}
}.start();
got the answer from this question please refer for full details
http://stackoverflow.com/questions/2220560/can-an-android-toast-be-longer-than-toast-length-long