Hello Widget Tutorial

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Postby TheSmile » Thu Sep 24, 2009 8:18 am

Hi everybody,

I have the answer to the updateMillis Problem discussed recently:

According to this discussion here, there was a change in 1.6 that the updatePeroide has to be at least 30 Minutes to save battery live. This is currently NOT documented but someone posted the affected sourcecode.

from appwidget framework source (appWidgetService.java)
Code: Select all
private static final int MIN_UPDATE_PERIOD = 30 * 60 * 1000; // 30 minutes
long period = p.info.updatePeriodMillis;
if (period < MIN_UPDATE_PERIOD) {
       period = MIN_UPDATE_PERIOD;
}


This obviously causes the problem, that my widget tutorial displaying the current time will NOT work on 1.6 anymore. Still, due to testing purposes this change is critical in my eyes.
Whatever comes ... just keep on smiling :)

http://blog.thesmile.de
User avatar
TheSmile
Junior Developer
Junior Developer
 
Posts: 20
Joined: Fri Jul 17, 2009 2:22 pm
Location: Germany

Top

Re: Hello Widget Tutorial

Postby Lo'oris » Wed Jul 07, 2010 4:35 pm

I was optimistic about this tutorial, but… it doesn’t work. I guess it’s too outdated or something. After all, it’s 1.5 based and we have 2.2 now.
A pity.
Lo'oris
Once Poster
Once Poster
 
Posts: 1
Joined: Wed Jul 07, 2010 4:35 pm

Re: Hello Widget Tutorial

Postby TheSmile » Wed Jul 07, 2010 10:39 pm

Hi Lo'oris,

yes, you are right. I apologize for that but I didn't find time to update the tutorial and still don't see any time for me in the future to do so. I try to get back to it as soon as possible but I already can tell that it won't be during the next 2 or 3 month.

Regards,
Norbert
Whatever comes ... just keep on smiling :)

http://blog.thesmile.de
User avatar
TheSmile
Junior Developer
Junior Developer
 
Posts: 20
Joined: Fri Jul 17, 2009 2:22 pm
Location: Germany

Re: Hello Widget Tutorial

Postby barrand » Thu Oct 14, 2010 8:06 pm

I'm having the same problem as desuvinodkumar with the errors:

No Launcher activity found!
The launch will only sync the application package on the device!


I'm launching it as a 2.1 project

Anyone get the same error, and were able to get past it?



My manifest looks like this:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="org.example.widget"
     android:versionCode="1"
     android:versionName="1.0">
   <application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">
       <receiver android:name=".MyWidget"
                 android:label="Anything">
           <intent-filter>
          <action android:name="android.intent.action.MAIN" />
          <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
       </receiver>

   </application>
   <uses-sdk android:minSdkVersion="7" />

</manifest>

barrand
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Oct 14, 2010 7:59 pm

Top
Previous

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest