I am taking the reference of one application from android market and i want a similar interface actually so the actual problem goes like this see-->
Step 1.) We have our native contact list in android Phone right please see the screen shot attched---->
![enter image description here][1]
step2.)Now i select a Particular Contact from this contact List Lets say I select xyz so we will
reach to the following Page see---->
![enter image description here][2]
On click of a contact Page.
On this Page the Call mobile option is the default one of the android Phone but after that there is a second row
coming with the option of Walkie-talkie thats the customised one by the application developer now when you click on that walkie talkie then it starts your application screenshot attached as----->
on click of the walkie talkie
![enter image description here][3]
now it lands to the application.
Now the thing is where should i make changes to add that option of walkie talkie to start your own application.
like here they gave Walkie talkie on the contact details page the similar option i want to give for my application also
then where should i give this option??
1)We cannot make the changes in the OS files as it is the application.
2)There Must be some option in the android-manifest.xml file to give this option of putting a new row to start
our own application from the android Native Contact Details Page.I tried googling it but could not figure out much.
3) See there are intents to interact with the native Phone call or SMS so like that only for example to send the sms on click on call phone we can do like this to move it to our application like if you click on call Mobile then we are able to give options like see ----->
<activity
android:name=".KVSMSLiteActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:label="Send Voice SMS">
<action android:name="android.intent.action.CALL_PRIVILEGED"/>
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="tel" />
</intent-filter>
<intent-filter android:label="Send Voice SMS">
<action android:name="android.intent.action.SENDTO"/>
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="sms" />
<data android:scheme="smsto" />
</intent-filter>
</activity>
enter code here like this....
on click on the call mobile
if you click on dial it goes to android native phone call and if you click on Send Voice SMS then it goes to my application for this what they did is see in the android-manifest.xml file for mail activity they putted this option---->
So can you Please suggest me how i can put a new row after the android native call Mobile row.....??
![enter image description here][4]
finally how to do this
Thanks for giving your time.....:-)
Regards,
Narendra.
Related
I'm working on an android app which could view or edit pdf files.
My app shows up in the "Open file using..." screens.
here is the screenshot
But when I click a pdf file from google files file manager app, it shows "Open with" screen and my app is not there. here is the screenshot
This is my intent filter in manifest.xml :
<intent-filter android:label="View or edit your pdf files">
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.EDIT"/>
<data android:scheme="content" />
<data android:mimeType="application/pdf" />
</intent-filter>
How can I make my app visible in the "Open with" screen like Drive Pdf Viewer and WPS Office in the second screenshot ?
I have applied your code in my app and everything worked fine. Don't know what exactly is happening here, but in your case you can define intent filters with lots of actions and data type (category is not necessary in my opinion) to see that if your app can be a candidate to handle the intent. Then in the activity receiving the intent, in the onNewIntent() method, you check all the properties of the incoming intent to see what's is missing in your current solution. All the possible intent's actions can be found in the document (you dont need to define all of them, just add the most popular ones and see the result)
https://developer.android.com/reference/android/content/Intent
I need to add my application to share list when I click to "Share" button on some image in gallery (for instance) and then I want to get this image in ImageView.
Share List
Thanks for help!
Intent filters inform the Android system what intents your application is willing to accept.
For images, you’d add the following to your AndroidManifest.xml
<activity android:name=".ui.MyActivity" >
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
When the gallery application tries to share an image by constructing an intent and passing it to startActivity(), your application will be listed as an option in the Android Sharesheet or intent resolver. Upon selecting your app, the corresponding activity (.ui.MyActivity in the example above) will be started. It is then up to you to handle the content appropriately within your code and UI.
More info here
you can check following link here it was mentioned exactly what you want to achieve
one of my project I was develop video player app for android.
when we browse video using android device file explorer and select it then usually
popup a window and show the possible video player apps.
as showing red area in this image
In my case I wanna show my video player app just like this red area apps showing. how can I do this. Is there any way to do this in programmatically in android.
you have to mention intent filter for your activity that plays video,so that it is visible for other apps.
you can read more about that here
Allowing Other Apps to Start Your Activity
example:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="video/*" />
<data android:mimeType="application/sdp" />
</intent-filter>
you can also see the answer given by #Michell Bak
I am trying to implement a new feature for my android application.
scenario :
when some event occurs, the camera sends an email to my (Gmail) account.
on opening the mail, it will have a link (html).
when user clicks on that link, it should launch my application Home activity.
I need to understand :
how to create that html link.
how can i make the link to launch my application Home activity.
kindly help me to understand what all things i need to do in my application.
I used "Blackbelt's" user comment and i was able to get the intent html link working.
But my problem is : i want to use a custom scheme "mobile" instead of "http"
I am using Gmail to use the link. But when i send using custom scheme. Gmail doesnt recogonise as hyperlink. So i cannot click on the link.
Please help me how to use a custom scheme. with gmail
you need to register an intent-filter for your Activity on the AndroidManifest.xml file, defining a custom url. . E.g.
<activity android:name="path.to.YourActivity" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https"
android:host="it.is.my.app" />
</intent-filter>
</activity>
So if you press on a link like https://it.is.my.app, you should be prompted with the android intent chooser, with your app
I've developed an Android Application. I've defined an intent-filter so that my app is used to view some links:
<intent-filter>
<data
android:host="my_url.com"
android:pathPrefix="/some_prefix/"
android:scheme="http" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
When I open one link like "my_url.com/some_prefix", my app appears on the selector and, if chosen, its open to display the link.
However, my Activity is opened attached to the application that lauched it. Lets say, for example, that the link is displayed in a WhatsApp message, after opening the link my app is displayed. If I try to open WhatsApp again, my Activity is displayed, instead of WhatsApp.
How can I detach my Application from the Application that called it?
Your activity is being opened in the current 'task', which is the WhatsApp task.
What you are wanting is for your app to be opened in a new task.
There is a flag you can set on your activity in the manifest:
android:launchMode="singleTask"
This will tell android to open your activity in another task.
Read more about tasks here