Articles

Qu'est-ce qu'un BroadcastReceiver dans Android ?

Image
Dans le développement d'applications Android, un BroadcastReceiver est un composant qui permet de répondre à des événements système ou personnalisés, tels que la réception d'un appel, la connexion à Internet, la modification de l'état de la batterie, etc. Un BroadcastReceiver peut être défini dans le code ou dans le fichier manifest de l'application, et est capable d'exécuter une action en réponse à un événement. Par exemple, si vous voulez que votre application affiche une notification lorsque la batterie est faible, vous pouvez créer un BroadcastReceiver qui écoute l'événement ACTION_BATTERY_LOW et qui déclenche l'affichage de la notification en réponse à cet événement. Les actions principales déclenchées par le Bluetooth, le mode avion, le chargement, etc. Le tableau ci-dessous présente les actions principales déclenchées par certains événements système courants : Action de diffusion Description BluetoothAdapter.ACTION_STATE_CHANGED Diffusé lorsque l'

Tutoriel PHP : upload et envoie de fichier vers le serveur et insertion de données dans Mysql

Image
Dans ce tutoriel on va voir comment faire l'upload et l'envoie d'un fichier à partir de son ordinateur vers le serveur web apache en utilisant php. Nous allons envoyer aussi les informations entrées par l'utilisateur à propos de ce fichier. Nous devons tout d'abord avoir les logiciels nécessaires pour mener ce travail tel que XAMPP ou WAMP ou EASYPHP  et un editeur de texte tel que Notepad++ Il est aussi fortement recommandé de suivre ce didacticiel qui vous apprend les bases de HTML5, CSS3 et PHP : Premier projet HTML CSS PHP MYSQL   avant de se plonger dans le code de l'envoie d'un fichier à travers php. Nous devons tout d'abord créer une base de données et une table. Dans ce tutoriel le nom de la base de données est "test" et le nom de la table est "paper". -- CREATE TABLE `paper` ( `id` int(11) PRIMARY KEY NOT NULL AUTO_INCREMENT, `author` varchar(50) NOT NULL, `field` varchar(50) NOT NULL, `file_name` varchar(50) NOT

Tutoriel android : code source d'integration d'une barre de navigation (navigation drawer) dans une activité android

Image
  Ce tutoriel vous permet d'apprendre à ajouter un navigation drawer à travers un NavigationView dans un DrawerLayout dans votre activité Android. Cet article contient une vidéo qui vous explique comment integrer une barre de navigation au niveau d'un empty activity. La vidéo contient des détails qui vous permettent d'apprendre comment cette intégration s'effectue. Le code source xml et java se trouve en dessous de la vidéo. Tout d'abord nous devons mettre en place trois fichier xml dans le dossier layout de notre projet et nous devons aussi ajouter un dossier menu sous notre dossier Res. Nous devons aussi ajouter un fichier portant le nom de menu_main.xml sous le dossier menu. Le premier fichier c'est celui qui représente l'interface principale de notre activité et il porte le nom d'activity_mail.xml : <?xml version="1.0" encoding="utf-8"?> <androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://sche

Privacy policy : smart contacts manager application

  Houssem Lahiani built the  smart contacts manager  app as a Free app. This SERVICE is provided by Houssem Lahiani at no cost and is intended for use as is. This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service. If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy. The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at   smart contacts manager  unless otherwise defined in this Privacy Policy. Information Collection and Use For a better experience, while using our Service, I may require you to provide us with certain personally identifiable information. The information that I r

Privacy Policy : Tunisian Stroke Registry application

Houssem Lahiani built the Tunisian Stroke Registry    app as a Free app. This SERVICE is provided by Houssem Lahiani at no cost and is intended for use as is. This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service. If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy. The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at  Manage Clinic Smartly  unless otherwise defined in this Privacy Policy. Information Collection and Use For a better experience, while using our Service, I may require you to provide us with certain personally identifiable information. The information that I re

Helper Class Android SQLiteOpenHelper SQLiteDatabase

import android.database.sqlite.SQLiteOpenHelper import android.database.sqlite.SQLiteDatabase import android.content.ContentValues import android.content.Context import android.database.Cursor class Helper (context: Context?):SQLiteOpenHelper(context,DATABASE_NAME,null,1) { override fun onCreate(db: SQLiteDatabase) { db.execSQL( "CREATE TABLE " + TABLE_NAME + "(" + KEY_ID + " INTEGER PRIMARY KEY, " + KEY_NOM + " TEXT," + KEY_VILLE + " TEXT," + KEY_LAT + " TEXT, " + KEY_LONG + " TEXT )" ) } override fun onUpgrade( db: SQLiteDatabase, oldVersion: Int, newVersion: Int ) { } fun addCentre(centre: Centre) { val db = this.writableDatabase val cv = ContentValues() cv.put(KEY_NOM, centre.getNom()) cv.put(KEY_VILLE, centre.getVille()) cv.put(KEY_LAT, centre.getLatitude()) cv.put(KEY_LONG, centre.getLongitude())

قواعد الخصوصية لتطبيق إستبيانات لسكان طينة

    Houssem Lahiani built the  إستبيانات لسكان  طينة   app as a Free app. This SERVICE is provided by Houssem Lahiani at no cost and is intended for use as is. This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service. If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy. The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at  Manage Clinic Smartly  unless otherwise defined in this Privacy Policy. Information Collection and Use For a better experience, while using our Service, I may require you to provide us with certain personally identifiable information. The information that I r