0

in my app, i'm able to launch the standard SMS view with this code

Intent smsIntent = new Intent(Intent.ACTION_VIEW); smsIntent.setType("vnd.android-dir/mms-sms"); smsIntent.putExtra("address", contactNumber); startActivity(smsIntent);

i have watsapp installed in app, if i force tap on number, it throws me an option, would you like to use watsapp or default sms app?.

Is there a way to implement like that?

Naruto
  • 9,476
  • 37
  • 118
  • 201
  • **"force tap on number"** Can you clarify what does this mean? – AADProgramming Jan 12 '15 at 17:05
  • I mean to say like, suppose if u long press on a dialed number, there will be set of options, if we choose send sms, we get messaging options like, watsapp, sms. only messaging apps appears, is there way to do like that? – Naruto Jan 12 '15 at 17:52

1 Answers1

0

This is not something that you can force with your application - it is at the discretion of the user. I believe what you are looking for is to register your application to be available as as an option for certain file types, which may be accomplished by specifying certain <intent-filters> in your AndroidManifest.xml file. This method will also allow the user to select your application as the defualt application for the appropriate file types in the future. This post shows you how to use an <intent-filter> to register your application to respond to specific file types: Register to be default app for custom file type

Community
  • 1
  • 1
Willis
  • 5,308
  • 3
  • 32
  • 61