I try to open the navigation with a click of a button, in the choice of gps applications, I waze and google maps. When I click on google map, the navigation starts correctly but when I click on waze navigation does not start. I just get my position
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("google.navigation:q=22+dizengoff+street+netanya"));
startActivity(intent);
Ir all my code:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
getWindow().setSoftInputMode(
WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); //Que le clavier soit par defaut ferme
init();
}
public void init(){
//Reglage des bouton par ID
btnAdd = findViewById(R.id.maAddUser);
btnMap = findViewById(R.id.maBtnMap);
//On click sur les boutons
btnAdd.setOnClickListener(this);
btnMap.setOnClickListener(this);
}
@Override
public void onClick(View v) {
switch (v.getId()){
case R.id.maAddUser:
//Redirection vers l'activity ADDUSER
Intent goAddUser = new Intent(MainActivity.this, AddUserActivity.class);
startActivity(goAddUser); //Redirection vers ADD USER
break;
case R.id.maBtnMap:
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("google.navigation:q=22+dizengoff+street+netanya"));
startActivity(intent);
break;
}
}