I have been working a bit on reading radio logs to retrieve USSD replies, rather than the aidl,
though I am not yet sure which suits my purpose better. I am still hoping to trap menus as well as simple exchanges.
Anyway, I can now read the replies programmatically, but they still land onscreen in a system dialog that I need to press OK to dismiss.
Is there a programmatic way to dismiss this system dialog?
What I am writing is some code that will execute my own USSD (ie 3rd party from carrier) on an android used without human interfacing (there is no one present to press OK). It's used more to send info to the server than to receive info back. I did this on an old Wavecom modem ages ago, so it has been a frustration discovering how difficult this was to do in Android.
In as much as the documentation is minimal, this app actually does a good job intercepting USSD responses:
https://github.com/alaasalman/ussdinterceptor
Related
I know this is some sort of pattern question and had lots of reviews but I am here for something slightly different. In the world generally there are 3 main types of APIS which provide these functions:
QuickBlox, Sinch and PubNub.
I do not want use any of them. They are purely horrible for me. Now each of them separately.
1) QuickBlox - Setting its API is already a huge headache, you are writing heaps of code, logging user every time to get the calling ready. Plus QuickBlox do not keep any session out of box (in the background) so no luck with background listening for incoming calls. So I quit QuickBlox.
2) PubNub - Pretty much OK but the price and the trial is absolutely crazy. I can't imagine myself giving someone 50 dollars every month just for audio call and video call functions, whereas I would not have any income from both of them as there is no such good app in world which offers paid app-to-app calling, so mine should be free too. And also I am in the development phase so I do not want to waste money. They say they giving free 100 users at start. But what it is ridicioulus as 100 users won't give any income so the PubNub is fast out.
3) Sinch - This was the only library I loved and loved really much, I even asked them to add a function of WebRTC of videocalling and they did it! But still there is one more big issue which cannot be handled. The background service. Sinch does not provide and you do not have any chances to listen for incoming calls if your app is killed, so Sinch unfortunately is out too.
4) The last option I HAD to do, because I had no choice, was SIP of Android. It is basically saving hugely but I encountered an issue. I generally and now think to fully move to SIP calls, I did try to load the demo, but what is the issue, is that as far as I understood, to make SIP calls you MUST have a SIP account pre-registered. The horrible part is that I am developing a chat application and that chat application should have that audio calling at least. So it is not good practice to ask users to register a SIP account with in-app account. So by Googling I did not find any solution and came here to ask. Is there any way,to register to a SIP server (free SIP servers which are plenty on the net) with default SIP class of Android, without forcing the user to do it manually? If yes can you please provide code?
I am trying to build an NFC enabled application that transmits data to another device via Android Beam (pushing a NDEFMessage).
While I know there is a success callback void onNdefPushComplete(NfcEvent event), I can't find a failure callback, which would be really useful.
I tried to think of other way to sort of guess whether the transfer happened, if it succeeded or failed but cannot really find anything satisfying. Even a dirty timer would not work since I cannot know for sure when and even if the user actually starts the beam.
I feel pretty much bound by the API since the OS is handling most of the functionality and the application is only providing the message to send.
Any suggestions, something I might have missed? I'd rather avoid rooting the device if possible, but if it cannot be accomplished without tinkering with the core NFC code, then so be it.
Cheers
No, there is no such callback. Or a notification or anything that would give you a clue that things didn't worked.
Unfortunately.
In general the Android Beam API has not been designed with error handling in mind.
I'm making a mobile app where users should be able to start their own radio broadcast channels from their mobile phone. Other users will then be able to browse broadcasts and connect. It also includes some special perks to make it unique.
I've got the general concept of it thought out.
The thing is, I'm not sure how to implement some kind of "server" for it. I could think of two solutions to my problem currently:
Running a server which manages both the list of broadcasts channels,
and also broadcasts the channel to all users.
Running a server which manages the list. It stores a handle for connecting directly to the broadcasters phone.
Now I'm a total beginner when it comes to how demanding something is. Am I thinking correctly if i say that the first solution would overload the server when there are many users on it?
That would make the second option seem good, although if a channel gets popular enough, wouldn't it require insane amounts of bandwidth for the broadcaster?
Help me out guys, as I said I'm a total beginner when it comes to these kinds of things.
I would just use SHOUTcast or Icecast. It is very easy to start up either of these from another application.
These servers are very simple in their operation. Data comes in (usually encoded in MP3 by the source client [your mobile app]), and the server sends the exact data right out the door to any connected clients. It does implement a small buffer so that receiving clients can be initially flooded with data, to speed up the time before audio is played. You could always implement one of these yourself, but there is no sense in re-inventing the wheel.
You absolutely cannot run a server on the phone itself. Not only won't there be enough bandwidth, but each connection consumes some resources, which are extremely limited on a mobile device. You should host the streams on your own servers, and use the mobile device as a source client.
You're going to have to utilize some off the shelf product here. There's no way you're going to write something yourself that will do what you're hoping (unless your product is a total flop, and no one is using it). People can't broadcast much off their phones (your initial thought), so, you'll *have to be re-broadcasting everything for them, to whoever wants to be listening. It doesn't really matter how popular a specific "station" is, because the point is that you have to be broadcasting to whoever wants to be listening. These sorts of solutions require all sorts of very convoluted server mirroring schemes.
I'm not sure if something like SmartFoxServer can help you or if you want to try to leverage a VOIP server of some kind. I'm sure someone else will pipe in with a more specific and useful suggestion, but I can tell you for certain that this is NOT something you're going to write yourself, if you have no experience with this sort of thing.
And not that you asked, but I'll also note that if the users start broadcasting copyrighted material, then you're liable for pirated distribution of it. So, I'd be VERY careful what you allow people to transmit!
I would like to know how to intercept incoming calls and also how to forward them. I know there are several questions regarding this topic here and elsewhere on the net, but all the answers use the android.intent.action.PHONE_STATE action which is broadcast always after the phone begins to ring and the call screen is shown.
That's why I'm looking for a solution where i could intercept the call in an early stage before any notification (ringing etc..) has been done. I would like to know if maybe this is possible on a platform level in native code and if yes how ? Or perhaps with some kind of trick with the SDK ?
In general, if you can't do it in Java, you can't do it in the NDK. Most of the time the opposite is true: You can't do MOST things on Android in the NDK.
I don't know of a way to do that, and frankly doubt it exists: It would be a huge security hole if you could download an application that would forward calls to another number.
You may want to look at this source code, it may help you : http://code.google.com/p/auto-answer/
None of the existing apps in Android can forward a call based on a given number. All they can do is forward all or nothing. There's one app in particular (cBlocker) that can forward calls on schedule besides blocking incoming and outgoing calls and SMS based on rules.
so i was wondering if its possible to for an application that i would write to be constantly running in the background and alter regular phone operations. For example this could be something like as soon as you receive a text from anyone you forward it automatically to another number. Is something like this at all possible?
Just to be clear I don't want to solve that particular problem through some other means, just want to know if apps can accomplish that.
Also if that is possible is it possible for an app that i write to alter more immediate and instant things, like an incoming call.
thanks all for reading this, and hopefully a helpful response :)
It depends on how far you want to go, but I would expect that what you want to achieve probably isn't possible.
The Android OS does reserve some actions and prevent them from being doing programmatically. For example, you can display the Dialer with a number filled in but the user has to press the call button to make a call. Similarly, you can display the SMS app with a message already written but it is up to the user to send the message.
I don't know for sure, but I assume this is for security. For example, let's imagine you could write an application which could start a call with no user interaction. I would release my Super-Handy-Dialer application which makes quick calls for you making you life easier, but what it also would do is wait until 2am and call my premium rate phone line every night for 3 hours.