Implementing a phone number search box, like in the SMS app - Android Software/Hacking General [Developers Only]

Hi XDA,
I'm writing my first Android app, an open source webtext client for Irish mobile networks. The current version of the project can be found here: https://code.google.com/p/webtextr
There's one thing I'm having trouble with though. I'd like to implement a ‘recipient’ text box, where the user can start typing the name of a contact, and after each letter is pressed, it searches their contacts database and provides a drop-down list of suggestions. Then the user could click on a name and it would insert their number into the text box. This would be just like the way it works in the stock SMS app when you go to compose a new message.
Does anyone know how to implement this? I've been looking through the source code of the stock SMS app here https://github.com/CyanogenMod/android_packages_apps_Mms/tree/froyo/src/com/android/mms/ui. But... it's *very* complicated and not especially well commented.
Any help would be massively appreciated. Once this is added, the app will be fully functional and perfectly usable.

Bump? Anyone?
I've figured that I should use an AutoCompleteTextView. But any examples I've found online have been broken in some way, and seem to use the deprecated People class.
Is this really as hard as it seems? I'm suprised Android doesn't provide an easy way of doing this...

Related

[Q] Noob needs help to create event calendar app

Hi all,
I'm a noob app developer trying to do it for the first time. I'm trying to create an event calendar app for company's internal purposes. So that everyone in the company (which uses a lot of android phones) can be updated on company events that are coming up.
My approach is to create a database with MySQL for events input, and to use PHP to connect the database which is in a server and to push it to the android devices that are used in the office as that's how I found it in a tutorial from HelloAndroid.
My questions are:
1. is this the best approach to create such app?
2. Can I use Android's default calendar to input these events? if not is there some kind of calendar template that I can use to display the information to the users.
Probably will have more questions as I progress, but please help if anyone is more experienced in these matters than I am.
Thank you very much, and really appreciate the inputs that I'm gonna get
A simple solution would be to use Google Calendar.
By using GC you can add/edit events either from a PC (work or home) or your Mobile anywhere in the World.
All that is required is for someone to first set up the calendar on Google and push it out to all those who you want to see it.
This way you are not isolating anyone who does not have an Android Phone.
that's a really good point. Especially in a closed environment like an office. I didn't think of that before. THank you very much.
However, if let's say I want to try to build an app for that for public use, not just confined to limited numbers of people in a company.
Would that be the best approach or if there's any better way to approach it. I may decide to build the app after all just to learn and gain experience in app development.
thanks again for the feedback, really appreciate it.
I can't really give you advice on developing an App sorry.
All I can say is the method I mention is the one which I use to keep all my Operational Team (Surgeons/Doctors/Nurses/Admin/etc) updated and advised.
There's nothing short in you developing your own Calendar App but you would have to ensure it would be available to all and that includes anyone anywhere regardless of the fact they are at work, home, holiday, with Android or not, have a Phone, PC, Mac, etc... etc...
For that there's already a stable tool by the name of Google Calendar.
If you do develop one I'd still be interested in seeing what ideas you could bring into practice that would have a benefit over GC.
I understand your point of view, and actually you got me thinking, maybe if I really want to do the apps, I can create an app that calls the Gcalendar events, and display it from the app. I can find out the API to do that, and that would be much simpler.
Thank you again for your input, really appreciate i
racdyn said:
I understand your point of view, and actually you got me thinking, maybe if I really want to do the apps, I can create an app that calls the Gcalendar events, and display it from the app. I can find out the API to do that, and that would be much simpler.
Thank you again for your input, really appreciate i
Click to expand...
Click to collapse
No problem.... I wish you well on your venture.
Do please let us all know how you get on.. You never know, if it becomes that good I may even use it myself over the stock calendar App or any of the other's that already link to GC.

[Q] TTS for web browser/VoiceOver equivalent for Android?

Hi,
I've been looking for a way to have my Android phone read to me similar to iOS's VoiceOver feature. I'm running Android 2.3 but can't seem to find a way to accomplish this easily.
A couple quasi solutions I have found is to use a RSS reader, such as "FeedSpeak" or "Web Talks" that support TTS (Text to speech), however this only works for RSS feeds. Another method is to convert websites into PDF's using Dolphin Browser's "MyPDF" Add-on and use ezPDF's voice reading feature to read the PDF back.
Am I missing something that is inherent in the Android OS? Does anyone have a better app to accomplish this?
Thanks in advance for your help!
gTen from over at the PPCGeek's forum recommended
Voice Browser Lite: https://market.android.com/details?...dfreebrowser.lite&feature=more_from_developer
This is an excellent example of what I'm looking for, I just wish it was a little more refined. Hopefully this will help someone looking for a similar app.
Hello,
I've been looking for exactly the same solution for a while now, and ended up looking at the same SW as you mention -- but found them a bit lacking. And yes, I agree, Voice Browser is annoyingly close. What bothers me the most is why isn't that one a browser plugin that can be activated only when needed.
Sorry if this doesn't provide you with any added knowledge (apart from the consolation that you exhausted all existing options).
Let us know if you find anything new / better. TIA for that.
I'm sorry for posting in a such old thread, but I was looking for exactly the same app and Google brought me here. I foud one very simple but that can satisfy the requirements of anyone looking for something similar. Here it is: https://play.google.com/store/apps/details?id=com.benigumo.speechweb
Web Speech doesn`t work for me...I just get FC's all the time...
I think it's really annoying that there is no simple App or Add-on for this feature.
In fact I find it unbelievable. Is there really no convenient solution?
dp
I wonder if the permissions in android prohibit an app like that. my understanding is that apps reallycan't interact with other apps for security purposes.
Use "Voice Reading" app for reading web pages android
"Share" the web page to "Voice Reading" (read aloud) app. You have to get the app from Googleplay. This is the best way that I have found.
It's the highest rated reading app. Remember you can 'share' any page or email.:good:

[Q] (CODING) Need help coding a simple, lightweight application

So, I need some help.
I want to develop a simple app for my Android phone that lets you input a text when accessing the phone's lockscreen, this text should then be saved in a log file containing not only the input text but also date and time of input registration. There should not be any way of avoiding the input either, entering no text and continueing should result in a log that only contains the date and time.
This should result in being able to check who accessed your device and when. For me this would be helpful. I'd then input a nickname for myself that nobody knows of and if someone tries entering the device using my real name, I'd know it wasn't me.
Now here is the problem, I haven't ever developed an application or anything of the sorts. My only experience in coding would be HTML. Does anybody feel like helping me out?
It's a complicated situation, so I'm not responding to the usual "Why don't you just do this or that". I want this specific method that works for me if at all possible.
Thank you for your consideration.
_Valkyr//
Anyone? ;-;
Sent from my GT-I9505 using XDA Free mobile app

[Looking for] Incoming call app with customizable info

Hi guys,
I recently started a new job which will require me to receive calls from many different people. Each of these will be from a different company and I will have talked to them about a specific product or a specific application/problem they had.
So I was wondering if there is an app that allows me to add info for each contact so that when I receive a call from John, there is a pop-up or a string that tells me who John is and what he might want from me.
Hope that's clear!
Thanks in advance, looking forward to your answers!
Mario
Something either as a phone app or a pop-up that can show notes on a contact, maybe recent interactions, subjects, etc.
I have heard of an app that does this but I don't remember what it was called. It was meant for business interactions with clients. If I find it I'll update my post.
Edit:
I believe what you want might be a CRM app, what a quick search found was a few that may match your needs.
https://play.google.com/store/apps/details?id=com.nimble.client
Or possibly
https://play.google.com/store/apps/details?id=com.netmine.rolo.crm
I haven't used either one but it gives you an idea of where to look possibly if these aren't for you.
Hope it helps!
shadowline said:
Something either as a phone app or a pop-up that can show notes on a contact, maybe recent interactions, subjects, etc.
I have heard of an app that does this but I don't remember what it was called. It was meant for business interactions with clients. If I find it I'll update my post.
Edit:
I believe what you want might be a CRM app, what a quick search found was a few that may match your needs.
https://play.google.com/store/apps/details?id=com.nimble.client
Or possibly
https://play.google.com/store/apps/details?id=com.netmine.rolo.crm
I haven't used either one but it gives you an idea of where to look possibly if these aren't for you.
Hope it helps!
Click to expand...
Click to collapse
That's exactly what I was looking for! I had no idea it was called CRM! Thanks a lot! I'll try these two, if I find anything better I'll update it for future reference!
If anyone else has anything similar to reccomend, I'd gladly check it out!

[DEV] Porting call audio injection behavior from Google Pixel Dialer to AOSP Dialer

I'm working on a personal modding project, where I take the AOSP Dialer and add some features that I'd like to have. Long story short, for a component of this, I need to figure out how Google has been able to inject arbitrary audio into the conversation/call audio stream.
For years, discussion online, and especially on Stack Overflow, has insisted that:
There are too many upstream limitations, this is impossible
This is impossible, you have to play it over the speaker and hope the microphone picks it up
You can't do this, even Google says so
Indeed, even Google's up-to-date MediaPlayer documentation clearly shoots this down and doesn't mince words:
You cannot play sound files in the conversation audio during a call.
Click to expand...
Click to collapse
However, we know this isn't true. At least, not anymore, and not on Pixel devices. Google's Call Screening feature can "talk" to someone calling your phone, but that synthesized audio is never played audibly to the user. In other words, Google has been able play a Text-To-Speech stream of audio to someone calling your device, doing so silently, clearly to the listener, and without requiring the handset speaker or user's microphone to be "on."
Despite the fact that this is "possible" by virtue of "it has already happened," I can't find any discussion, documentation, info, or anything helpful about how Google has been able to do this. So, what do you do?
The next logical step is to start decompiling the app, but that's easier said than done. I'm by no means an expert in reverse engineering Android apps. Admittedly, you could consider me a beginner. Still, I've found a few things that seem useful, so here's what I've been able to find:
First off, when compared to the AOSP Dialer, the Google Dialer requires an additional privapp-permission that may be of interest: android.permission.MODIFY_AUDIO_ROUTING. I can't find much about what this permission does or how it is used, but it's definitely used by the Google Dialer, and on a stock Pixel 3 XL ROM, that permission is defined in /product/etc/permissions/privapp-permissions-google-p.xml as a privapp-permission.
Next, when decompiling the app, one of the first things I noticed is that a special "IMPL" package containing a playInternal function is class injected/loaded dynamically, and it's adjacent to MediaPlayer code that seems to play audio over a certain channel. The class it tries to load is:
Code:
com/android/dialer/audio/impl/CallAudioPlayer
However, that package isn't present in the list of decompiled classes (there's no "audio" folder under "dialer"), and despite playInternal being explicitly called by a string, there aren't any other classes that seem to define the playInternal function.
I don't know where XDA stands on posting decompiled code, but if you're using JADX, the area of interest is in defpackage/bhk.java.
But if I'm correct, this means that:
You can use MediaPlayer to play over the call stream, contrary to Google's documentation; you just need a special IMPL that allows for that behavior
This (probably?) requires the aforementioned MODIFY_AUDIO_ROUTING permission
If one were to obtain/locate and re-implement CallAudioPlayer.java, you could probably reproduce this behavior in the AOSP Dialer, or any other system app with the necessary permissions
If I'm not correct, then chasing down CallAudioPlayer will be a dead end. Still, the fact stands that Google did this somehow, so the answer must be somewhere.
So... that's where I'm at with this. I don't feel like I'll get much further without some help from more knowledgeable people, since I don't know where this CallAudioPlayer class is located. If it's in the base apk, but obfuscated, I can't find it. And if it's in a system framework or overlay APK, it must be using a different name, since no instances of CallAudioPlayer or playInternal exists in any of the relevant .apks on my system.
If this requires more sophisticated Android system/API modifications, that's fine too. This will end up on a custom ROM, so even if part of this behavior extends outside of the APK, any potential solution can be implemented in an AOSP ROM to achieve this functionality.
If you have any advice on how this may have been done, I really appreciate any and all discussion I can get on this. And if you don't know, I encourage you to ask a friend or someone who might be more knowledgeable when it comes to reverse engineering. Even if no one outright knows the answer to this, I hope to get at least some recent discussion on this topic, so that people investigating this in the future will at least have some sort of starting point.
Thanks for reading!
Hi. I'm no expert on Android (far from that haha) or Reverse Engineering. Though, I'm making an assistant installed as system app in a rooted Android and can also be compiled with the hidden and internal methods and classes so they can be used, like ITelephony, for example (https://github.com/anggrayudi/android-hidden-api) - btw, have you tried to mess with those classes and methods? (Sorry for my ignorance, I've no idea how it is to code/recode a ROM, what you need to use and stuff.) And anyways, I found something you didn't mention up there, so I'm unsure if you already know or not. From what Google says here (https://support.google.com/phoneapp/answer/9118387) in the "Screen calls manually" section, "Your Google Assistant screens the call and ask who's calling and why. You'll get a real-time transcript of how the caller responds.". Though, if it's their assistant doing that, not sure why that permission is on Dialer and not only on the assistant. Anyways, maybe that could be a good place to look at?
EDIT: Maybe also you (or anyone, of course) could look at sending DTMF tones over the call (I only made a quick search on Google, but there may be more that could help on this?). I think it's the same thing as it's inserting audio into the call. Though I can't be sure - btw, if it's really sending audio, then any Dialer app can already do that! But may not be that simple, so no idea at all. Maybe that's hardware thing and not software (>95% probable?). Just trying to give to ideas on where more to research.
Here (https://issuetracker.google.com/issues/36906273#comment107) it's said "I found this app, that can send dtmf after the call is made and active: https://play.google.com/store/apps/details?id=mobi.drupe.app (...)" - name: "drupe - Contacts & Caller ID" (just in case the app gets deleted from PlayStore and then people don't have their name to search for, only the package). If it's audio that it's being injected then it's possible, since that app seems to do it already, and the answer could be there too and might be good to look for the keys' frequencies on the code? Again, sorry for my ignorance on anything wrong I said. As I said in the beggining, I'm far from expert/experienced on Android.
I'll also be trying to search on how to send DMFT tones over a phone call. Could help, maybe. And if only a frequency could be sent for any reason, at least it's already cool to send some beep haha (preferably different from the ones of the keys or it might be confused with a key press by the other side, depending on who we're calling).
Late reply, did you solve this? I would like to build call features on Aosp. Best!

Categories

Resources