How to fix null Uri data = intent.getData() in Android

scheme android
deferred deep linking android
action-view intent-filter
android app links

I want Open this link in my application, not open in browser. for this job i want use DeepLink. But when start application, show me null for URI.

My link : Link

I write this code in manifest :


        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />

            android:scheme="http" />

            android:scheme="http" />



Activity codes:

// Deep Linking
Intent intent = getIntent();
String action = intent.getAction();
Uri data = intent.getData();
Log.e("Deep", "Link : " + data);

but when running application, in LogCat show this : Link : null

How can i fix null for this URI and show uri in logCat ?

Try this:

Intent intent = getIntent();
Uri data = (Uri) intent.getExtras().get(Intent.ACTION_VIEW);

Deep linking in Android the easy way – Just Eat Tech Hub, private void parseIntent() { final Intent intent = getIntent(); final Uri uri = intent.​getData(); if (uri != null) { if ("example-scheme".equals(uri. The default Android camera application returns a non-null intent only when passing back a thumbnail in the returned Intent. If you pass EXTRA_OUTPUT with a URI to write to, it will return a null intent and the picture is in the URI that you passed in. You can verify this by looking at the camera app’s source code on GitHub:

Try this


You will get the exact location. It helps me hope so it helps you too.

android scheme uri data is always null, I face a problem and still can't solve it after 2 days I create an scheme in my I check a few activity callback to get the uri data but without success . I can get data in OnNewIntent(Intent intent) method , But with onResume()  The following are Jave code examples for showing how to use getData() of the android.content.Intent class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.

  String action = intent.getAction();
    String data = intent.getDataString();
    if (Intent.ACTION_VIEW.equals(action) && data != null) {
        String recipeId = data.substring(data.lastIndexOf("/") + 1);

Android Recipes: A Problem-Solution Approach, A Problem-Solution Approach Dave Smith, Erik Hellman getDefaultAdapter(​this); if (mNfcAdapter == null) { mUriName. setText( data.getData().toString() ); mSelectedImage = data.getData(); } onResume gets called after this to handle the intent setIntent(intent); } void processIntent(Intent intent) { Uri data = intent. Tag: android,android-intent,android-activity,unity3d,uri. so Im running a java plugin that extends UnityPlayerActivity. Im successfully overwriting the onCreate function. Only problem is when I try to get the intent data coming in, its null. The data Im looking for is the url that Triggered the Intent.

Accessing the Camera and Stored Media, The easy way - launch the camera with an intent, designating a file path, and handle the We need to define the getPhotoFileUri() function: decodeFile(​photoFilePath, opts); // Read EXIF Data ExifInterface exif = null; try { exif getData(); // Do something with the photo based on Uri Bitmap selectedImage = MediaStore. Today I am sharing code for camera crash in android. Its happen in case if your data is null inside onActivityResult(). For this issue I created a temporary file path and then save captured image on that location and after that inside onActivityResult() we get the URI form that path.

Android Camera : data intent returns null, getExtras().get("data"); ImageView imageview = (ImageView) The problem is that the intent data is null and the OnActivityResult method turns When we capture the image from Camera in Android then Uri or data.getdata() becomes null. if the image is set to the imageview so it store at any place in android emulator so why does it return null?? resultCode, Intent data) uri, null, null

How use facebook Deferred App Link Data android? · Issue #611 , <meta-data android:name="com.facebook.sdk.ApplicationId" String action = intent.getAction(); Uri data = intent.getData(); Log.d("SplashActivity", "data: " + data); } So far I have localized the problem with my Facebook account. I'm not sure that all AppLinkData.CompletionHandler() {} are always null. 5 minutes ago, Kas Ob. said: I suggest to at least skip one line when scanning, you can go up to 32 skipped lines while still have very low probability of false positive, you can tweak and decide what will work for you, just consider the height of the image, and i want to suggest to consider the

  • how about the intent, is it null ?
  • @Gjhuizing, when set intent in Log.e show me this : E/Deep: Intent : Intent { cmp=com.tellfa.colony/.Activities.PostShow_page (has extras) }
  • and what does action contain ?
  • @Gjhuizing, i want when go to this activity show me post content (title, image, summery and more ...) from Json and set into views
  • I want Open this link in my application,. Are you sending an intent yourself? Then why dont you post the code how you create that intent and call startActivity()?
  • Thank you my bro for your code, but show me this in logCat : E/Deep: Link : null E/Deep: Intent : Intent { cmp=com.tellfa.colony/.Activities.PostShow_page (has extras) } :( :( :(
  • yes, show me above logCat message :( i'am bad lucky :(
  • Could you tell me the contents of Intent.getExtras().ketSet() ?
  • Maybe my manifest codes is not ok and issue is this? are this code is ok?
  • When write this code : Uri data = (Uri) Intent.getExtras().keySet(); not define this : getExtras()
  • is this an answer? can you please elaborate?