Close AlertDialog - Android Software Development

Hi everyone,
Could someone tell me if it possible to close system AlertDialog raised by PhoneApp (ussd reply) from my app? I tried to send keystrokes "Down" and "Enter" but for android i can send keystrokes for my app only. Method that worked is to reload package "com.android.phone", but i don't like it, maybe there is a better solution (hack, undocumented...)?
Thanks in advance

No, to the best of my knowledge. Android runs each app in its own VM; one app can not access what another app is doing (kind of, think "content providers for the exception).

Related

UCMJ and Air Force Regs app?

Hey all I have tried my hardest to find an App for the UCMJ and Air Force regs...Does anyone know of one? If not, when the Andoid App Inventor is release would someone be interested in working with me to get one created? I already intend to create an app with my bases local instructions (seeing as its a lot less)
Thanks for any/all input

Need help, auto-answer a call

Hello im working with a developer to make an app, and this is her response. I am hoping someone can chime in and give me some guidance i can pass along, where she might look in order to solve our task of auto-answering
we used to evoke 'Action Answer' modules but this feature has been revoked by the Android community as the community states it as a breach of privacy.
Click to expand...
Click to collapse
So what info can i give her, to guide in creating the auto-answer?
Thank you
Can anyone confirm if its still possible to have an app auto-answer an incoming call?
Thank you all, in a bind sorry for the bump
rsarno said:
Can anyone confirm if its still possible to have an app auto-answer an incoming call?
Thank you all, in a bind sorry for the bump
Click to expand...
Click to collapse
I do not have any info, only another question - If you do move forward, it would also help me in my quest: Using the 'Volume Up' key to answer the phone call ( thread here: http://forum.xda-developers.com/showthread.php?t=909172 )
I assume they would need similar answering capabilities ....
i dont see why its a breach of privacy, when the owner of the phone is the one who installs the app. If someone were to install the app on a phone they dont own it would be pretty obvious to the owner something is wrong.
But why not install the app with auto answer turned off as a default, forcing the user to turn it on manually and even stating to them a privacy statement explaing the operation and asking are you sure you wanna do this, maybe even adding a sercurity code for approval.
FreeTheWorld said:
i dont see why its a breach of privacy, when the owner of the phone is the one who installs the app. If someone were to install the app on a phone they dont own it would be pretty obvious to the owner something is wrong.
But why not install the app with auto answer turned off as a default, forcing the user to turn it on manually and even stating to them a privacy statement explaing the operation and asking are you sure you wanna do this, maybe even adding a sercurity code for approval.
Click to expand...
Click to collapse
Our challenge is finding the way to actually do it, to have the phone auto answer. At this point the client is not concerned with privacy, for reasons you listed.
One positive is that i see there is an app called AutoAnswer which (based on reviews) was functional as of 10 days ago. If they can do it, we can do it.
Its just my developer is challenged by what methods to use, or whatever, to invoke the "Answer" action
You can try the following code, but I didn't test it myself (and you need ITelephony.aidl from Android sources)
Code:
TelephonyManager tm =
(TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
Class clazz = Class.forName(tm.getClass().getName());
Method m = clazz.getDeclaredMethod("getITelephony");
m.setAccessible(true);
ITelephony it = (ITelephony) m.invoke(tm);
it.answerRingingCall();
thanks, i will try!
vvv.androlib.com/android.application.pl-apps4android-nacm-zmipE.aspx where vvv is instead www
"Not Another Call Manager" NACM
tested before 10 Minutes on G1 with Biffmod 2.2
you can find it on the Market
xektop said:
vvv.androlib.com/android.application.pl-apps4android-nacm-zmipE.aspx where vvv is instead www
"Not Another Call Manager" NACM
tested before 10 Minutes on G1 with Biffmod 2.2
you can find it on the Market
Click to expand...
Click to collapse
He was looking for API, not for ready app. Or you propose to decompile this app and look at the code?
rwxer said:
He was looking for API, not for ready app. Or you propose to decompile this app and look at the code?
Click to expand...
Click to collapse
An API or a method of doing it via code.
Client is about to walk, because we cannot find a solution.
Need to answer the call automatically based on conditions. Not using Bluetooth, just as if you hit the "Accept" button on the handset, and it connects the call
Still not able to find a solution. Any ideas?
So answerRingingCall() method is not working?

Someone for building me a very simple app?

Hey guys,
i'm looking for someone who can build me a little app that simply redirects me to the "mobile network settings" page.
Probably, that's very simple and I can do this for myself but i haven't installed the SDK and also I haven't programmed for Android before.
I needn't to be a widget, a shourcut on homescreen without an icon would be absolutly OK.
There are some widgets in market but they caused some strange bugs on my LG P500
If there is someone who can spend some time for me, it would be great
Sorry for my english, i'm german...
Hey,
for some reason, I couldn't get the intent to work properly so I just made it so they app runs an am command in the shell. It should work though. Let me know if there are any problems.
Also, your english is fine. There are so many people here who are about 1000 times worse..
Works fine on first startup, but on relaunch there is only a blank activity with the programm title on top and I have to close the app manually with a task manager
Is there any possibility to fix this?
singmea1337 said:
Works fine on first startup, but on relaunch there is only a blank activity with the programm title on top and I have to close the app manually with a task manager
Is there any possibility to fix this?
Click to expand...
Click to collapse
Harr then let me take a shot at it .
.apk file is in attachment, let me know if it does what you wanted.
If it does it, i will be happy with a thanks!
und dein Englisch ist ok...
oh right, of course. That makes sense. I really didn't go about this the right way. Maybe someone else can come up with a better solution. Anyway, I updated it so the issue you were describing won't happen. However, now you can't back out of the application. As soon as you back out of the mobile network settings, my app comes back into focus and starts the mobile network settings again. I'm sure there's an easy fix. Maybe I'll look at it again after work.
okay, I wasn't thinking straight before. There was an extremely easy solution. Dark3n has probably already done it but whatever.
smaskell said:
oh right, of course. That makes sense. I really didn't go about this the right way. Maybe someone else can come up with a better solution. Anyway, I updated it so the issue you were describing won't happen. However, now you can't back out of the application. As soon as you back out of the mobile network settings, my app comes back into focus and starts the mobile network settings again. I'm sure there's an easy fix. Maybe I'll look at it again after work.
Click to expand...
Click to collapse
it is quite easy, let me help you out
if you have questions, feel free to ask
Code:
package eu.thedarken.nsq;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;
public class NSQmain extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//setContentView(R.layout.main);
Intent intent = new Intent(Intent.ACTION_MAIN, null);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
ComponentName cn = new ComponentName("com.android.phone","com.android.phone.Settings");
intent.setComponent(cn);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
finish();
}
}
@smaskell
Now, there is only an black screen after the first launch.
But the solution by Dark3n works like a charm
Thanks!
edit:
Oh, too slow, i'm talking of post 5
As I told you already, the widgets I tested caused some bugs. The app from Dark3n got the same issue.
If I change network mode to 2G only, the telephone app crashes without any comments after clicking the call-button. That couldn't be normal?
I've tested this one (couldn't post direct links, search com.curvefish.widgets.network2g3gonoff on market) before and if I clicked on the widget (after such a crash) the call was started
The same thing happens if i launch the app from Dar3n directly from menu but not if i use the shortcut.
If I change the mode directly via menu or using this (de.softxperience.android.switchnetworktype) app there are no problems.
But the last linked app adds a shortcut on the status-bar drop-down and in my opinion that's stupid.
I've checked the app from smaskell but there's still a problem on relaunch...
edit: And there's the same problem..
Sorry for the double-posting..
I will take a look at that later in the evening.
Maybe the settings only gets saved properly after closing parent menus.
By directly calling the submenu this doesn't happen and thats why it FCs.
I dont know if this will help you, but you can start the setting via terminalemulator
Code:
am start -n com.android.phone/.Settings
Sent from my HTC Vision using XDA App
kingchris said:
I dont know if this will help you, but you can start the setting via terminalemulator
Code:
am start -n com.android.phone/.Settings
Sent from my HTC Vision using XDA App
Click to expand...
Click to collapse
Thats basicly how i start it too.
Building App: Buttons & Slider to send serial commands to wifi or BT connection
Ops, sorry, thought I was posting in a new thread. Didn't want to take over yours.
Cant you just use anycut and point it to the right activity?
Sent from my GT-I9100 using XDA App

[Q] Mass text by a push of a button?

Is there an application that will allow me to mass text people by pushing a button on my homescreen? I am a firefighter and most of us have pagers but not all of us do. It would be nice to have an app that I can customize the text (for diff types of calls) per button and who it sends the text to.
Anyone know an app that can do this already or is anyone willing to teach me how to make one?
There are a few in the market, here's two examples....
http://www.appbrain.com/app/grouptext/com.smallbouldering.grouptext
http://www.appbrain.com/app/sms-widget/dev.mike
Hope this helps
Regards
buzzboy said:
There are a few in the market, here's two examples....
http://www.appbrain.com/app/grouptext/com.smallbouldering.grouptext
http://www.appbrain.com/app/sms-widget/dev.mike
Hope this helps
Regards
Click to expand...
Click to collapse
Well SMS widget is basically what I am looking for except I can't send group txts with it. It's a start though.
I just wonder how hard it would be to make an application so I can customize it.

Dev discussion: Bixby Button Remap after Update

Dev discussion:
I think what the button does is launch an intent which opens the Bixby app. Maybe if I record the intent identifier and use it in a 3rd party app (maybe also with the Bixby package name) my 3rd party app intent will be called on button press. Then I could redirect the call to whatever the user wants to happen.
I will try this as soon as possible, tell me what you think
So I recorded the actual intent:
Code:
ActivityManager: Unable to start service Intent {
cmp=[B]com.samsung.android.bixby.agent/com.samsung.android.bixby.WinkService[/B] launchParam=MultiScreenLaunchParams {
mDisplayId=0 mBaseDisplayId=0 mFlags=0
} (has extras)
} U=0: not found
Now the problem is that I can't seem to install a package with the same name even though the original Bixby package is disabled.. I also can not upgrade because Samsung throws me an error.
I'm not sure if I can catch the intent without having the matching package name but I will try that next
Not a dev but thank you
Sent from my iPhone using Tapatalk
I have a feeling this won't end up being possible without root access. Since they're intercepting it before it gets to the accessibility service, I bet you won't be able to intercept the intent from a user level app either. I'd love to be wrong, but even then Samsung could probably patch it again.
datajosh said:
I have a feeling this won't end up being possible without root access. Since they're intercepting it before it gets to the accessibility service, I bet you won't be able to intercept the intent from a user level app either. I'd love to be wrong, but even then Samsung could probably patch it again.
Click to expand...
Click to collapse
I guess you are right. What I've found out is that I can detect a button press with "logcat | fgrep -i WinkService" (try this via adb). This is more of a dirty solution but nevertheless it works.
Of course they will patch it but there's always a possibility.
Is there any way to envoke bixby without the hard button? It is not listed as an app of any sort. By the way, so far "bx actions" still works on my Verizon S8 but I haven't yet had any updates available.
Termynat0r said:
I guess you are right. What I've found out is that I can detect a button press with "logcat | fgrep -i WinkService" (try this via adb). This is more of a dirty solution but nevertheless it works.
Of course they will patch it but there's always a possibility.
Click to expand...
Click to collapse
Oh god, that would require polling the logcat output wouldn't it?
MishaalRahman said:
Oh god, that would require polling the logcat output wouldn't it?
Click to expand...
Click to collapse
Yes but at least it's already filtered so you can invoke at every second output (because intent gets called on button down AND up)
xgman said:
Is there any way to envoke bixby without the hard button? It is not listed as an app of any sort. By the way, so far "bx actions" still works on my Verizon S8 but I haven't yet had any updates available.
Click to expand...
Click to collapse
It can be called from any app. So an app that remaps the button could also place a Bixby shortcut in the launcher
Would've given anything to replace that Bixby shortcut to just launch the camera app. Sad to see they changed the workaround.
Tried a bixby shortcut in Nova but it crashed on launch when the button was mapped to something else. Not sure if it would have worked if the button was not remapped.
Slightly off topic but what app needs to be disabled to prevent SW update so my bx hack continues to work?
suzook said:
Slightly off topic but what app needs to be disabled to prevent SW update so my bx hack continues to work?
Click to expand...
Click to collapse
use the samsung disabler pro app in PS and check look for software update, there should be two of them that you check
xgman said:
Is there any way to envoke bixby without the hard button? It is not listed as an app of any sort. By the way, so far "bx actions" still works on my Verizon S8 but I haven't yet had any updates available.
Click to expand...
Click to collapse
You can use Quick Shortcut Maker.
Code:
Application: Hello Bixby
Activity: Hello Bixby
Package/Class: com.samsung.android.app.spage/com.samsung.android.app.spage.main.MainActivity
Goole Play: https://play.google.com/store/apps/details?id=com.samsung.android.app.spage
--
This information is exported by QuickShortcutMaker v2.4.0.
https://play.google.com/store/apps/details?id=com.sika524.android.quickshortcut
Sent from my SM-G955U using XDA-Developers Legacy app
suzook said:
Slightly off topic but what app needs to be disabled to prevent SW update so my bx hack continues to work?
Click to expand...
Click to collapse
In addition to using Package Disabler Pro,check your Developer Options for an Automatic Update toggle..................

Categories

Resources