I need some help with an excruciating problem...
I have an app using DatagramSocket sending broadcast udp messages on my local network, and this work perfectly when I run it on mobiles android L (5.x) or lower.
The project has the follow permissions: internet, access_network_sate, access_wifi_state, change_wifi_state, change_wifi_multicast_satate, interact_across_users, and other permissions.
This bolded permissions was used on my app, during traffic of messages.
During the implementation TimerTasks, AsyncTasks and Threads was used to create the DatagramSocket properly, depending of the use, because I know this is necessary to send messages on network (it is necessary run network reader|writer out of main thread).
But the app not working properly when mobiles android M (6.x); anyone message is sending, and I don't have any ideia what the cause of this problem.
I'm try search about permissions on Android M, and I can see news on system permissions, but don't see anything about my specific case.
I will be very grateful if somebody can help me.
Related
I am into a new project which requires me to use a USBconnected "Webcam".
The whole fun should run on Android 4.4.
my little story was:
I try multiple apps which do this - all work on both my testing devices
adapting some NDK lib that directly uses /dev/video0. This didnt work due to read-permission that was not granted in a new File("dev/video0").canRead() check. Although my unix permissions are correct, this seems to not work due to some new check on Android 4.4. (the whole thing was suggested here: Connect Android phone to a USB Web camera )
next: discover the UsbAccessory API that supposedly easens a lot of the above.
´find no documentation or anything about how to correctly handle a webcam
I still try, but don't come further than finding no device via
usbManager.getAccessory();
I've also tried to discover devices by filtering for a USB_ATTACHED broadcast but nothing triggers.
So I am starting to ask myself how the hell do others find the devices & communicate with them to get the pictures?
Anyone has sources from which i could learn, or a tutorial or something?
Little update from my side:
- I've gotten access by using the Android USB Host API e.g. UsbDevice instead of UsbAccessory.
- I have the connection and everything setup fine, and can now send binary data to my webcam and supposedly receive.
I can now send controlCommands via connection.controlTransfer(...) or use a "UsbRequest" in order to receive data.
However, I couldn't find any documentation to "make the camera submit pictures" to me. My Endpoint is of type XFER_INT (=interrupts).
I am continuing to try sending out various commands (e.g. binary values) but haven't had any success so far.
I recently installed Cyanogenmod 11 Pepper on my Xperia sola phone. Happily, CM 11 natively supports Short and Media Message Service encryption. I found this very convenient.
Because of this reason I immediatly registered in WhisperPush (pre-installed app with CM11). It all went fine and I got my TextSecure verfication code via SMS.
1. Do I have to do additional steps after receiving that TextSecure verification code?
I tried to text my gf who's using TextSecure but she could not initiate a encrypted session with me. If she tries to do so, I receive the key but nothing more.
2. How I can verify from within the CM "Messaging" App if encryption is working? (is there a flag of something)
Thx in advance and all the best,
"2. How I can verify from within the CM "Messaging" App if encryption is working? (is there a flag of something)"
I believe that there is currently no way of telling whether the message is encrypted or not and this is something that the devs are working on. IMHO this is terrible for a system that boast high security.
For some work I'm doing, I want to have an emulated GSM modem which will communicate with an Android-x86 virtual machine over a Unix socket. The VM should see the emulator as a real modem and use it to send SMS (as the first pass of functionality).
So far, I've put something together which handles some AT commands and just replies "OK" to all the rest. For some commands, like "AT+CRSM", I just have a table of responses gathered from running the official Android emulator and looking at the radio log. For others, I maintain some state and construct answers; those commands include:
CFUN?
CPIN?
CGREG?
CGREG?
COPS?
CGREG=
CREG=
CPIN=
COPS=
CRSM=
CSMS=
CGSN
CIMI
CSQ
Android will boot, and send commands to my emulated modem, which answers, however it doesn't seem to be fully functional. Android doesn't detect any radio signal strength, for instance, just showing an "x" in the signal bar.
Does anyone know of a similar project, or just what AT commands are absolutely necessary to get some basic functionality?
Well, I'll answer another of my own questions, it's easier that way.
I ended up implementing an emulator which maintains a little bit of state, such as whether or not unsolicited CREG and CGREG messages are enabled, the network registration status & network name format (for the COPS command), and a message reference counter for SMS.
It supports the following commands:
CFUN?
CPIN?
CGREG?
CREG?
COPS?
CGREG=
CREG=
CPIN=
COPS=
CRSM=
CSMS=
CMGS=
CGSN
CIMI
CSQ
All other messages just get an "OK" response.
With the stock AOSP Android source running in an emulator with the "-radio unix:/tmp/phone" switch, I can send SMS messages and decode the binary PDUs into real messages. I will continue to add functionality so SMS messages can be injected back to Android, and hopefully open-source the code at some point.
I am developing an application that will make SIP calls using the SIP APIs. I want to use the SipDemo code as my starting point, but when I run SipDemo on my devices (Nexus or Galaxy Tab) I always get "Registration failed. Please check settings." I am using the same username/password/server information that works successfully in Sipdroid.
I inserted log messages in setRegistrationListener to follow what's happening, and I will see onRegistrationDone fire, but then it seems to register again, because it will then see Registration failed with the error message "registration timed out" followed by registration failed with the error message "cannot initiate a new transaction to execute".
I've been beating my head about this for a few days, and I've got a deadline rapidly approaching. Any help on this issue would be greatly appreciated, or if you could point me to some other examples/tutorials of how to use the SIP APIs.
I fixed it! The demo wants to use UDP by default, but I was able to make it connect by hardcoding the protocol to TCP. I have a netgear modem from charter cable, and I have seen several reports of it blocking access. I assume the two are related, but for now I'm just happy to have it work so I can continue my development.
Thanks for the help!
Check the logcat, it should have more information about what failed. Also if you have control over the server, check the server logs as well.
Seems like you are not alone http://code.google.com/p/sipdroid/issues/detail?id=60.
I would suggest that you try what people tried there: i.e.
Try another router.
Change port in code. Read the link for more details.
I'm trying to set up a web server using the Restlet framework on my Android phone. My idea is to build a game where one phone creates some markers on a map which then can be transferred directly to other phones using rest. At first (and for simplicity) I want to transfer a List of Objects.
Running a server on my computer seems to work fine, but when I transfer the code to my Android application, it won't start the server. Here is the code:
Component serverComponent = new Component();
serverComponent.getServers().add(Protocol.HTTP, 80);
final Router router = new Router(serverComponent.getContext().createChildContext());
router.attach("/gamedata", GameDataResourceServer.class);
serverComponent.getDefaultHost().attach(router);
serverComponent.start();
When the line serverComponent.start(); is executed, this Exception is thrown:
java.net.BindException: Permission denied (maybe missing INTERNET permission), although the internet permission is in the manifest file. Searching for some tutorials didn't help either. The result are either client applications or very complicated scenarios.
Could someone give an example for a simple application?
In Unix-type environments you typically need root access to bind to a TCP port below 1024. You're trying to bind to port 80, and unless you run this code as root the OS will prevent the request.