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 9205367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:56:05+00:00 2026-06-17T23:56:05+00:00

I would like to register a new file extension (.db_backup) so that all files

  • 0

I would like to register a new file extension (.db_backup) so that all files with this extension open with my app.

Basically files of this type are backed up to email as an attachment. While opening the attachment, I want all files of this type to open directly with my app.

I was successful in doing so by mentioning the android:mimeType = application/*

But now all applications (PDF, APK) open with my app also (which is obvious since * is mentioned). Please tell me what android:mimeType shall I mention in the manifest? My AndroidManifest.xml is given:

<activity
        android:name="com.package.RestoreFromMail"
        android:configChanges="keyboardHidden|orientation"
        android:label="@string/restore_mail" >
        <intent-filter android:priority="1" >
            <category android:name="android.intent.category.DEFAULT" >
            </category>

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

            <data
                android:host="*"
                android:pathPattern=".*\\.db_backup"
                android:scheme="http" >
            </data>
        </intent-filter>
        <intent-filter android:priority="1" >
            <category android:name="android.intent.category.DEFAULT" >
            </category>

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

            <data
                android:host="*"
                android:pathPattern=".*\\.db_backup"
                android:scheme="file" >
            </data>
        </intent-filter>
        <intent-filter android:priority="1" >
            <category android:name="android.intent.category.DEFAULT" >
            </category>

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

            <data
                android:host="*"
                android:mimeType="application/*" >
            </data>
        </intent-filter>
    </activity>
  • 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-06-17T23:56:06+00:00Added an answer on June 17, 2026 at 11:56 pm

    This is how I have the intents setup in my app right now. Just substitute .ext for your extension. Also notice that I am using mimeType=”*/*”. Had to do this to make it work with Astro file manager. Got it to work with email as well now by removing the android:host=”*” in the one with the content scheme.

    <!-- For email -->
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:scheme="content" />
        <data android:pathPattern=".*\\.ext" />
        <data android:mimeType="application/octet-stream" />
     </intent-filter>
    
      <!-- For http -->
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:scheme="http" />
        <data android:host="*" />
        <data android:pathPattern=".*\\.ext" />
        <data android:pathPattern=".*\\..*\\.ext"/>
        <data android:pathPattern=".*\\..*\\..*\\.ext"/>
        <data android:pathPattern=".*\\..*\\..*\\..*\\.ext"/>
        <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ext"/>
        <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ext"/>
        <data android:mimeType="*/*" />
     </intent-filter>
    
    <!-- For https -->
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:scheme="https" />
        <data android:host="*" />
        <data android:pathPattern=".*\\.ext" />
        <data android:pathPattern=".*\\..*\\.ext"/>
        <data android:pathPattern=".*\\..*\\..*\\.ext"/>
        <data android:pathPattern=".*\\..*\\..*\\..*\\.ext"/>
        <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ext"/>
        <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ext"/>
        <data android:mimeType="*/*" />
     </intent-filter>
    
    <!-- For file browsers and google drive -->
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:scheme="file" />
        <data android:host="*" />
        <data android:pathPattern=".*\\.ext" />
        <data android:pathPattern=".*\\..*\\.ext"/>
        <data android:pathPattern=".*\\..*\\..*\\.ext"/>
        <data android:pathPattern=".*\\..*\\..*\\..*\\.ext"/>
        <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ext"/>
        <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ext"/>
        <data android:mimeType="*/*" />
     </intent-filter>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some VB6 .ocx files that I would like to register. These .ocx
I have php scripts that do things like register, login, upload. I would like
I would like to convert this fluent approach to xml: container.Register( AllTypes.FromAssemblyNamed(Company.DataAccess) .BasedOn(typeof(IReadDao<>)).WithService.FromInterface(), AllTypes.FromAssemblyNamed(Framework.DataAccess.NHibernateProvider)
I've a website where users can register. I would like to prevent all special
I'm new to PowerShell. I would like to add a file path to an
I would like to write a Jekyll plugin that makes all posts available in
First of all I would like to remark I am new with the concept
I would like to make register button, but when people click on it. A
Would like to parse IPv4 address from exit-addresses . Format of the file: ExitNode
Would like a for loop in jquery so that: For every hover_link: show hidden

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.