• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps vs. Widgets - What is the difference?

Xandria

Well-Known Member
Mar 10, 2010
154
9
Portland area
Sticking my neck out and asking a question that might see obvious, but, what is the difference between an App and a Widget? I assume the function differently or they wouldn't have different names. Yet, when I look at the stuff I have on my screens, they look the same.

Someone told me to get rid of my Widgets to reduce lag. (I plan to keep my widgets because I only have 4, I think, three toggles and one weather.) But, why would Widgets create lag and Apps don't?
 
  • Like
Reactions: otwoseven
Apps are, well. Applications which are opened up by a dedicated "shortcut" so-to-say. Widgets, are well, still applications, but have a special functionality which enables you to place a "part" of the application on one of your home screens, which can update periodically, without having to enter into the application its self, which can save time. Certain widgets can cause lag due to constant updating, for the most part. Not sure if my describing was enough to clarify that, but I sure tried! LOL ^_^
 
Upvote 0
Easy way to think of it is: Apps are programs that you need to open. Widgets are apps that are basically always running on your home screen.

So if you had a battery App, you would have an icon that you would click and it would show you all the battery info on a new screen. If you had a battery widget, when you are on your hone screen the app is already running on a part of the screen showing you all the info without having to click anything or open a new window.
 
Upvote 0
ok.. let me see..

App = icons that are just dumb links to start the programs.

Widget = icons that can link to programs.... but the are icons that can be interactive.. example the weather widget.. It can show you information or do some action when you touch it (ie.. toggle on / off Bluetooth).

so.. a widget that updates often or have some action will of course use cpu and resources... which use your battery.

If I am wrong.. someone can correct me...
Hope i helped!

:)
 
Upvote 0
ok.. let me see..

App = icons that are just dumb links to start the programs.

Widget = icons that can link to programs.... but the are icons that can be interactive.. example the weather widget.. It can show you information or do some action when you touch it (ie.. toggle on / off Bluetooth).

so.. a widget that updates often or have some action will of course use cpu and resources... which use your battery.

If I am wrong.. someone can correct me...
Hope i helped!

:)

Sounds about right. The widgets actually do not need to be touched to show you the information i.e. weather. Your weather widget should update periodically and display up to date information. You can, however tap the widget to fully open that particular appliction. Do widgets cause lag and eat battery?? I suppose they do, but the best thing to do is to set the update frequency for your widgets to be as long as you can tolerate (every 2 hours for example, you don't really need weather updates every 15 minutes, right?). This way your weather widget would only be using cpu and battery once every 2 hours instead of once every 15 minutes thus reducing the cpu and battery demand. Hope that made sense!!
 
Upvote 0
Another way of looking at this may be more technical, but may help clarify things.

All the above is true. This explanation merely goes a little deeper.

Widgets and apps are programs. Most of the widgets I have are part of a larger program (app). The widget part is always running sort of in the background, doing whatever it does. This type of activity is usually what is called a "servvice."

Apps can have more than one part. A part that starts and becomes visible when you tap an icon are called (in Android) "Activities." But the app may also have another part that is a "Service." For example, the typical or standard weather display on HTC phones is an app that has both "Activities" and a "Service." The Service part refreshes every so often, downloading current weather condtions and temperatures. I have mine set to refresh once every hour. This Service, then, is the widget portion of the Weather app that runs in the backgroun without your needing to tell it run. When you tap on the weather app and it opens to its own screen and shows additional information, this is the "Activites" portion of the app and does not run in the background.

Other apps may be called widgets, but are really very small apps. For example, one of these is a "widget" that does one of two things, but only when it is told do so. This app is a toggle switch that turns my mobile data network on or off. It does run in the background for the purpse of performing its function without having to load each time the icon is tapped. It does not, however, update periodically.

Therefore, one can say that a widget's main activity is in the background and behind the scenes without need of user activation. The main activity of an app, on the other hand, is in the foreground (visiblee to the user and the user can interact with it) and that activity must be activated either by the user or by a calling application.
 
Upvote 0
Another way of looking at this may be more technical, but may help clarify things.

All the above is true. This explanation merely goes a little deeper.

Widgets and apps are programs. Most of the widgets I have are part of a larger program (app). The widget part is always running sort of in the background, doing whatever it does. This type of activity is usually what is called a "servvice."

Apps can have more than one part. A part that starts and becomes visible when you tap an icon are called (in Android) "Activities." But the app may also have another part that is a "Service." For example, the typical or standard weather display on HTC phones is an app that has both "Activities" and a "Service." The Service part refreshes every so often, downloading current weather condtions and temperatures. I have mine set to refresh once every hour. This Service, then, is the widget portion of the Weather app that runs in the backgroun without your needing to tell it run. When you tap on the weather app and it opens to its own screen and shows additional information, this is the "Activites" portion of the app and does not run in the background.

Other apps may be called widgets, but are really very small apps. For example, one of these is a "widget" that does one of two things, but only when it is told do so. This app is a toggle switch that turns my mobile data network on or off. It does run in the background for the purpse of performing its function without having to load each time the icon is tapped. It does not, however, update periodically.

Therefore, one can say that a widget's main activity is in the background and behind the scenes without need of user activation. The main activity of an app, on the other hand, is in the foreground (visiblee to the user and the user can interact with it) and that activity must be activated either by the user or by a calling application.
Can you clarify your good explanation a little further? As a potential Android developer, I think I read that android apps have the behavior that once started, if the user switches to another app, the previous app basically saves its "state" (to flash memory?) and minimizes its footprint in RAM (or does it leave RAM completely?). Kind of like hibernating. If you move back to it (either by the back button or relaunching the app from the homescreen e.g.) it reloads its executable code (completely or partially?) and reads in the saved "state" to restore you to where you were when last using it. Only if you use setup/applications to shutdown the app will abandon its last state and start up fresh... this is my notion.

So is the difference between a widget and an app that the widget never "hibernates" when you move away from it (or the screen where it displays its info), while apps do hibernate whenever you switch away from its interface. So the widget just stays loaded all the time, running on some "thread"?

From a programmers view, how do you make your app into a widget, and tell the android OS that it should run all the time?

Thanks,

-SB
 
  • Like
Reactions: otwoseven
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones