Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you remove intent-filter please? #12

Closed
soarcn opened this issue Mar 9, 2015 · 5 comments
Closed

Can you remove intent-filter please? #12

soarcn opened this issue Mar 9, 2015 · 5 comments
Assignees

Comments

@soarcn
Copy link

soarcn commented Mar 9, 2015

Thanks for your great library.

I'd suggest remove intent-filter for the main activity, because I don't wanna my apps create another icon on my launcher even it just apply to the debug release. Especially when you consider there would have many apps using this library. And because this is a library for developers, it would be easy for them to add those XML if they really need this.

And for developers who want this happen, one quick solution is put following statement in your manifest.xml

        <activity
            android:name="im.dino.dbinspector.activities.DbInspectorActivity">
            <intent-filter tools:node="removeAll">
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
@reisub reisub self-assigned this Mar 9, 2015
@reisub
Copy link
Contributor

reisub commented Mar 9, 2015

Hi @soarcn,
I understand your problem, for you it makes more sense not to have the launcher icon because you launch the activity programmatically or from Android Studio.

This is a small change to make, but I would like the default behavior to be as easy to use as possible. Just as you said, it would be easy for developers to add the launcher icon. But you also demonstrated that it's easy to remove it, too.

Most of my company uses the launcher icon to use DbInspector and it makes more sense to me to have this as the default behavior. We also don't mind having another launcher icon for debug builds.

Having said that, we are willing to change the default behavior if that's how most developers use it. I'll keep this issue open for a while so people can express their opinion on this.

@mariciv, @zplesac, @ikocijan, @dpenic, @PrashamTrivedi
I know you all use DbInspector, what do you guys think?

@PrashamTrivedi
Copy link
Contributor

I suggest keeping library manifest intact. But adding a section in readme will also be helpful which suggests how to customize dbInspector activity's attributes on your own. That can include customize icons, string and other intent filters. I know readme has a section to override this behavior but there are pain points as well. Esp re-using ic_launcher as db_inspector icon.

When I don't want launcher icon, I override dbInspector in my app's debug manifest, like this.

<activity
    android:name="im.dino.dbinspector.activities.DbInspectorActivity"
    android:label="@string/app_name"
    android:icon="@drawable/ic_launcher"
    tools:replace="icon, label">
</activity>

I will try tools:node="removeAll" as well and will let you know.

@zplesac
Copy link
Member

zplesac commented Mar 10, 2015

Hi @reisub,

I'm already used to another launcher icon and often find this to be quite useful, so I would suggest that we leave this as default behaviour. As you already pointed out - it's easy to override this, maybe we just have to document it a little better.

@ikocijan
Copy link

Hi,

I do not mind having another launcher icon. I think that current behavior is really simple to use and it should not be changed.

You can just update the docs so if anyone wants to remove the icon they will know how.

@reisub
Copy link
Contributor

reisub commented Mar 11, 2015

Thanks guys.
I added a new section in the README which explains how to remove the launcher icon.

@reisub reisub closed this as completed Mar 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants