Pages

Thursday, January 27, 2011

Null Pointer Exception when sending SMS in android


                This is an issue that I came across while developing my android application. The reason in my case was that the size of the message or number of characters in the text message was to large.
                I solved it by sending multiple messages using sendTextMessage(…) method, the other solution would be to sendMultiPartMessage(….).
                It’s a no brainer but it took hours for me to realize the issue. Returning a null pointer exception was little weird. I still can’t understand why this is called a null pointer exception.


if you want to know about receiving broadcast on new SMS arraivals chech this


Sunday, January 16, 2011

Samanalawewa Power Plant - Field Visit Report

Samanalawewa Power Plant
Field Visit Report






















Table of Content

1)      Introduction                                                                                3

2)      Objective of the project                                                              3

3)      Project Cost                                                                                 3

4)      Power Generation                                                                        3

5)      Impact of the project                                                                   4



6)      Operation and Maintenance                                                        4

7)      Water Leakage from the dam                                                      5

8)      References                                                                                    5












1.       Introduction
Hydro power generation is identified as the method with highest potential to full fill the electrical energy requirements of Sri Lanka. The main reason for this identification is the shortage of fossil fuel resources in the country. Therefore the Sri Lankan government has carried out many projects to promote the hydraulic power generation.
`The Samanalwewa Power Plant project was launched to meet the increasing demand for electricity in the country marking an 8.2% annual increase in the volume of electricity sales on average during the 1980–1985 periods. This project was recognized to be the most economical and effective measure to cope with shortage of electricity supply expected for the first half of the 1990s and was expected to make a great contribution to the national economy and improvement of the welfare of Sri Lanka. Therefore, this project was deemed to be of high priority.
2.       Objective of the project
“This project aimed to address the shortage of electricity supply in Sri Lanka by constructing a reservoir-type hydroelectric power plant with a maximum output of 120 MW in the upstream of Walawe River, approximately 160 km southeast of Colombo, thereby contributing to the economic development and improvement of the welfare of Sri Lanka.” –(taken from the reference)
3.       Project Cost
The cost for this project exceeded the estimated cost of 60,176 million yens by 22% marking the final cost as 73,593 million yens.
4.       Power Generation
·         The expected amount of annual power generation at phase 1 was 462 GWh/year.
·         This was revised to 403 GWh/year at the time of appraisal for the remedial works.
·         The actual annual power generation was 271 GWh/year (1993–2005 average).







Actual power generation by Samanalwewa power plant

5.       Impact of the project
 Contribution to stable power supply
·         Generate a maximum of 8.2% of the total national power generation at peak times (2004).
·         Plays a role of one of the national electric power supply facilities to meet the rapidly increasing demand for electricity in Sri Lanka.
Influence to the downstream water use
·         CEB has to discharge irrigation water from the dam in accordance with the agreement with the Irrigation Department.
·         Power generation using the reservoir water results in an increase in the water flow downstream during the dry season, thereby contributing to irrigation in the Basin of Walawe River.
Employment creation effect of the project
·         2,000–3,000 jobs were created during the implementation of the project.
·         About 150 persons were employed for this project and related activities after its completion.
6.       Operation and Maintenance

Samanalawewa power plant has won the National Productivity and Quality Award for the Public Sector in 2006

7.       Water Leakage from the dam
·          Initial water leakage rate when the reservoir is full 2.8 m3
·         Leakage rate after the wet blanketing is performed in 1998 was reduced to 2.2 m3
·         water leakage  surged to over 5 m3 per second on December 3, 2006
8.       References
Samanalawewa Hydroelectric Power Project (I) (II) (III) and  
Samanalawewa Hydroelectric Project (Reservoir Remedial Works)

Saturday, January 15, 2011

MD5 fingerprint for android debug keystore

use cd command to go to .android folder
type the following command on the command prompt

keytool -list -alias androiddebugkey -keystore debug.keystore -storepass android -keypass android

if you have set environment variables properly, MD5 fingerprint will be displayed on the command prompt.
you can use this to obtain Google maps API key for debugging your application.
but you cant deploy your app with this key.
to deploy you have to create a new keystore and obtain the API key for that one.
follow this link to get more info for creating a key store:GoogleMaps Api Key