android-wireless

Bluetooth connectivity: MODE_IN_CALL vs MODE_IN_COMMUNICATION

橙三吉。 提交于 2021-01-27 12:23:02
问题 I have an application that needs to connect to wireless bluetooth headset to collection RAW audio. MODE_IN_CALL works in some devices and MODE_IN_COMMUNICATION in others. Mic works and I lose audio or vice versa. I am using Nexus 5x and Samsung Edge. But behaviour is inconsistent across 2 devices of same model and make. Phone calls and Media Audio is enabled for paired bluetooth headset. if (btAdapter != null && btAdapter.isEnabled() && btAdapter.getProfileConnectionState(BluetoothProfile

Weird behavior when trying to detect when Wifi network connected android

耗尽温柔 提交于 2020-01-25 11:01:07
问题 I am currently trying to do a relatively simple task in Android. I want to detect when a wireless network is fully connected. At this moment I do not care whether there is internet connection, I just want to know the exact moment when my device is considered connected to network. I will try to describe what I did, and how miserably had I failed. Bare in mind that I have tried official recommendations as well as some answers here but to no avail. Activity registers receiver: IntentFilter

How to connect to a wireless network in android?

 ̄綄美尐妖づ 提交于 2020-01-13 04:38:09
问题 I have managed to scan for wireless networks and obtain scan results in my application. but is there a way i could possibly connect to them using my app itself? I was wondering whether I would have to specify the encryption type for the network i'm trying to connect? and my requirement would be to connect to any wireless network irrespective of it's encryption type? Any ideas? Thanks 回答1: TO connect to WiFi AP needed to implement followed steps: Scan WiFi To be sure that you have appropriate

Call wireless settings screen with back button

陌路散爱 提交于 2020-01-06 08:00:33
问题 If there is no wireless connection and no logged in google account when you open Play Market and choose new or existing account it opens specific wireless settings screen with back button at the bottom. How to open same screen from my app? Thanks 回答1: Intent intent = new Intent(WifiManager.ACTION_PICK_WIFI_NETWORK); intent.putExtra("only_access_points", true); intent.putExtra("extra_prefs_show_button_bar", true); intent.putExtra("wifi_enable_next_on_connect", true); startActivityForResult

can we have wifi direct api working in 2.3 version

狂风中的少年 提交于 2020-01-04 13:37:40
问题 hi i am developing a app which will use proximity to pair other persons. I can either use Bluetooth or Wifi Direct. After some research i found out that Android ICS has API's for Wifi direct but if my application needs to work on older phones i need some API which can help me, please guide me. Does Google provide any API to be included to the sdk to be used for older android versions or I am wondering if it is possible ?? I am reluctant to use Bluetooth because of it's slow connectivity.

can we have wifi direct api working in 2.3 version

限于喜欢 提交于 2020-01-04 13:36:55
问题 hi i am developing a app which will use proximity to pair other persons. I can either use Bluetooth or Wifi Direct. After some research i found out that Android ICS has API's for Wifi direct but if my application needs to work on older phones i need some API which can help me, please guide me. Does Google provide any API to be included to the sdk to be used for older android versions or I am wondering if it is possible ?? I am reluctant to use Bluetooth because of it's slow connectivity.

ConnectivityManager getActiveNetworkInfo() is always null even with data traffic active

巧了我就是萌 提交于 2019-12-22 04:29:18
问题 i'm working on a android project and i had the need to check for internet connection. i searched the web and i found a solution here on stackoverflow. However, i'm having problems on checking the internet state. I already searched everywhere but i can't find any solution for my problem. Here is the manifest: <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name=

How to forget a wireless network in android programmatically?

纵然是瞬间 提交于 2019-12-17 22:16:42
问题 I am working on an app which wifi , where user will be asked to enter password for the scanned network he selects, if user enters a correct password, it connects and works well. But when user enters wrong password, a new network is added with that name, and will be failing to authenticate cos of wrong password, and it will be having authentication problem status. Now if user tries to again scan and select the same network, and enters correct password, it fails to connect even though password

Wireless settings dialog

萝らか妹 提交于 2019-12-08 06:19:30
问题 i am checking networking connection using the below code: public static boolean haveInternet(Context ctx) { NetworkInfo info = (NetworkInfo) ((ConnectivityManager) ctx.getSystemService(Context.CONNECTIVITY_SERVICE)).getActiveNetworkInfo(); if (info == null || !info.isConnected()) { return false; // no connection } return true; // true if having connection } Now, on "no connection" , i am launching "Wireless settings" dialog using the below code: context.startActivity(new Intent(Settings

Can I use WiFi to transfer data/messages between two android phones, not connected to a router?

蹲街弑〆低调 提交于 2019-12-07 08:57:10
问题 I'm aware that if two Android phones are connected to a same wifi network, they can implement socket programming to transfer data between them But I actually want to know if you can use wifi as a transfer medium between two Android phones, just like you Bluetooth? 回答1: With Android 2.2+ it is possible to create a WiFi hot-spot on one device so another device can connect. Internet connection on either device is not required. 回答2: What you are looking for is ad-hoc wireless networking, which is