Tuesday, April 14, 2020

सड़क

                                          सड़क
तुम्हारी गलतीयो का ही है असर,जो सुनसान है ये सड़क।
कल तलक करते थे कितने ही इस पर सफर, अब पड़े हैं सब अलग थलग।
उदास रास्ते, खामोश मंजर,बस दूर तलक तन्हा है डगर।
तुम्हारी गलतीयो का है असर,जो सुनसान है ये सड़क।

न कोई शोर, न कोलाहल, न आपाधापी, ना ही कोई हड़बड़ाहट,
जो कुछ है, तो दूर तलक है सिर्फ़ खामोशी ही खामोशी और सुनसान सी ये एक सड़क।
तुम्हारी गलतीयो का ही है असर,जो सुनसान है ये सड़क।

रौशनी, आवाज और रफ्तार से कभी करती थी ये खिलवाड़,
परन्तु आज शांत है, खामोश है, उदास है,जैसे कि अंदर व्यथाओ का हो अंबार।
खुद ही खुद में बातें करती, ढांढस बंधाती, हिम्मत देती, कहती यही हर बार,
थोड़ा धीरज धरो,बस कुछ ही दिनों का तो है वनवास।
मैं फिर दौडुगी,भागुंगी, करूंगी पहले सा व्यवहार
मेरा ठहराव मेरा अन्त नहीं, न ही इसको मानो मेरी हार।
मैं फिर तुम्हारे साथ चलुंगी, बन कर तुम्हारा हमसफर, मगर फिर भी सच तो यही है कि,
 तुम्हारी गलतीयो का ही है असर,जो सुनसान है ये सड़क।

Thursday, November 15, 2018

How to convert java code into kotlin in android

Kotlin is a language which is supported by Google as a official language for android development.So,
Android Studio 3.0 is now fully supported Kotlin (no need for extra plugin). If you are using Android Studio >= 3.0 then below jobs are very easy :-

1. Converting Existing Java Code into Kotlin :-
Android Studio Menu -> Code -> Convert Java File to Kotlin File
                                                        Or
Create a new Kotlin file and paste your java code in that file- when Android studio prompted for converting java code into kotlin click Yes.

2. Create a new Kotlin file :-
File -> New-> Kotlin File

3. Convert a part of Java code into Kotlin :-
 Copy you java code snippet from Java file and paste into Kotlin file- when Android studio prompted for converting java code into Kotlin click Yes.


Note :- 
1.When you are creating your project in Android studio you have to click include Kotlin support.
2. For older version of Android studio you need to add Kotlin plugin.

Wednesday, November 14, 2018

How to access Telephony class for disconnecting the call without using AIDL in android

Facing problem in adding AIDL classes in android? 
It's not necessary to add ITelephony.aidl class in android, it's convenience to add them. 
So the question is how to use AIDL class in android project?
 The answer is Java Reflection.If you know what is there and what it does, you can use reflection for get them even they are hidden.
For example:- Suppose you want to create a program in which you need to disconnect the call using ITelephony class then there is a method endCall() in that class. Below are code snippet how to use AIDL class using java reflection :-

Java :-

TelephonyManager tm = (TelephonyManager) context
.getSystemService(Context.TELEPHONY_SERVICE);
Class c = Class.forName(tm.getClass().getName());
Method m = c.getDeclaredMethod("getITelephony");
m.setAccessible(true);
Object telephonyService = m.invoke(tm); // Get the internal ITelephony object
c = Class.forName(telephonyService.getClass().getName()); // Get its class
m = c.getDeclaredMethod("endCall"); // Get the "endCall()" method
m.setAccessible(true); // Make it accessible
m.invoke(telephonyService); // invoke endCall()


Kotlin :-
 
val telephonyService: Any
val telephony =  context?.getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager
try{
var c = Class.forName(telephony.javaClass.name)
var m = c.getDeclaredMethod("getITelephony")
m.isAccessible = true
telephonyService = m.invoke(telephony) as Any
c = Class.forName(telephonyService.javaClass.name) // Gets its class
m = c.getDelaredMethod("endCall") // Get the "endCall()' method
m.isAccessible = true //Make it accessible
m.invoke(telephonyService) //invoke endCall()
} catch (e: Exception){
e.printStackTrace()
}
}

Thursday, May 6, 2010

To Be Hanged By Neck

"To be hanged by neck till death" this is the sentence which Ajmal Aamir Kasab has got Thursday 06-05-2010.The question is not what he had got last day but the question is what he got throughout his life? Name,fame money! No he doesn't got these things in his life.Is he got something through his life? Yes he has, but those things are very scary and very shameful for himself and his family.If we think about this question what he got for himself and his family, we found that he got sorrow,sadness and loneliness for his family. He got the tag of terrorist for himself as per this world's view and the tag of looser as per his colleague terrorist view. But what he got is the best example for any terrorist to see what they got at last.
If you are a terrorist no matter which country from you are or which religion from you are. If you are a terrorist, if you trying to destroy the humanity, if you are trying to dominate the humanity, if you are trying to defeat the humanity then there is only one punishment for you and that is the Death punishment. If you are terrorist then you must have to be hanged by the neck.
God Bless his family members.

Tuesday, May 5, 2009

T-20 matches r good or bad

No, I think that T-20 makes player more energetic than any other kind of this game. It can also provide the experience to new as well as older players. It is also a great entertainment tool and it also provide the huge amount of money to player and sponsors. Also it takes very less time in comparison to other format of this game that's why i thought it is good thing.