Saturday, May 12, 2012

Automatic assignment of custom font in android activity

Custom font in Android is unfortunately not a theme question (correct me if I'm wrong) but is in fact quite simple to implement. In your common base activity overload the setContentView like this:
	public void setContentView(int layoutResId) {
		super.setContentView(layoutResId);
		
		View root = getWindow().getDecorView().getRootView();
		
		if (root instanceof ViewGroup) {
			Typeface font = Typeface.createFromAsset(getAssets(), "<<YOUR FONT FROM ASSETS>>");
			iterateKids(root, font);
		}
	}

	private void iterateKids(View view, Typeface font) {
		if (view instanceof TextView) {
			((TextView)view).setTypeface(font);
		} else if (view instanceof ViewGroup) {
			ViewGroup group = ((ViewGroup)view);
			for (int x=0; x<group.getChildCount(); x++) {
				iterateKids(group.getChildAt(x), font);
			}
		}
	}


it spends aboout 0.3 ~ 2ms on every child in hierarchy (on emulator) so as long as you optimize your layouts to be less than 100 elements a screen it's definitely okay.

Friday, February 17, 2012

Prayer wheel

Disscussion be here

Sunday, January 22, 2012

6

It's done, compiled and packaged but before publishing i'll have some more testing went live!
And yes, it's about synchronizing stuff and no it's not about google docs.
There's one small issue, but not critical so the public testing can start.  Fixed

What to expect? After migrating to the new phone, settings, practices and their counts automatically restore from nagas knows where.

Let's say if no complaints will show up till 28th of January - I'll publish what I currently have.

Important. Online sync works on devices with Android 2.2 and later. If you're lucky owner of 1.6, the tracker will work but no sync. Sorry.


http://dl.dropbox.com/u/137361/MeditationTracker.apk

But. It's not going to be an easy testing.
0. Write down your counters on paper. Hopefully this is the last time. But this is testing and it's 2012.

0.5 If your android version is lower than 2.2 the test is simple. Backup. Install. Run. It works. Done.

I'm using two scenarios after installing the new tracker:
1. First scenario: you've got only one android device
1.0 Common step. Make sure you're on wifi. Data set is not big but android will backup sooner when on wifi. Go to Settings-Accounts and Sync. Make sure you've got "Background data" and "Auto-sync" on.

1.1 Common step. Go to tracker options, change something (not really necessary but still) go back (this is when magic happens). Adding practice is also a good test (magic happens there too).
1.2 Common step. If you're lucky owner of adb you can do "adb shell bmgr backup com.meditationtracker" and then to make sure "adb shell bmgr run"

1.3 Common step. Normally you don't have adb so. Wait for the sync icon in notification panel above to appear and disappear.
1.4 Scary part. Go to Settings-Applications-Manage Applications. Find there Meditation Tracker. Go inside. Click "Erase data". That is the scary step - all your meditation tracker data is gone now. Now click "Uninstall". And let the tracker go.
1.5 Install new tracker again.
1.6 Open it and rejoice. Your practices have been restored.
1.7 Optional step. Complain of something going wrong.

2. Second scenario. Multiple devices with same google account. 
2.1 Read scenario 1.
2.2 If you have or had meditation tracker on your second device (not important one) do there step 1.4. It should be absolutely clean from tracker.
2.3 Do steps 1.0 to 1.3 on your main device.
2.4 Install new tracker on to the other device. Wait for synchronization to complete. Start tracker there. Rejoice seeing practices and counts from main device.
2.5 Optional step 1.7

I've done some UI clean-ups so normal "have a look if everything still works" test is also important.

Fun! Fun! Fun!

Wednesday, November 9, 2011

g+ page

I set up the Mediation Tracker page on google plus. Let's see which one of the three survives

https://plus.google.com/108254980995273600166

Sunday, September 4, 2011

Well, Blogger has no adequate discussion functionality thus I'll be moving somewhere else. You can contact me on google+, btw. Here: Clickety-click

Thursday, July 14, 2011

1021

We've got almost the round 1024 users of Mediation Tracker. Apart from personal pride it's a great sign that people do practice. Emaho!

Friday, May 27, 2011

notebook on the go usability

on a back of the notebook's screen lid I need a pocket where I can put an external hard drive and not worry about placing it somewhere and watching over it while I work on the go.

Tuesday, May 17, 2011

IV - II

So the actual fourth version of the Meditation Tracker is finally in works. And surprisingly it's not yet about cloud/google docs synchronization. It's about attracting your attention ;)

The features in development:
- Some UI simplification
- New tactile feedback for people using mala size of 1 (it's at least me ;)
- Dim session screens at night
- A hopefully bug fix for crashes in Nexus phones during schedule editing (I lack details on how to reproduce the issue...)
- No more missing practices (they were just hiding, don't be afraid)
- Post install welcome message, about info in app.

The last thing sounds non critical but actually one of the reasons this release will not have google docs yet. The thing is that I'd like to have some real world beta testing prior to official market release and I need to tell people about that. But noone reads this blog. So next release will contain welcome message asking people to read this entry and volunteer to beta testing.

I sound like a villain planning world takeover. Muhaha!

So see you here soon! (and at Karma Guen at the summer course)

PS. If you have a spare mac mini (or one of your iPhone friends complains about not perfect meditracker and has spare one) - I'd accepted that gift in exchange of development ;)

PPS. When leaving comment here - make sure I can reach you electronically (if you expect me to). Just Blogger account isn't enough. Or simply write me an email to durilka at gmail.

Monday, March 28, 2011

UrlCorrector chat psto

Here you can talk about UrlCorrector.

Unless it's about "please change it to have XYZ feature". There will be no development of UrlCorrector.




Тут говорим об UrlCorrector'e.

На тему "нужно добавить фичу ХУN" говорить не стоит. Разработка аддона не ведётся и не будет. Желающие учат Javascript, XUL, находят свободное время и делают сами.

Monday, February 21, 2011

IV

So it's time to start thinking about next, fourth version. No name yet. Actually it would be nice to fix also the theyPhone version but currently I'm not able to buy all the compulsory computers one fruit company requires me to buy in order to create programs for their telephones. Yeah.

So number four. Apart from bugfixes if the bugs will come up here are the most requested features so far:

1. Cloud storage a.k.a. synchronization with Google Docs (that's Mantra 2.0 for you)
2. Gallery with standard images
3. Show only Ngondro practices that are active
4. Apparently we need to redesign the session screen so it is even more simple/informative/usable.

more to come.

Tuesday, January 11, 2011

third version

Previous version wasn't really 1.0.1 but simply "2 / Tsetchu"; the next one, "3 / Lama" has been packed and is now being tranquilo tested.

UPDATE 7.2.2011 After some field testing and one serious bug the Meditation Tracker 3 aka Lama is published into android market.

Feedback especially on German translation is welcome.

Here's the link to the latest test version if you want to have a try or install without market

Changelist:
- Improved session screen: big add button makes it simpler to use without looking at the screen; timer buttons are moved into menu
- Fixed crash after photo's taken (that was the last known issue so far)
- Settings are somewhat chattier
- Custom mala size. now you can have for instance 28 for the refuge and 108 for the rest
- First translations into Russian and German languages. Klingon to come
- Misc tiny bugfixes and facelifts.

Sunday, October 24, 2010

passing arguments to evaluated javascript (so you got a string to execute...)

var a = "hello";
var b = " world";


var func = "function(param1, param2) { document.write(param1 + param2); document.write('<br />'); return 42; }";

document.write(eval(" ("+func+")(a, b) ")); // this one does it anonymously, not garbaging context with temp functions
document.write('<br />'); 


var func2 = "function sub(param1, param2) { document.write(param1 + param2); document.write('<br />'); return 42; }";
onEvent(a, b);

function onEvent(e, v) {
     var ff = eval(func2);
     sub.apply(this, arguments); // this one uses args explicitely
}

Thursday, October 14, 2010

1.0.1 aka Tsechu

So it's done. Smoke test's green and first update to Mediation tracker is alive. Let's see how will it work.

Tuesday, October 12, 2010

it's coming

The second release of the meditation tracker is near. It's not a major one, even really minor, but nevertheless important.

The thing that's about to change is visual appearance. Thanks to the friends, Metitation tracker has now more unified look. Other important point is that it's our first upgrade. I've done it so far on two devices and all went smooth. But it makes sence to have your data not only in the phone anyway, so before upgrading, record somewhere states of your practices.

Tuesday, September 21, 2010

paperless office

Funny enough we don't lack software solutions to build paperless offices, but electronic paper to get rid of the real one. We're solving the problem from the wrong end.

Monday, September 13, 2010

autumn is for mushrooms dot get

Looks like google got bored with their market for android and that's why they silently push("this ice cream is so disgusting, I'll better go make my own") people to create alternative ones. I don't see other rational explanation why official market is still in such lame stage and why custom markets (aka app stores) appear like mushrooms.


Apart from being a mistake of course.

Wednesday, September 8, 2010

oldest guild

Affordable expert-programmers from India (15€ an hour)

Some time ago it was just a joke that software development jobs are not that far from prostitution.

108

Wednesday, September 1, 2010

Meditation tracker 1.0.1 & 1.1

 So. There were no crash reports so far, we have about hundred real users and I'm waiting for the final images to pack into current version and re-release it as not-beta-testing-anymore.

As for the next version (1.1), here's what I have in mind about changes (updated as mind fills up):
  1. Move start/stop timer buttons in menu in practice window
  2. Custom mala size per practice
  3. Auto-silent mode during practice and corresponding setting 
  4. Proper calculation of the no-scroll-list's height
  5. Display values of dialog-based settings (i.e. mala size: 108, timer duraion 20min etc)

Nice to haves (not in 1.1):
  1. Gallery with standard images
  2. Cloud storage/sync for at least current state for backup

Comments?

Wednesday, August 18, 2010

some statistics

"top ten per cent applications in iTunes get about 75,000 downloads, the next ten per cent only 9,000 and the vast majority fewer than 1,000"

OK, I know it's not fair, but we've got 135 downloads already with almost no publicity and no complaints/bug reports (wow? I guess wow!)

That means that in next couple of weeks (a month tops) there will be proper 1.1 release with adequate graphics, polished interface and I guess at least one translation into Russian. I don't feel like mixing bug-fix and new-feature releases so next one will have no new functionality.