forrestguice / SuntimesWidget

Android app (and widget collection) that displays sunlight and moonlight times.
GNU General Public License v3.0
348 stars 61 forks source link

optional launcher icon #305

Closed JonnyTech closed 5 years ago

JonnyTech commented 5 years ago

I have just installed suntimes but do not want two icons in my launcher - how does one disable or remove the alarms icon and features?

forrestguice commented 5 years ago

You can edit the AndroidManifest.xml and remove the

<intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

from the AlarmClockActivity. ...but there isn't another entry point for this activity anywhere else in the app. It made more sense to me to make it a launcher activity, so its possible to quickly get to alarms (something with the potential to annoy), rather than bury this activity in settings.

The code itself is all confined to app/src/main/java/com/forrestguice/suntimeswidget/alarmclock .. so could delete that, remove the entries from the manifest, and recompile to completely remove the feature.

...but why? Is there something about it that offends you, or is it only the second launcher icon?

JonnyTech commented 5 years ago

Thanks, shall give it a go. It is the second unwanted icon that I will never use taking up screen estate. Nice feature but not for everyone. I would be quite happy accessing the alarms feature from a menu within the main app if really required.

forrestguice commented 5 years ago

thanks for feedback. I'll look into an alternative for future releases.

It might be possible to add an option that toggles the second launcher activity on/off, by using an activity-alias that holds the intent-filter instead (and toggling that alias enabled/disabled).

Adding a navigation drawer to the app is another solution. I have mixed feelings about the hamburger menu though. I've used it in some apps, but not sure I really want Suntimes to follow those patterns.

forrestguice commented 5 years ago

I've made the second launcher icon optional in v0.11.2 (added to the alarm settings). It suggests a reboot for changes to take effect, but I've noticed (at least one my device) that its enough to completely close the app before the launcher picks up the changes.

JonnyTech commented 5 years ago

Just updated from f-droid - great work, thanks! PS no reboot required here too, the launcher automatically updates after several seconds.