Wednesday, March 30, 2011

Can one Android app have more than one icon in app launcher?

Why not! Just add this to your favorite AndroidManifest.xml:



<application>
<activity android:name="AActivity" android:icon="@drawable/a_icon" android:launchMode="singleTask"
android:screenOrientation="portrait"
android:label="@string/a_name" android:theme="@android:style/Theme.Translucent.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="BActivity" android:icon="@drawable/b_icon" android:launchMode="singleTask"
android:screenOrientation="portrait"
android:label="@string/b_name" android:theme="@android:style/Theme.Translucent.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="CActivity" android:icon="@drawable/c_icon" android:launchMode="singleTask"
android:screenOrientation="portrait"
android:label="@string/c_name" android:theme="@android:style/Theme.Translucent.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity></application>

and that's it. You'll get s single app with three different app icons: a_icon, b_icon, c_icon.



Some useful tools for Android shell

ps | grep "launcher" will look for all processes running on Android that have launcher in their name
pm path com.android.launcher will show where the process binary lives

Monday, March 28, 2011

ADB: error: insufficient permissions for device

Needs: 


adb kill-server 
sudo adb start-server
adb devices

to work

Thursday, March 24, 2011

Return in Java class constructor

I have never seen that before but looking at Android source tree found something like that:

class A {
    A(String arg){
    if (arg == null){
        return;
    }
  }
}

Tuesday, March 22, 2011

Android default wallpaper location

In system/frameworks/base/core/res/res/drawable/default_wallpaper.jpg

The rest of the wallpapers are in system/packages/apps/Launcher2/res/drawable-hdpi/wallpaper_ ...

Sunday, March 20, 2011

True

THE JOB DESCRIPTION GUIDE:
  • "Fast-paced" = we change our minds alot, shut up.
  • "Self-starter" = oops, last guy left quickly.
  • "Team-player" = our boss takes the credit.
  • "Good communicator" = you're the asshole we'll have talk to clients.
  • "Knowledge of HTML" = recruiter is 700 years old and thinks this is difficult.
  • "Benefits include health insurance and 401k" = we don't pay much, so this had to be in the ad.
  • "Flexible work schedule" = better enjoy unpaid OT, dickface.
  • "Java or C++" = we don't know what the fuck we're doing...
  • "Java or C++ or .NET" = ...maybe you know?
  • "Cutting edge technology" = we've upgraded to XP SP3.
  • "Bachelors in CS/IT or technical discipline or equivalent experience" = we used to hire people right out of high school, until the incident.

    Taken from here

Saturday, March 19, 2011

Remove Android application from app launcher

Just remove this:



<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
intent-filter>

from AndroidManifest.xml

Friday, March 18, 2011

Get local list of targets

./android list targets

Manage android emulator from command line

create: ./android create avd -n avd21 -t 3
launch: ./emulator -avd avd21
delete: ./android delete avd -n avd21

More

How do you delete a downloaded timesheet in QuickBooks so it can be resubmitted?

You need to delete the incorrect time from your QuickBooks first, and then ask this employee to use the following utility to re-submit his/her timesheet for that week.

This utility changes the status for a week's worth of time activities. The employee time trackers must perform the steps to update their own activities.

1. Login to the Row View and navigate to the week of time activities you would like to update the status for.

2. Click the Switch to Calendar View link.

3. From the Calendar View, click the Switch to Row View link.

4. Change the following parameters to the end of the URL of the page to invoke the repair utility:

&cmd=repair&status= submitted

The full URL should look something like this:

https://timetracking.quickbooks.com/j/tts/tts_timesheetweek=1222714800000&ampcmd=repair&ampstatus=subm...

5. When done adjusting the URL, press the Enter key on the keyboard to load the next page.

6. If the statuses were successfully updated, you will see a success message on the Timesheet Repair Status page.

7. Click on the Undo Submit button, make the necessary changes to the timesheet, and then submit the timesheet again.

Taken from here

Cheap memory

http://www.memoryupgrade.pro/

Creating a patch file in SVN

svn diff > ~/new_bug_fix.diff