Posts

Simple Notification in Android

Image
Notifications are a way to provide information to your customer which displays as a pop up on the device. It helps you to keep in touch with your customer. I am going to create a simple notification without going deep because everything is available on Google. We must understand a few concepts before going further. Notification channel:  Assume you have developed an app for an online learning center where they teach Maths and English. Students can either learn Maths, English, or Both. we must send notification related to Maths to only students who have taken Maths. In this case, we can create channels for Maths, English, and both so triggered notification will be delivered to students who have taken that subject. Each Notification channel can have a different Notification sound and different behavior that you can change from the Notification setting page. I forgot to tell you that Google has introduced the Notification channel from Android 8.0 i.e API level 26. Now yo...

how to use toast in android

  syntax for toast: Toast.makeText(context, text, duration)   example: Toast.makeText(  ctx, "row deleted",Toast.LENGTH_LONG ).show(); where text is used to display the text and Toast.LENGTH_LONG is used to display the toast message for long tym n u can also use Toast.LENGTH_SHORT to display it for less tym

Delete row in sqlite database android

public void deletedata(Context ctx,String del,)     {         SQLiteDatabase myDB = null;         try {             myDB = ctx                     .openOrCreateDatabase(DB_NAME, Context.MODE_WORLD_WRITEABLE , null);             String table_name = "dummy"; // dummy is tble name in sqlite database                         myDB.delete(table_name," name=?", new String [] {del});                              } where table_name is ur tablename in database and name is ur coloumn frm where u want to delete rows n del is the parameter to match with name...

start

today i m starting ma first blog service...thanx to blogger.com