Thursday, July 15, 2010

Low Level Android app fundamentals: Rookie/Novice/fresher...

APPLICATION COMPONENTS:
1. Activity(ACT)

activity, window(W), view(V)
Activity.setContentView()



2. Service(SVC)-

3.  Broadcast Receiver(BR)- 

4. Content Provider(CP)- 
ContentProvider(CP) and ContentResolver(CR)

ACTIVATING COMPONENTS USING INTENT

ACT:

SVC:

BR:
onReceive()









SHUTTING DOWN COMPONENTS


ACT:
finish()
finishActivity(). (startActivityForResult())


SVC:
stopSelf() 
Context.stopService().







THE MANIFEST FILE












INTENT FILTERS




ACTIVITIES AND TASKS





The principal Intent flags are:



FLAG_ACTIVITY_NEW_TASK
FLAG_ACTIVITY_CLEAR_TOP
FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
FLAG_ACTIVITY_SINGLE_TOP
The principal <activity> attributes are:
taskAffinity
launchMode
allowTaskReparenting
clearTaskOnLaunch
alwaysRetainTaskState
finishOnTaskLaunch 






High Level Android app fundamentals: Rookie/Novice/fresher...

http://developer.android.com/guide/topics/fundamentals.html - nothing better

Wednesday, July 14, 2010

Clean URLs with Drupal-UrlRewriteFilter-Quercus-Jboss

http://www.brianshowalter.com/blog/running_drupal_on_quercus - There's a nice RewriteRule-RewriteMatch combo classes for UrlRewriteFilter posted at this blog.
But it's designed  for tomcat and didn't work on following JBoss configuration right away.
The JBoss config:
1. JBoss-4.2.2
2. Deploying the Quercus web-app(with Drupal inside) as exploded war (Folder name= "myapp.war").
3. Quercus 403
4. Drupal-6.17.
5. UrlRewriteFilter-320
Steps that worked for me:
1. Follow  the above blog at brianshowalter.com.
2. Download UrlRewriteFilter source code from http://code.google.com/p/urlrewritefilter/
(http://code.google.com/p/urlrewritefilter/downloads/detail?name=urlrewritefilter-3.2.0-src.zip&can=2&q=)
3. You must have already downloaded drupalrewrite_0.1 in step1.
4. Couldn't find a link for posting comments on above blog. Hence posting the modified source code here. Kindly setup UrlRewriteFilter and drupalrewrite_0.1 sources with all required libs in eclipse etc. and copy the compiled classes to your myapp.war/WEB-INF/classes.
5. Checkout updated sources for drupalrewrite from http://drupalrewritefilter.googlecode.com (http://code.google.com/p/drupalrewritefilter/source/checkout) and compile/jar and copy to WEB-INF/lib(jar) or WEB-INF/classes(class) as you wish.
6. Good to go.

Thank you.