Widgets gone after app update - android

After updating my app sometimes all old widgets disappear from home screen.
And in app launcher/widget chooser my three widgets appear twice - until reboot!
Any suggestions?

On this page there is a long article talking about this issue.
The core of the issue seems to be this:
It is important that we use our own keys with the widget update
action, if we use AppWidgetManager.EXTRA_WIDGET_IDS we will not only
break our own widget, but others as well.
Unfortunately my code is not affected by this issue but I still have users reporting the issue.
Also found this report

My widgets disappeared after upgrading S4 to android lollipop. Discovered by accident that if you double tap the left soft key there is a widget icon at the bottom of the screen. Tap the icon to open widgets and there they all are!

This is an OS bug, because of the way it updates apps, making them unavailable for quite some time. If a launcher is updating the widgets during that time, it will likely dismiss them, except if it implements a specific workaround to avoid this situation.
Please stare at the issue here so that (maybe) Google considers fixing it: https://code.google.com/p/android/issues/detail?id=188137

if you change exact package path for a widget that'll break the upgrade and widget will disappear on upgrade

This question give us a solution.
We were implementing Xamarin.Android project using MvvmCross. This project uses widgets, and on app update the widget disappeared. The question mentioned in the link give us a path to find the solution, We used APK-Analyzer to analyze the difference between old and new APKs, and by looking into AndroidManifiest.xml files we figured out that the used AppWidgetProvider has a different package name. By searching more we found a release note from Microsoft
which says:
The names for generated Java types are different in this release. Any project that explicitly uses one of the old names that starts with md5 will need to be updated by hand to account for this change. See Breaking change for generated Java type names below for more details.
And by defining a constant name by replacing the following from:
[BroadcastReceiver(Label = "Widget Title")]
public class CustomProvider : AppWidgetProvider
to
[BroadcastReceiver(Label = "Widget Title", Name = "<old package name>.CustomProvider")]
public class CustomProvider : AppWidgetProvider
the problem solved.

Related

Can't find my app's full home page in Android Studio Layout Editor

Prerequisites: Got a working app from a friend who needs some changes made. They were outsourcing and now want to internally manage it.
I come from a web and game dev background, so Android/IOS development is new to me, but a lot of the principles seem to be the same.
I got the project onto my device, installed all of the dependencies, and fixed all of the file paths.
The app successfully builds, and I have my virtual Android device running it great!
However, my buddy wants some really simple layout changes, and for the life of me, I can't find where to just edit the home screen layout. I was trying to solve my issue from a web dev approach, by grepping where the logo screen is used in the app, but those files seem to just load a white "background" layer, and not the entire composed page?
I'm missing something really silly here, and I just want to ask a real person on here, instead of digging through documentation and trying to word a condensed question in a Google search.
Here are my condensed questions: How can I just edit the home screen of my app in Android Studio? Where can I find the full home page file to view the entire layout, and not just a fragment?
Edit: The app also utilizes the Flutter SDK, which may explain why I have been having trouble with layout edits. I'm going to look at it again after work today, and hopefully answer my own question. I appreciate the help so far!
Edit 2: After going back to the app with a different approach, I found out my project had defaulted to the "android" sub folder of my master, and wasn't showing any of the Flutter .dart documents. After going up one folder directory, I was finally able to access that Main.Dart file with the display information.
I was able to mount it for inspection, but its saying my emulated device isn't supported. I need to look at it when I have time tonight, and may need to ask a separate question for it. I have my project sdk set to Android 33, and my virtual device is set to Android version 33. I searched around Stack, with a few people with reporting similar issues. I tried following their solutions, but it didn't seem to work.

The application could not be saved. Please check the form for errors.?

I am trying to update an application in my developer Console , but this is the error I am getting when trying to publish it after uploading the apk.
The application could not be saved. Please check the form for errors.
I had the same problem and figured out what I should do. If you click Save as Draft it will take you back and show you the error. In my case it was the target SDK version being lower than what was in the previous version of the app.
I had to add a Privacy Policy before I could Unpublish my app.
(That is under Store presence > Store listing, at the bottom)
I found that in the first instance because in the menu it highlighted everything it wanted me to look at (however that was only for the first app, I needed to update 6 but after I followed those menu indicators for the first one they disappeared, even though all my apps needed a privacy policy).
I had the same issue with one outdated app and that helped me was to fill all new required field for the app, e.g. featured graphics, ratings. After that, it was possible to update the app
I was facing the same issue, then I found the solution to this problem. Save your application to draft. Then you will see this error. Move your new version to alpha testing. Now deactivate the current version and move the version in alpha testing to production.
I had the same issue. To solve this issue one must try some of the points below.
Check if all the mandatory fields are filled up
Check if app's terms and condition has a link
Check the distribution page
I hope it works
I faced this issue. I had an existing app. The issue was that I was using a hyphen in the name of the experiment. Apparently, we are not allowed to use it. Hope this helps someone.

non standard package name - will it cause trouble?

I have rather stupidly published a game on the android market with a package name of mick.game.tangletwister, whereas I should have called it com.rai.tangletwister (where rai is the name of my company)... it all seems to work fine - but could it cause some trouble in the future - should I change it? And if I do change it, will it cause problems for existing users that grab the updated version?
It will be fine if you keep the existing package name. Nothing wrong with that. The TLD.company.appname format is just a convention. As long as you don't enter some special characters in your packagename (which you did not), it will work anyway.
But if you try to change it you will run into trouble. See Things That Cannot Change.
If you change the package, update notification will not work any more. Moreover, when a user with the old package name installs the updated game, he/she will have both installed, because the update will replace the old version only if package/class are the same.
Depending on how many installs you have, you can, of course, remove the existing app from the Market - this should force-remove it from devices where it's installed. Then you create another app (same metadata, naturally) and use a correct package name.
1) Change the package name
2) Create a new app in the android market with that new package name
3) Update the old app, and add a pop-up saying that users should install a new version. Possible with a link to the new app
4) After some months, you should remove the old app.
Like user287351 said, it is possible to keep using the current package name, but i would prefer to have it listed under the correct package name

Custom Android Widget and Eclipse Intellisense

I am in the process of putting together a little Android app. I have created a couple of widgets by extending the ImageView and ScrollView widgets. The problem that I am having is not with the code itself (i.e. everything runs wonderfully) but rather with the Eclipse "intellisense" in an XML layout. If I am using the native android widgets, I get the normal eclipse suggestions and all is well. However, as soon as I add a reference to my widget (i.e. ) I lose intellisense on my widget AND (more painfully) on all widgets below my widget. In other words, I don't get intellisense on a if it exists below my widget. Again....everything runs, there is no error anywhere, it just becomes insanely slow to program this way.
This is very frustrating as I don't remember all the attributes of the various controls.
Has anyone encountered this or have any suggestions on where to begin trying to solve this? I don't even know what the correct term in Eclipse to start looking at this. After 3 days looking off and on, I am at my wits end.
Thanks in advance for any suggestions!
Try the new ADT 9.0.0 plugin. It has many improvements of the "visual editor". See the changelog here

How to re-build the default "Launcher" application?

My goal is to modify the Launcher application and dynamically modify and change the theme.
I saw several 'home' apps at http://www.cyrket.com/p/android/com.stain46.taghome/. It looks like they took the default Home(Launcher) and modified it. How did they do that? What do I need to modify to achieve the same thing?
I have done this with the ICS launcher. You also need to do quite a number of code changes to get it to compile as a normal app because it uses a lot of private internal APIs (despite what Google may have implied). You also need to change the package name. There are two limitations I've found:
There's a filter called TableMaskFilter that isn't available to normal apps. I think this allows the app drawer to be semi-transparent, but I removed uses of it and it looks fine I think.
More critically, it appears there is no way to replicate the widget-adding experience because it requires a permission that only system apps can have. See this question.
Anyway, I put my source here. It compiles and works on the official Galaxy S2 4.0.3, but if you try to add widgets it will crash.
Note, when you're changing the package name, there are places that Eclipse's refactor doesn't notice (e.g. XML layouts). I recommend you do a global text search/replace instead.
The standard Launcher is open source so you can definitely grab it and modify it the way you want. For your app to be used as the Home Screen you will need to specify the correct Intent filter in your AndroidManifest.xml and the user will have to choose your app when they press the Home button. Why don't you grab that code, play with it and come back when you have more questions and more of an idea of what you want to change.
Here i found one stable version Launcher2
I have sharing that GitHub repo. HERE
WIKI of this project :
This project contains the code for the Launcher app that ships with Android Jelly Bean (API 16).
Some minor changes were required from this source code to remove the use of private APIs. These changes have been marked by "// AOSP Change"

Categories

Resources