Got exception determining connectivity


#1

Hello Everyone, pls kindly help me with the below error:
java.lang.SecurityException: ConnectivityService: Neither user 10034 nor current process has android.permission.ACCESS_NETWORK_STATE.


#2

Hello, could you give a more in depth explanation of how you encountered that exception? Looks to me like you have not given your app permission to use the internet.


#3

When you make a search for it, here is the answer:


#4

when my device point to another URL (ip url ) it works fine, but when it point to dns, it shows like that.
and I try to test with browser on device, it show Untrust Security Certificate. I think this is the problem here.
Is there any solution to make it accept it?


#5

pls check my description.


#6

Let's start with the easy things, show us how you initiate our countly sdk.

Also, enable countly logging and show us what the output was then running the application.


#7

I guess your device has CA (certificate authorities) messed up. We cannot help you with that.

But in case you're trying to make self-signed certificates work, I'm afraid our SDK doesn't support that. You can easily set up a valid certificate with Let's Encrypt.


#8

I am new to this, but what I know is, my app does not accept the SSL certificate.
LOG_URL use https
protected void onCreate(Bundle savedInstanceState) {
Countly.sharedInstance().init(this, LOG_URL, API_KEY_LOG , "123@321");

    Countly.sharedInstance().enableCrashReporting();

    Countly.sharedInstance().setLoggingEnabled(true);

    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

#9

What server URL are you using?