is it possible to show widget in “Add to home screen > Widgets” Dialog only for a certain android version without uploading two APKs and assigning to proper SDK version numbers?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
I have a way to do it without any code e.g.:
In your res\values dir create a bools.xml file:
<?xml version="1.0" encoding="utf-8"?><resources>
<bool name="honeycombOrAbove">false</bool>
</resources>
Create a values-v11 dir (for honeycomb or above values), copy the file to it and set the value to true.
Then in the manifest for the widget receiver use: android:enabled=”@bool/honeycombOrAbove”. I also used it in the configuration activity for the widget.
This means the widget is disabled at install time.