Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8258829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:40:58+00:00 2026-06-08T02:40:58+00:00

Hello i am new to Android, I’m getting this problem even after having the

  • 0

Hello i am new to Android, I’m getting this problem even after having the required SMS permissions inside my manifest file. I tried a couple of ways but it doesn’t work anymore got any idea?

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.phonefinder2"
        android:versionCode="1"
    android:versionName="1.0">
    <uses-sdk android:minSdkVersion="8" />

        <uses-permission android:name="android.permission.ACCESS_GPS" />
    <uses-permission android:name="android.permission.ACCESS_LOCATION" />    
   <uses-permission android:name="android.permission.RECEIVE_SMS" />
   <uses-permission android:name="android.permission.READ_SMS" />

    <application android:icon="@drawable/ic_launcher">


        <activity android:name=".PhoneFinder" android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <receiver android:name=".FinderReceiver" android:enabled="true" android:exported="false" android:permission="android.permission.RECEIVE_SMS"> 
            <intent-filter > 
                <action android:name="android.provider.Telephony.SMS_RECEIVED" android:priority="999"/> 
            </intent-filter> 
        </receiver>
    </application>

</manifest> 

Error:

07-19 19:23:25.915: D/SntpClient(66): request time failed: java.net.SocketException: Address family not supported by protocol
07-19 19:23:29.444: W/ActivityManager(66): Permission denied: checkComponentPermission() reqUid=10042
07-19 19:23:29.454: W/ActivityManager(66): Permission Denial: broadcasting Intent { act=android.provider.Telephony.SMS_RECEIVED (has extras) } from com.android.phone (pid=124, uid=1001) requires android.permission.RECEIVE_SMS due to receiver com.example.phonefinder2/com.example.phonefinder2.FinderReceiver
07-19 19:23:29.544: V/Telephony(235): getOrCreateThreadId uri: content://mms-sms/threadID?recipient=83380222
07-19 19:23:29.616: V/Telephony(235): getOrCreateThreadId cursor cnt: 1
07-19 19:23:30.126: D/Mms:app(235): getSmsNewMessageNotificationInfo: count=19, first addr=83380222, thread_id=1
07-19 19:23:30.194: W/NotificationService(66): STOP command without a player
07-19 19:23:30.305: D/MediaPlayer(66): Couldn't open file on client side, trying server side
07-19 19:23:30.334: E/MediaPlayerService(34): Couldn't open fd for content://settings/system/notification_sound
07-19 19:23:30.334: E/MediaPlayer(66): Unable to to create media player
07-19 19:23:30.354: W/NotificationService(66): error loading sound for content://settings/system/notification_sound
07-19 19:23:30.354: W/NotificationService(66): java.io.IOException: setDataSource failed.: status=0x80000000
07-19 19:23:30.354: W/NotificationService(66):  at android.media.MediaPlayer.setDataSource(Native Method)
07-19 19:23:30.354: W/NotificationService(66):  at android.media.MediaPlayer.setDataSource(MediaPlayer.java:716)
07-19 19:23:30.354: W/NotificationService(66):  at android.media.MediaPlayer.setDataSource(MediaPlayer.java:671)
07-19 19:23:30.354: W/NotificationService(66):  at com.android.server.NotificationPlayer$CreationAndCompletionThread.run(NotificationPlayer.java:88)

FinderReceiver.java:

package com.example.phonefinder2;

import android.app.Notification;   
import android.app.NotificationManager;   
import android.app.PendingIntent;   
import android.content.BroadcastReceiver;   
import android.content.Context;   
import android.content.Intent;   
import android.content.SharedPreferences;   
import android.location.Location;   
import android.location.LocationManager;   
import android.os.Bundle;   
import android.telephony.SmsManager;   
import android.telephony.SmsMessage;   
import android.util.Log;
import android.widget.Toast;

public class FinderReceiver extends BroadcastReceiver {
    private static final String SMS_RECEIVED = "android.provider.Telephony.SMS_RECEIVED";
    private static final String TAG = "Logging Activity";

    Context context;   
    @Override    
    public void onReceive(Context context, Intent intent) {  
        Log.v(TAG, "New Broadcast Receiver");
        this.context = context;   
        SharedPreferences passwdfile = context.getSharedPreferences(    
                PhoneFinder.PASSWORD_PREF_KEY, 0); 

        Log.v(TAG, PhoneFinder.PASSWORD_PREF_KEY);

        String correctMd5 = passwdfile.getString(PhoneFinder.PASSWORD_PREF_KEY,    
                null);    

        Log.v(TAG, correctMd5);

        if (correctMd5 != null) {    
            Log.v(TAG, "MD5 is not null");

            if (intent.getAction().equals(SMS_RECEIVED)) {
              Log.v(TAG, "Intent SMS RECEIVED success");
              Bundle bundle = intent.getExtras();   
              if (bundle != null) {
              Object pdus[] = (Object[]) bundle.get("pdus");
              SmsMessage smsMessage[] = new SmsMessage[pdus.length];   

//              for(int i = 0; i < smsMessage.length; i++)
              for(int i = 0; i < pdus.length; i++) {   
                  smsMessage[i] = SmsMessage.createFromPdu((byte[])pdus[i]);   
                if (smsMessage[i].getMessageBody().contains("RING:")) {    
                    String[] tokens = smsMessage[i].getMessageBody().split(":");    
                    if (tokens.length >= 2) {    
                        String md5hash = PhoneFinder.getMd5Hash(tokens[1]);    

                        if (correctMd5.equals(md5hash)) {    
/*                            String to = smsMessage[i].getOriginatingAddress (); 
                            SmsManager sm = SmsManager.getDefault(); 

                             sm.sendTextMessage (to, null, "success!", null, null);
                            NotificationManager nm =  
                                (NotificationManager) context.getSystemService (Context.NOTIFICATION_SERVICE); 
                            Notification notification = new Notification(android.R.drawable.ic_dialog_info, "Alert", System.currentTimeMillis());
                            PendingIntent contentIntent = PendingIntent.getActivity (context, 0, new Intent (context, PhoneFinder.class), 0);
                            notification.setLatestEventInfo (context, "GPS address", "You have been detected", contentIntent);
                            nm.notify (R.string.service_start, notification);*/
                            this.abortBroadcast();
                            Toast toast = Toast.makeText(context, "Ring success!", Toast.LENGTH_LONG); 
                            toast.show();
                        }    
                    }    
                } 
                }   
            }    
    }
        }
}    
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T02:41:01+00:00Added an answer on June 8, 2026 at 2:41 am

    I managed to fix it by changing the following:

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.phonefinder2" android:versionCode="1" android:versionName="1.0">
    
        <uses-permission android:name="android.permission.BROADCAST_SMS"/>
        <uses-permission android:name="android.permission.ACCESS_GPS" />
        <uses-permission android:name="android.permission.ACCESS_LOCATION" />    
        <uses-permission android:name="android.permission.READ_SMS" />
        <uses-permission android:name="android.permission.SEND_SMS" />
    
        <application android:icon="@drawable/ic_launcher">
    
            <activity android:name=".PhoneFinder" android:label="@string/app_name">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
    
            <receiver android:name=".FinderReceiver" android:enabled="true" android:exported="true" android:permission="android.permission.BROADCAST_SMS"> 
                <intent-filter android:priority="1000"> 
                    <action android:name="android.provider.Telephony.SMS_RECEIVED"/> 
                </intent-filter> 
            </receiver>
    
         </application>
    
         <uses-sdk android:minSdkVersion="8" />
         <uses-permission android:name="android.permission.RECEIVE_SMS" />
    
    </manifest> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im very new to this android development.I just started to create a hello world
I'm new to Android development, and I'm having trouble with a simple Hello World
Hello i am new to android development I have never seen this type of
Hello i am new in android and i am developing one application in which
Hello i am new in android and i really need help with something. I
I am new to android. I got one issue during run my first hello
Hello StackOverflow Users, I am new to android and trying to develop a game
Hello i'm a new coder to android. I have a program that Plays Pauses
I am new to phonegap and android, I have create a hello world application
Hello I am new to Android programming and I am a bit rusty with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.