basically l would like my app to appear in the Android's sharing menu so that images shared from the device's gallery can be displayed in my app.
To achieve this I added an intent-to my application's AndroidManifest.xml. The description of the main activity now looks like this:
<activity android:screenOrientation="portrait" android:configChanges="keyboardHidden|orientation" android:label="AppName" android:name=".AppActivity" android:theme="#style/Theme.Titanium">
<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.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:mimeType="image/*"/>
<data android:scheme="content"/>
</intent-filter>
Unfortunately my application does not appear in the list of apps that can handle images. Neither on the device nor the emulator. On my Android device this list is displayed at least whereas the emulator directly opens the messages app without giving me the possibility to choose an app.
Am I missing something that is important for the system to recognize my app correctly for image content types?
Further information: - Titanium SDK: 3.1.0.GA - Mac OS X: 10.8.4 - Android Device: 2.3.3 - Android Emulator: 4.2.2
2 Steps for this
1- Clean your code and run the app in emulator or device. In build > android folder you will see a AndroidManifest.xml file. copy that file. make a folder in resource named platform then android folder inside platform folder and paste xml file in it.
2- Here is the code of my app
<activity android:name=".VocabulizrActivity"
android:label="Vocabulizr" android:theme="#style/Theme.Titanium"
android:configChanges="keyboardHidden|orientation">
<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="text/plain" />
</intent-filter>
</activity>
Please add the code written in tags. It worked for me as I posted the same Question once .. There are 2 more mimeType since you are using images so you can use this
<data android:mimeType="image/jpeg" />
<data android:mimeType="image/png" />
Here is My Question's Link
Related
I've made a PWA that work well. On my phone with chrome a can install it and it work well.
I've made a TWA but when I install it from the play store and launch it. The app don't launch, nothing happend, just un "black screen".
It happened when I config de /.well-known/assetlinks.json. Before I config the assetlinks.json the app work (but there is the url bar). When I config the assetlinks.json the app not work anymore.
the assetlinks is the same as the one give by the Play console.
A part of my manifest :
<activity android:name="com.google.androidbrowserhelper.trusted.LauncherActivity"
android:label="#string/appName" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:autoVerify="true">
<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="#string/hostName"/>
</intent-filter>
</activity>
#string/hostName has correct value
targetSdkVersion 32
compileSdkVersion 32
I've mademany search, many test but nothing work. Do you have any idea why ?
How can I get some logs of what happen ?
Feel free if you need more information
Thanks for your help !
I need to open my application when clicked the URL Link in E-mail, Message or Browser applications. So, see the my code for this feature:
<activity
android:name=".ui.main.MainActivity"
android:configChanges="orientation"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<data android:scheme="https" />
<data android:scheme="https" android:host="www.mysite.org"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.APP_EMAIL"/>
<category android:name="android.intent.category.APP_MESSAGING"/>
<category android:name="android.intent.category.APP_BROWSER"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
This code is sufficient and works on some mobile devices, especially devices with android versions 5.0, 6.0 and 7.0 but does not work on versions 7.1 and 8.0. Why does this happen? Is it a permission problem?
Ex: Your url will be something like https://example.com and you have the intent filter in Android Manifest as below:
<activity
android:name="com.droid.MainActivity"
android:label="#string/app_name" >
<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:host="example.com"
android:scheme="https" />
</intent-filter>
</activity>
Use the URL Mapping editor to easily add URL intent filters to your Activities with Android App Links (Android Studio > Tools > Android App Links).
After reading changes in Android O I came to the conclusion that the problem is described as follows
URIs cannot contain empty labels. Previously, the platform supported a
workaround to accept empty labels in host names, which is an illegal
use of URIs. This workaround was for compatibility with older libcore
releases. Developers using the API incorrectly would see an ADB
message: "URI example..com has empty labels in the hostname. This is
malformed and will not be accepted in future Android releases."
Android 8.0 removes this workaround; the system returns null for
malformed URIs.
So try adding android:label="string resource" to your intent-filter syntax so the user will see it in the alternatives menu.
Im developing a mobile app using unity and I want to deep link the mobile app to the website. I have edited the androidmanifest as shown in the developers site but even though the building process runs smoothly when i try to type the link on the browser and launch the app it does not work
<activity android:name="com.liveroom.liveroom.GalleryUpdater"
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>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="liveroom"
android:host="liveview"/>
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
</activity>
as stated in the developers article the intent should be able to access and load the app when the uri liveroom://liveview but itt does not do so. please point my mistake, thank you
When you type on browser it will not open . to test make an html file using < a href tag then it will open.
Not every browser supports deep linking, only few browser supports deep linking, like if you want to check deep linking, use google chrome latest updated browser , so when You test deep linking using QR code it will open perticular app.
Was also not working for me. What helped was to remove android:host="(...)"
So my AndroidManifest.xml now looks like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
<application>
<activity android:name="com.unity3d.player.UnityPlayerActivity" android:theme="#style/UnityThemeSelector" >
<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.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="unitydl" />
</intent-filter>
</activity>
</application>
</manifest>
I am new to android app development. I created an app using Eclipse
and successfully installed on my device. Even it got installed on
the emulator.But, I can't see it!
I have tried everything like adding :
In manifest.xml
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Re-installing
Tried directly sending and installing .apk to the device
(not only by running on eclipse)
Restarting my eclipse
and so on.
Let me know if any other information is required.
Its not going to be on the main page. Go to downloaded applications on your device and check if its there. Also make sure USB debugging in turned on in the developers options on your phone. Also read this.
What about checking the list of installed packages?
$ adb shell pm list packages | grep your.package.name
Or just look up the directory.
$ adb shell ls /data/app
If it's really installed but not be shown in the launcher, then it would be a manifest code issue, I think.
I got this problem few month ago, then i got that i am using more category and action tag in activity.
like this:
<activity
android:name="com.test.login.UserLogin"
android:label="#string/app_name"
android:screenOrientation="portrait"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="t4jsample"
android:scheme="oauth" />
</intent-filter>
</activity>
but my problem solved using this:
<activity
android:name="com.test.login.UserLogin"
android:label="#string/app_name"
android:screenOrientation="portrait"
>
<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.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="t4jsample"
android:scheme="oauth" />
</intent-filter>
So i want to say that please check your code and let me know that you are getting some this case in your code.
Any ideas why I get this error when I call getSession().startAuthentication() for the Android Dropbox SDK?
: FATAL EXCEPTION: main
: java.lang.IllegalStateException: URI scheme in your app's manifest is not set up correctly. You should have a com.dropbox.client2.android.AuthActivity with the scheme: db-CHANGE_ME
Yet my AndroidManifest.xml has the following within the <Application></Application> as instructed in the getting started instructions.
<activity
android:name="com.dropbox.client2.android.AuthActivity"
android:launchMode="singleTask"
android:configChanges="orientation|keyboard">
<intent-filter>
<!-- Change this to be db- followed by your app key -->
<data android:scheme="db-MYKEYISHERE" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
If you're actually seeing "db-CHANGE_ME" (i.e. that's not a placeholder you used to obscure your app key), then it means you haven't updated the app key in the Java code of your app. That error message outputs the key which was provided in the Java code, and expects it to match the key in the manifest.
Your clean build might've picked some Java changes which weren't previously built.
For those facing this problem, if you're like me you might not pay attention to a little detail, take a look at your manifest:
<intent-filter>
<data android:scheme="db-APP_KEY" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
You shouldn't replace the whole string db-APP_KEY with your app key, you should leave db- there db-{HERE YOUR APP KEY} I know I know, it took me a while to figure out this.
Example:
<intent-filter>
<data android:scheme="db-hafsa324dasd" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
When I copied the App_ Key I forgot to add the 'db' part to my answer.
Example:
<data android:scheme="db-APP_KEY" />
Should be :
<data android:scheme="db-hafsa324dasd" />
Should Not Be :
<data android:scheme="hafsa324dasd" />
No idea why this should be the case but a project clean did the trick (I added the code to the manifest days ago and cleaned several times since)