How to fix Android homescreen widget installation. Widget as part of Android application.
The problem is:
I have a big Android application. I want to add homescreen widget for this application.
I’ve followed official tutorial and created widget. It works.
Then I’ve include all widget’s code into my big application. Also I’ve declared widget in Android Manifest.
Then app was installed I didn’t see my widget into widget’s list.
WHY IT DIDN’T APPEARED?
The answer is very simple!
My app was installed into SD-card. Moving application to phone was fixed this issue.
To make widget visible all the time you need put in your AndroidManifest.xml next line:
android:installLocation="internalOnly"
It must look like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hrupin.sample.android"
android:installLocation="internalOnly"
android:versionCode="1"
android:versionName="1.0"
..........
Hope it helps
2 Comments
benj404@gmail.com · 3 December, 2014 at 10:11
Please Give the detail code.
Igor Khrupin · 3 December, 2014 at 19:25
Hi benj404@gmail.com,
I’ve updated the post for you.