Sunday 6 April 2014

Android All Sharing Option

 //create the send intent  
   Intent shareIntent =   
    new Intent(android.content.Intent.ACTION_SEND);  
     
   //set the type  
   shareIntent.setType("text/plain");  
     
   //add a subject  
   shareIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,   
    "Insert Subject Here");  
     
   //build the body of the message to be shared  
   String shareMessage = "Insert message body here.";  
     
   //add the message  
   shareIntent.putExtra(android.content.Intent.EXTRA_TEXT,   
    shareMessage);  
     
   //start the chooser for sharing  
   startActivity(Intent.createChooser(shareIntent,   
    "Insert share chooser title here"));  

Find Hours Diffrence in Kotlin

  In Kotlin, determining the difference in hours between two timestamps is a common task, especially in scenarios involving time-based calcu...