Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3310008
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:42:30+00:00 2026-05-17T21:42:30+00:00

Im trying to create my own url scheme so my android app can get

  • 0

Im trying to create my own url scheme so my android app can get called via an URL but for now I dont have a success.

Im trying to have this url to work : cedemo://com.cedemo.scan?X=toto

Here is part of my manifest file :

<activity android:name=".Gallery1" android:label="@string/app_name" android:launchMode="singleTask" android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="android.intent.action.GALLERY" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="cedemo" android:host="com.cedemo.scan" />

        </intent-filter>
</activity>

Does anyone can help telling me what is wrong ?
Also, if someone find what is wrong, can someone tell me how I read the “X” variable from inside the android code from my app ?


Update:

Update: I did the modification of the action (as advised in one of the answers) and it’s worked fine. The thing is that I still cannot get the url variable value. Here is the code I tried.

final Intent intent = getIntent();
final String myScheme=intent.getScheme();
final Bundle myBundle=intent.getExtras();
final boolean inContestKey;
if (myBundle != null) {
    inContestKey=myBundle.containsKey("inContest");
}
final Uri myURI=intent.getData();
final String value;
if (myURI != null) {
    value = myURI.getQueryParameter("inContest");
}

But I receiving null from all the functions… what else can i do?

May be I should explain better the context of my software:

  1. My software is started
  2. My software launch then the browser
  3. the user click a link in the browser and the browser go to the url scheme, back to the software with a variable “X” (for example)
  4. the software should read the variable “X”

But in my case : myScheme, myBundle, myURI are set to null.

Any ideas ?


Update:

I found the answer is that you have to be in the main activity to do that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T21:42:31+00:00Added an answer on May 17, 2026 at 9:42 pm

    I think the problem is with the Action you defined.
    There is a “android.intent.action.VIEW” which is what I think you want.

    <activity android:name=".Gallery1" android:label="@string/app_name" android:launchMode="singleTask" android:screenOrientation="portrait">
            <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="cedemo" android:host="com.cedemo.scan" />
    
            </intent-filter>
    </activity>
    

    Try that and I bet will resolve correctly. I only made this assumption because you included the browsable category which is usually used by the Browser, which does not know of any of your custom actions. If you do want the GALLERY action as you have implied then just create 2 filters

    <activity android:name=".Gallery1" android:label="@string/app_name" android:launchMode="singleTask" android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.GALLERY" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="cedemo" android:host="com.cedemo.scan" />
    
            </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="cedemo" android:host="com.cedemo.scan" />
    
            </intent-filter>
    </activity>
    

    So within the contents of your activity you can do something like:

    // Value should be "toto" as in your example
    String value = getData().getQueryParameter("X"); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create my own error window for the project I am working
Trying to create a QtRuby application, I get the following error: /usr/lib64/ruby/site_ruby/1.8/Qt/qtruby4.rb:2144: [BUG] Segmentation
Trying to create a user account in a test. But getting a Object reference
Trying to create my first iPhone app that would play back audio. When I
I'm trying to create a sitemap using Linq to Xml, but am getting an
hi i am trying to create a URL that looks like this: black/granite/worktops where
I´m trying to create something like an own adBanner for a website in my
I'm trying to create a unordered list, with each li element having it's own
I've been trying to create my own custom LiveValidation ( LiveValidation.com ) function that
Im trying to create my own database with MySQL Workbench and run some queries

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.