Use my own Android app/apk as launcher/Home Screen Replacement

Setting the correct intent filters in your manifest will allow it be prompt you to use it as a replacement: <activity android:name=”Home” … android:launchMode=”singleInstance” android:stateNotNeeded=”true”> <intent-filter> <action android:name=”android.intent.action.MAIN” /> <category android:name=”android.intent.category.HOME”/> <category android:name=”android.intent.category.DEFAULT” /> </intent-filter> </activity> See the Intents and Intent Filters documentation from Google.

Python – create an EXE that runs code as written, not as it was when compiled

After some experiments I’ve found a solution. Create a separate folder source in the main folder of the application. Here will be placed source files. Also place file __init__.py to the folder. Lets name a main file like main_module.py. Add all of its contents as a data files to the py2exe configuration setup.py. Now after … Read more

Widgets don’t respond when re-added through code

We can invoke a dialog asking user to permit our app to be able to bind widget IDs with the following code: Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_BIND); intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, sSavedWidgetId); intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_PROVIDER, mWidgetInfo.provider); startActivityForResult(intent, REQUEST_BIND_WIDGET); And bind widget IDs to make them actually work with: Bundle opts = new Bundle(); opts.putInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH, maxWidth); opts.putInt(AppWidgetManager.OPTION_APPWIDGET_MIN_HEIGHT, minHeight); opts.putInt(AppWidgetManager.OPTION_APPWIDGET_MAX_WIDTH, maxWidth); opts.putInt(AppWidgetManager.OPTION_APPWIDGET_MAX_HEIGHT, … Read more

Launch Minecraft from command line – username and password as prefix

You can do this, you just need to circumvent the launcher. In %appdata%\.minecraft\bin (or ~/.minecraft/bin on unixy systems), there is a minecraft.jar file. This is the actual game – the launcher runs this. Invoke it like so: java -Xms512m -Xmx1g -Djava.library.path=natives/ -cp “minecraft.jar;lwjgl.jar;lwjgl_util.jar” net.minecraft.client.Minecraft <username> <sessionID> Set the working directory to .minecraft/bin. To get the … Read more

Clearing and setting the default home application

The code to do this is actually just a very clever work around. When a component with <category android:name=”android.intent.category.HOME” /> is enabled, generally from an install of a new home application, the default home app gets cleared. To take advantage of this by creating an empty activity with the home component like this. <activity android:name=”com.t3hh4xx0r.haxlauncher.FakeHome” … Read more