I want to get the mobile number of a sim which is inserted into the device. I know as pr the android SDK TelephoneManger is the class by which we can get it by
In that case you always save your phone no using SharedPreference by using the method getLine1Number() method. when you install your application then your phone number is saven and when when new sim card is used then send SMS to ur registered number. you have to always check after starting the application that your stored number is same with your new number.if same nothing will be happned ,if not same then ur app will send SMS.