I am making an application in android which integrates twitter and facebook logins and save the logged user info. It is working fine in device with GPRS. But when I am trying to run the application with wifi it gives exception as below.
For Twitter: "Server error"
For Facebook: "DialogError"
please give me some hint to solve this problem.
use permission
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
I think u off ur WIFI in phone.
Related
On Android12 devices, when using the bluetooth features, I get the flowing exception:
java.lang.SecurityException: Need BLUETOOTH permission
android.bluetooth.BluetoothHeadset.<init>(BluetoothHeadset.java:379)
android.bluetooth.BluetoothAdapter.getProfileProxy(BluetoothAdapter.java:3017)
My app's targetVersion is 29, and the related permissions have already declared in manifest.xml:
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
This problem will not happen when the app first loading, but happened after turn on/off the Nearby Devices ipermission. It seem that it will clear the BLUETOOTH permission?
I am currently able to get the Bluetooth adapter mac address on devices with sdk from Marshmallow till Oreo.
However, starting Pie, the retrieved mac address is null.
The following method is working only till and including oreo.
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission
android:name="android.permission.LOCAL_MAC_ADDRESS"
tools:ignore="ProtectedPermissions" />
<uses-permission android:name="READ_PRIVILEGED_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.BLUETOOTH" />
BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();
String macAddress = Settings.Secure.getString(context.getContentResolver(), "bluetooth_address");
return macAddress;
I also tried to access BluetoothAdapter.getDefaultAdapter().getAddress() but it returns a fake Mac address like this "02:00:00:00:00"
I only ask the user for runtime permission for fine location. Should I ask for something else? Is there a way to achieve this on Pie and 10?
N.B: I know such app can not be uploaded to Google Play. I just want to implement this for testing purposes on personal devices.
My app seems to connect to server and work only when I am using the wifi connection. However when I use the mobile network (mobile data) connection it does not connect to server. Does anyone have any suggestions what I should do? My AndroidManifest.xml permissions look like this:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
I'm working on android app which do some pings on LAN, using C# System.Net.NetworkInformation.Ping class. What kind of android manifest permission do I need? For now I have only android.permission.INTERNET, but it seems not enought.
Many thanks for any help.
add these two permissions :
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
I want make mirroring without WiFi-direct.
like chromecast mirroring function.
Chromecast application can access screen without
rooting&wifi-direct.
I found "capture_video_output" permission at API 19, but I can`t found any API.
So, I decompiled chromecast, but it hasn't "capture_video_output" permission.
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
Is it right way for mirroring?(wifi-display)
How can I make mirroring application?
Or where can I get this info?
You can use Presentation APIs to mirror a view within your app (can be a virtual view) to a chromecast device if mirroring is happening. Otherwise, there is no API for you to mirror phone's screen to a chromecast device.