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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:24:13+00:00 2026-05-27T18:24:13+00:00

for example k9-Mail will try to find a application to handle some attachments and

  • 0

for example k9-Mail will try to find a application to handle some attachments and uses the MimeType-Specification of the email.

For example with PDF it sends correct (debugging information):

12-27 15:41:58.992: I/ActivityManager(119): Starting: Intent { act=android.intent.action.VIEW dat=content://com.fsck.k9.attachmentprovider/01549957-459d-4ee3-b568-7e59390a9535/3/VIEW typ=application/pdf flg=0x3880001 cmp=com.adobe.reader/.AdobeReader } from pid 119

But if the mail attach the PDF not with MimeType “application/pdf” but with “‘application/pdf'” it does not work. ๐Ÿ™ This results in the broadcast:

12-27 15:35:15.007: I/ActivityManager(119): Starting: Intent { act=android.intent.action.VIEW dat=content://com.fsck.k9.attachmentprovider/01549957-459d-4ee3-b568-7e59390a9535/2/VIEW typ='application/pdf' flg=0x80001 } from pid 3635

The ‘ at beginning and end causes IMHO that no application is found to handle that. ๐Ÿ™

K9-Mail miss some other mappings to, so my idea was to build a little application, that catch the call and forward it. But for example the reader is not opened. I tried that:

    @Override
protected void onPostCreate(Bundle savedInstanceState) {
    super.onPostCreate(savedInstanceState);

    Log.i(TAG, "Activity is called and created");

    mapping.put("'application/pdf'", "application/pdf");
    String type = getIntent().getType();

    if (mapping.containsKey(type)) {
        Log.i(TAG, "found mapping: " + type + " => " + mapping.get(type));

        Log.v(TAG, "Intent before: " + getIntent().toString());
        Intent i = new Intent(getIntent().getAction(), getIntent().getData());
        i.setType(mapping.get(type));
        i.setData(getIntent().getData());
        i.setFlags(getIntent().getFlags());

        Log.v(TAG, "Intent after: " + getIntent().toString());
        startActivity(i);
    }

    finish();
}

@Override
protected void onDestroy() {
    super.onDestroy();
    Log.i(TAG, "Activity is destroyed");
}

I think something with “cmd” is wrong … because the debugger shows

12-28 08:38:51.445: V/ActivityForwardIntent(1195): Intent after: Intent { act=android.intent.action.VIEW dat=content://com.fsck.k9.attachmentprovider/01549957-459d-4ee3-b568-7e59390a9535/2/VIEW typ='application/pdf' flg=0x80001 cmp=de.blablupp.android.testproject/.ActivityForwardIntent }

Can someone help me? Is it possible, that the PDF-application can’t get the content? But I can’t see that the PDF-application is selectable or startet. ๐Ÿ™

One question is also – what means cmp? And how can I set this information to the new intent?

I hope to solve this problem, because it is really annoying to save the content and start it with file browser.

tia and reagards

nauni

  • 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-27T18:24:14+00:00Added an answer on May 27, 2026 at 6:24 pm

    Now I saw my mistake … I was blind after trying so much …

    Log.v(TAG, "Intent after: " + getIntent().toString());
    

    did log the wrong object ๐Ÿ™ …

    Log.v(TAG, "Intent after: " + i.toString());
    

    did the right logging, so I found the problem and now the application try to start the acrorad. So this problem is solved. Thanks!

    The problem was to set the data and type with one command. So both is set correct and start the application. Set first one and with the next command the next will have no success.

    i.setDataAndType(getIntent().getData(), mapping.get(getIntent().getType()));
    

    Thanks for your attention, nauni

    PS: But now I have a Problem with security permission … but first I try to find a solution, before I ask something. ๐Ÿ˜‰

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to send SMS using php's mail() function. Below you will find
I have a mail function that sends out an email with content from an
If an attacker has several distinct items (for example: e-mail addresses) and knows the
I have several sites in different domains: example.com , example.org , mail.example.com and passport.example.org
I'm working on application for tracking vehicles. There will be about 10k or more
Possible Duplicate: PHPMailer AddAddress() Here is my code. require('class.phpmailer.php'); $mail = new PHPMailer(); $email
What I expect on execution: The function Email() will be called each time the
I'm using django_webtest to test my application. I faced with problem when try to
Need some help to write a C# code to send mail to multiple users
Is it possible to retrieve the SMTP response of a mail. For example, I

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.