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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T21:32:44+00:00 2026-05-28T21:32:44+00:00

I’m trying to write correct intent filter. I’m basically familiar with intents, they work

  • 0

I’m trying to write correct intent filter.

I’m basically familiar with intents, they work fine in my app, but i want to know the better way to do it. Here’s what i need to do:

I have an application that owns some data. (data from ECU, engine control unit) There’s two Activities: one Activity can display data as a digits, and another can display it as a graphs.

Let’s see on the first activity.

  1. What does it do? It displays.
  2. What does it display? ECU data.
  3. How does it display this data? as a digits.

The second activity is almost the same, but third item is different: it displays data as a graphs.

So, I want to be able to send intent that specifies exatly all info, just like “Hey Android, I need to display ECU data as a digits“, and then first activity should be opened.

And I also want to be able to send intent that specifies only first two items, just like “Hey Android, I need to display ECU data“, and then android should ask user what activity should be opened.

My app also should be able to respond to other apps.

What’s the better way to achieve all this?

UPDATE: Here’s my xml. What should i specify in <intent-filter>?

  <activity
     android:name=".MyActivity"
     >

     <intent-filter >
        <!-- what should i specify here? -->
     </intent-filter>
  </activity>

UPDATE 2: Here’s what i’m trying to do: I have an application with Service that communicates via bluetooth with remote device and receives ECU data. There’s some simple Activities that can display this data: as I already said, one can display digits, another can display graphs. This application provides AIDL interface for any another application to be able to get ECU data too.

As I said, these Activities is quite simple, they provides just basic user interface.

Say, one man wants this data to be displayed like moveable-pointer indicator. No problem: he can write his own Activity that will bind my Service, get data from it and display just how he wants.

Then, if i send Intent like “Hey Android, I need to display ECU data“, then Android should ask me what Activity should be opened, and I want to be able to see this new Activity too.

  • 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-28T21:32:45+00:00Added an answer on May 28, 2026 at 9:32 pm

    Well, i found myself what i looked for.

    in AndroidManifest.xml:

    <activity
       android:name=".MyActivityForDigits"
       >
    
       <intent-filter >
          <action android:name="android.intent.action.VIEW" />
          <data android:mimeType="ru.orionspb.bk100_iface_android/car_data" />
          <category android:name="android.intent.category.DEFAULT" />
          <category android:name="ru.orionspb.bk100_iface_android.category.DIGITS" />
       </intent-filter>
    </activity>
    
    <activity
       android:name=".MyActivityForGraphs"
       >
    
       <intent-filter >
          <action android:name="android.intent.action.VIEW" />
          <data android:mimeType="ru.orionspb.bk100_iface_android/car_data" />
          <category android:name="android.intent.category.DEFAULT" />
          <category android:name="ru.orionspb.bk100_iface_android.category.GRAPHS" />
       </intent-filter>
    </activity>
    

    And then i can say “Hey Android, I need to display car data” just like that:

         Intent mIntent = new Intent();
         mIntent.setAction("ru.orionspb.bk100_iface_android.action.VIEW");
         mIntent.setType("ru.orionspb.bk100_iface_android/car_data");
         mIntent.addCategory(android.content.Intent.CATEGORY_DEFAULT);
    
         startActivity(mIntent);
    

    If i want to say “Hey Android, I need to display car data as a digits“, i need to replace CATEGORY_DEFAULT with my own category:

         Intent mIntent = new Intent();
         mIntent.setAction("ru.orionspb.bk100_iface_android.action.VIEW");
         mIntent.setType("ru.orionspb.bk100_iface_android/car_data");
         mIntent.addCategory("ru.orionspb.bk100_iface_android.category.DIGITS");
    
         startActivity(mIntent);
    

    And that’s it. Of course, i can replace DIGITS with GRAPHS to open MyActivityForGraphs instead of MyActivityForDigits. It works just like i want it to work.

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

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I want to count how many characters a certain string has in PHP, but
I have a French site that I want to parse, but am running into
I want to construct a data frame in an Rcpp function, but when I
I am using Paperclip to handle profile photo uploads in my app. They upload
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
Seemingly simple, but I cannot find anything relevant on the web. What is the
I want use html5's new tag to play a wav file (currently only supported

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.