Android style widgets on iOS


Recommended Posts

I've been messing around with this for a while, but I figured I'd post it up here and see what people made of it. It's a mod by a guy called wyndwarrior, that adds Android style html widgets to iOS pages. Now there isn't interactivity at the moment, but he does know how to do it (and shows it in his WP7 "theme") but he hasn't added it to this free mod yet. Normally I wouldn't post something like this up here, but granted the thread recently Why doesn't iOS do Widgets It seemed like it was worth it. Yes it does require a jailbroken phone, sorry vanilla people. All of the widgets are HTML and JS based, some have been taken from dashboard widgets and even widget builder sites.

From the Author:

Authors Thread on ModMyi

attachment.php?attachmentid=494700&stc=1&d=1294283407

Instead I offer you per-page HTML wallpapers. With this, you can have dynamic, (not yet) interactive backgrounds on every page. Things such as having a widget on each page, having a different animated background on each page or even an entire theme based off of interactive HTML widgets.

[Download] (Or in Cydia)

=====================================

Creating Page Widgets

=====================================

A widget is simply a folder under /var/mobile/Library/PerPageHTML, this folder is the name of your widget and will also be displayed in the PerPage app. A typical widget consists of a Widget.html or a Wallpaper.png or both. In the case of both, the Widget will be displayed on top of the wallpaper.

(Look at example widgets for more info)

The first thing to do is to make a folder under /var/mobile/Library/PerPageHTML

(NO SPACES)

This folder should be the name of your widget, and will also hold the contents of your widget.

Once you have created the folder, inside of it put a Widget.html and/or a Wallpaper.png. The Widget.html is a standard html file and the Wallpaper.png must be a 320x480 png file, or a 640x960 file.

To activate a widget, launch the PerPage app

attachment.php?attachmentid=499586&stc=1&d=1295826432

The select the widget

attachment.php?attachmentid=499587&stc=1&d=1295826432

Then choose a page for the widget to be displayed on. If you wish for that page to display nothing, select none and then the page.

Source Code:

	NSDictionary *myDictionary = [[NSDictionary alloc] initWithContentsOfFile:@"/var/mobile/Library/Preferences/PerPage.plist"];

	NSString *str1 = [myDictionary valueForKey:@"SpotLight"];
		if(str1 && ![str1 isEqualToString:@"none"]){
			if([[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/var/mobile/Library/PerPageHTML/%@/Wallpaper.png", str1]]){
				UIImageView *wallpaper1 = [[UIImageView alloc] initWithFrame:CGRectMake(0,0, 320, 480)];
				wallpaper1.image = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"/var/mobile/Library/PerPageHTML/%@/Wallpaper.png", str1]];
				[self addSubview:wallpaper1];
			}
			if([[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/var/mobile/Library/PerPageHTML/%@/Widget.html", str1]]){
				UIWebDocumentView *docView1 = [[[UIWebDocumentView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)] autorelease];
				[docView1 loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[NSString stringWithFormat:@"/var/mobile/Library/PerPageHTML/%@/Widget.html", str1]]]];
				[docView1 setBackgroundColor:[UIColor clearColor]];
				[docView1 setDrawsBackground:NO];
				[self addSubview:docView1];
			}
		}

	for(int i = 1; i<=11; i++){
		NSString *str = [myDictionary valueForKey:[NSString stringWithFormat:@"Page%d", i]];
		if(str && ![str isEqualToString:@"none"]){
			if([[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/var/mobile/Library/PerPageHTML/%@/Wallpaper.png", str]]){
				UIImageView *wallpaper = [[UIImageView alloc] initWithFrame:CGRectMake(i*320,0, 320, 480)];
				wallpaper.image = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"/var/mobile/Library/PerPageHTML/%@/Wallpaper.png", str]];
				[self addSubview:wallpaper];
			}
			if([[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/var/mobile/Library/PerPageHTML/%@/Widget.html", str]]){
				UIWebDocumentView *docView = [[[UIWebDocumentView alloc] initWithFrame:CGRectMake(i*320, 0, 320, 480)] autorelease];
				[docView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[NSString stringWithFormat:@"/var/mobile/Library/PerPageHTML/%@/Widget.html", str]]]];
				[docView setBackgroundColor:[UIColor clearColor]];
				[docView setDrawsBackground:NO];
				[self addSubview:docView];
			}
		}
	}

Widgets

Facebook Contagon

Endroid speedfeak228

Facebook + Twitter SnowLeo

Twitter JesseDegenerate

LowerAW Sheff1889

XBOX + PSN Gamertag MikeTheTech

RSS Weak-Sauce

RSS Jephre

HTC clock tieuthienvuong

Glow hsus

SimplScreen rossrossross

HTC clock BR0MERZ

Gallery Slideshow

**Note for the gallery slideshow you have to edit the slideshow.html in the "private" folder to the name of the files in your camera roll.

Examples

Slideshow

IMG_0814.PNG

Twitter

546958631.PNG

Normal HTC clock with animated weather

574466891.PNG

HTC clock + RSS feed

IMG_0807.PNG

Link to comment
https://www.neowin.net/forum/topic/974258-android-style-widgets-on-ios/
Share on other sites

Jailbreaking for widgets is nice...but it will be severely limited. We really need support in iOS so that app writers have an API to make widgets with. Widgets that are in complete sync with Facebook, Twitter, and Mail Apps would be awesome.

Lockinfo may be of use to some of you wanted calendar etc... It costs around $5. Bought it last year and have never looked back!

So far, this is the best app I've been able to find. This brings a "digest" view of SMS, Email, and Calendar to your lock screen.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • All it does is use the CPU more efficiently during boot to speed up boot times. That's it. Yawn....
    • It's not a one or the other kind of thing. Software should run efficiently, and the operating system should appropriately manage the CPU clocks. You could have the best most optimized software on earth, and it will still run faster if the CPU does a better job of boosting as needed. All this is doing is pre-boosting the CPU based on user actions, instead of waiting for the normal detection mechanism to kick in. If the OS knows it is about to need more CPU, why shouldn't it use that knowledge? It's the same idea of downshifting before passing someone, instead of just burying your foot into the peddle and waiting for the transmission to figure out what you want to do.
    • Audacity 3.7.8 by Razvan Serea Audacity is a free, open source digital audio editor and recording application. Edit your sounds using cut, copy, and paste features (with unlimited undo functionality), mix tracks, or apply effects to your recordings. The program also has a built-in amplitude-envelope editor, a customizable spectrogram mode, and a frequency-analysis window for audio-analysis applications. Built-in effects include bass boost, wah wah, and noise removal, and the program also supports VST plug-in effects. You can use Audacity to: Record live audio. Record computer playback on any Windows Vista or later machine. Convert tapes and records into digital recordings or CDs. Edit WAV, AIFF, FLAC, MP2, MP3 or Ogg Vorbis sound files. AC3, M4A/M4R (AAC), WMA and other formats supported using optional libraries. Cut, copy, splice or mix sounds together. Numerous effects including change the speed or pitch of a recording. Write your own plug-in effects with Nyquist. And more! See the complete list of features. Audacity 3.7.8 changelog: #10688 Fixed an exception thrown when pasting into a newly-created track (Thanks, David Bailes (@DavidBailes)!) #10870, #10884, #10775, #10629 Fixed tone generation, waveform-scale setting, SetClip Name parameter, and clip-boundary command names for scripting and macros (Thank you, David Bailes (@DavidBailes)!) #11106 Fixed the loading of presets for the Distortion effect (A million thanks, David Bailes (@DavidBailes)!) #10947 Fixed paste into an empty audio track not preserving the source sample rate (Thanks, Juan Gabriel Colonna (@juancolonna)!) #10776 Allowed AltGr modifier in label and clip name editing (Thanks, Davide Peressoni (@DPDmancul)!) #9938 Added options to choose where silence is truncated (start/middle/end) (Thanks, Noah Rosenfield (@nosenfield)!) #9935 Added Podcast 2.0 chapters JSON export for label tracks (Thanks, Noah Rosenfield (@nosenfield)!) #10103 Improve UI on HiDPI displays on Linux/wxGTK (Thanks, Ivan A. Melnikov (@iv-m)!) #10099 Fixed MixerBoard Mute and Solo button display (Thanks, Ivan A. Melnikov (@iv-m)!) #10681 Fixed multichannel FLAC import #10999 Fixed envelope being broken after joining clips Download: Audacity 64-bit | Standalone ~20.0 MB (Open Source) Download: Audacity 32-bit | Standalone Download: Audacity ARM64 | Standalone View: Audacity Home Page | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • There really isn't anything magical about the low latency profile, other OS's do this as well. All they're doing is using your CPUs boost clock options in a more smarter way.
    • So we shouldn't have the option because of people using their laptops on battery? OK? LOL
  • Recent Achievements

    • One Month Later
      highriskpaym earned a badge
      One Month Later
    • Week One Done
      highriskpaym earned a badge
      Week One Done
    • One Year In
      highriskpaym earned a badge
      One Year In
    • Week One Done
      FBSPL earned a badge
      Week One Done
    • One Year In
      Jim Dugan earned a badge
      One Year In
  • Popular Contributors

    1. 1
      +primortal
      494
    2. 2
      PsYcHoKiLLa
      198
    3. 3
      +Edouard
      155
    4. 4
      Steven P.
      84
    5. 5
      ATLien_0
      70
  • Tell a friend

    Love Neowin? Tell a friend!