How to make my Android app appear in the share list of another specific app
In order to do this, you need to know the Intent that the application is creating and create an IntentFilter that will add your application to the specific list.
Receiving an Implicit Intent on Intents and Filters (Android Developers)
The application probably uses a specific action name that you could hook to.
<intent-filter . . . >
<action android:name="com.example.project.SHOW_CURRENT" />
<action android:name="com.example.project.SHOW_RECENT" />
<action android:name="com.example.project.SHOW_PENDING" />
. . .
</intent-filter>
Or it could be looking for applications accepting a certain type of file.
<intent-filter . . . >
<data android:mimeType="video/mpeg" android:scheme="http" . . . />
<data android:mimeType="audio/mpeg" android:scheme="http" . . . />
. . .
</intent-filter>
The name of the application and what it is sharing would help me give a more specific response.
Make my android app appear in the share list
Try this way
<activity
android:name="yourActivity"
android:icon="@drawable/ic_launcher"
android:label="test">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
</activity>
For more information go to Receiving Simple Data from Other Apps and Sending Simple Data to Other Apps
my app needs to be shown in list of share with option
You need to add an intent filter to your manifest file registering your app as able to handle a sharing action intent:
<activity android:name=".YourAwesomeActivity">
<intent-filter
android:label="Lorem ipsum">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
How to make my android app appear at the TOP of the share via.. list?
No, it cannot be changed by programming. It is based on alphabetical order.. So if you really want to make your app appear first you gotta follow the strategy adopted by Dropbox, Pocket.. etc, ie "Add to Dropbox" "Add to pocket" so that A appears first in the list
How to make my app hide/disappear in the share list of another specific app or Phone Default sharing list?
It's actually opposite. It shows on that list because your app's activities listed in Manifest file contain <intent-filter>
entries that match criteria for data someone wants to share (that's why you may not see your app for one type of shared data but see it listed for other). If you do not want to be listed, remove these intent filters from your manifest file and you should be good.
See this docs: https://developer.android.com/training/sharing/receive
Related Topics
How to Set Multiple Alarms Using Alarm Manager in Android
Android - How to Pass Hashmap<String,String> Between Activities
Send Data Back to the Script Which Started the Activity via Adb Shell Am Start
How to Always Run a Service in the Background
Android How to Apply Mask on Imageview
"Realm Migration Needed", Exception in Android While Retrieving Values from Realm Db
Google Places API Request Denied for Android Autocomplete, Even with the Right API Key
Multi Selection Spinner in Android Without Alertdialog
How to Make Circle Custom Progress Bar in Android
Failed to Resolve Com.Android.Support:Appcompat-V7:22 and Com.Android.Support:Recyclerview-V7:21.1.2
Ics Android Enable Gps Programmatically
Android Spanned, Spannedstring, Spannable, Spannablestring and Charsequence
How to Set Custom Font for a Whole Application in Android