Jump to content

Afficher nom opérateur dans bar notification


shl

Recommended Posts

Bonjour,

 

Etant débutant dans la création d'apk, je vous sollicite pour un projet : je souhaiterais créer une application qui afficherait le nom de l'opérateur dans la bar de notificaiton

 

j'ai trouvé deux codes sur internet :

TelephonyManager manager = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE));
String carrierName = manager.getNetworkOperatorName();

TelephonyManager telephonyManager = ((TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE));
String operatorName = telephonyManager.getNetworkOperatorName();

 

je ne vois pas trop en fait où le déclarer en surtout je ne trouve rien pour l'affichage dans la bar de notif

 

toute aide serait la bienvenue

 

merci d'avance

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...