-1

I have application on the market that store users shifts of works hours in a database. In the application i have a Button that insert the current time and date to the database. and after show it on a simple ListView. now the users ask me to make it widget. I try to search on the web some tutorial or information about my problem, but no result. So, my question is if it's possible to do that? even that the application already on the market ?how much its complicated to do that? where to start and how? thanks for everyone!

  • Your question is too broad for anyone to answer. please make it little more precise. Between you will get lots of tutorials in net for making a simple widget. – Sreedev R Nov 13 '14 at 06:24

2 Answers2

1

Its better to create an app widget with your existing application.

For that you have to make a changes with your app like following.

1)Create a class that extends AppWidgetProvider class.

-In onUpdate method you have to add your code.

2)Register your widget with creating a BroadcastReceiver with an intent filter for the

android.appwidget.action.APPWIDGET_UPDATE action.

Follow the below tutorials that will help you for creating a simple widget in your app.

http://www.tutorialspoint.com/android/android_widgets.htm

How to create android app with app widget in single application

After intergarting a widget in your application you have to upload a new apk in google play so updated apk will be get to the users to download.

Hope this answer will helps you a lot.

Community
  • 1
  • 1
Born To Win
  • 3,161
  • 3
  • 15
  • 27
  • thanks for the answer, but i have to use ContentProvider too? – stackOverFlow stackOverFlow Nov 13 '14 at 08:29
  • @stackOverFlowstackOverFlow:See ur question properly..Here you will only mentioned about the appwidget. you dont mentioned about the Provider n all. For your above question if the answer is helpful then mark it as accept.Thnks – Born To Win Nov 13 '14 at 09:04
0

The Android Developer API Guide has quite a lot of information on this subject, with concrete examples and walkthroughs. You can read more at http://developer.android.com/guide/topics/appwidgets/index.html, http://developer.android.com/design/patterns/widgets.html and http://developer.android.com/guide/practices/ui_guidelines/widget_design.html.

Heskja
  • 797
  • 6
  • 19