Simple MD5Sum Generator Used for Warm and Synergy Updater

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Security.Cryptography;
using System.IO;

namespace WarmMD5Sum
    public partial class Form1 : Form
        public Form1()

        private void button1_Click(object sender, EventArgs e)
            // Get current application directory path
            string executableName = Application.ExecutablePath;
            FileInfo executableFileInfo = new FileInfo(executableName);
            string executableDirectoryName = executableFileInfo.DirectoryName;

            // Process the list of zip files found in directory where this program is running
            string[] fileEntries = Directory.GetFiles(executableDirectoryName, "*.zip");

            string filesProcessed = "Files Processed:" + Environment.NewLine + Environment.NewLine;

            foreach (string fileName in fileEntries)
                // Generate MD5Sum from file
                byte[] b = System.IO.File.ReadAllBytes(fileName);
                string sum = BitConverter.ToString(new MD5CryptoServiceProvider().ComputeHash(b)).Replace("-", "").ToLower();

                // Create MD5Sum file  
                string MD5SumOutputFile = fileName + ".MD5Sum";
                TextWriter tw = new StreamWriter(MD5SumOutputFile);
                // Record what files were processed
                filesProcessed += fileName + Environment.NewLine + Environment.NewLine;




Creating an Android Activity with no UI

How do you create an Activity based applications with no UI?

The answer is that you need to set the activity theme in the manifest, for RosieUtility I use:


Like this in AndroidManifest.xml:

<activity android:name=".MainActivity"
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />

If you just want to kick off something quick, you’ll also want to call “finish();” after firing the intent in onCreate of Activity

The latest set of activity themes are defined in /res/values/themes.xml in the Android source here.

Note I’m not using the theme ‘NoDisplay’ as I do actually show notifications on the screen as the Activity is going about its business.


Launch Activity/Service On Android Boot

package com.logicvoid.voguetools;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.Toast;

public  class OnBootReceiver extends  BroadcastReceiver {

    public void onReceive(Context context, Intent intent) {
         if ("android.intent.action.BOOT_COMPLETED".equals(intent.getAction())) {
              Log.d("VogueTools", "Got the Boot Event>>>");
              // do your stuff for example, start a background service directly
              // here
              Toast.makeText(context, "Testing From VogueTools", Toast.LENGTH_LONG).show();



<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""
    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".MainActivity"
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />

		<!--   Handling for On Boot Receiver -->
		 <receiver android:name=".OnBootReceiver"  android:enabled="true"  android:exported="false"  android:label="OnBootReceiver">
		        <action android:name="android.intent.action.BOOT_COMPLETED" />
		 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
		<!-- End Handling for On Boot Receiver -->

    <uses-sdk android:minSdkVersion="4" />


For reference. the Context passed in the onReceive is that of the Application, not a specific Activity.

If you’re doing anything that is context sensitive like dealing with preferences in your application, perhaps using appContext.getSharedPreferences. Use getApplicationContext() within your application to ensure the preferences will be read from both the BroadcastReceiver onReceive and the application itself. As the onReceive Context is that of the application, they will be equal.