Android : How Can I Prevent Apps From Invoking StartActivity
Oct 15, 2009
I have an Activity X which is only accessible after you've entered a valid credential.
How can I prevent other apps from calling startActivity with an Intent pointing to X?
e.g. Intent intent = new Intent( this, ActivityX.class );
startActivity( intent );
Basically I don't want Activity X to be exported to any apps except my app.
View 1 Replies
Jan 27, 2010
I am running into a critical conflict of sorts. My app is a remote service which essentially starts an activity when the screen goes to sleep. How it does this is very simple via screen off broadcast receiver and then an explicit intent to start the activity as a new task. The activity is basically in charge of responding to key events and displaying some simple text.
Thanks to a few window flags added in 2.0, activities can do this. They can be created in a way that either puts them on top of the lockscreen, or completely dismiss the lockscreen. This way they basically have focus without the lockscreen having to be dismissed by user. The alarm clock in 2.0 uses the flags to wake up the device and show the alarm dialog. I use them to place my activity when the screen sleeps so the user sees a custom wakeup lockscreen. The reason we create it at screen off is to get rid of lag the user experiences at wakeup involving first seeing the lockscreen, then seeing the activity appear. Also doing it immediately at sleep allows it to have focus so it can handle key events effectively.
The process works perfectly except in certain apps. So far, it seems the bug is consistent while browser (and even dolphin browser) as well as the facebook app are running. The bug never happens in GTalk or Launcher. It is rare but can still be duplicated in the messaging app every so often. I can't figure out why my activity doesn't get created at sleep while these apps are active. My remote service still gets the screen off broadcast and does the startActivity for the explicit intent, and that's all I get in the log. My onCreate is not being called. Instead it gets called when we wake the screen up again.
I have tried, as a control, to hold the partial wakelock starting when my remote service gets created, and the issue persists. So I don't believe it is a problem that the CPU has gone to sleep. Since only these particular apps cause the issue to duplicate, I can't imagine why the activity start fails. What could those apps be doing to interfere with another app's ability to get created? I use singleInstance as the launch mode so that I can ensure that the activity will never be able to be recalled by user process. I want it to go away when user unlocks and it is working fine like this, as long as it is able to be created. The singleInstance ensures I can have the same lockscreen handle an intent to do something specific based on user actions that the remote service monitors.
my source code can be viewed on my project page. http://code.google.com/p/mylockforandroid/source/browse/#svn/trunk/myLock/src/i4nc4mp/myLock
The issue happens to both my CustomLockService and NoLockService variations. These two services will start Lockscreen or ShowWhenLockedActivity and the bug is witnessed. The build illustrating the bug's end result-- user has to try to unlock 3 times due to the bug because on wakeup when the oncreate finally succeeds, user is seeing the activity when normally it would have auto-dismissed thanks to key event logic that also isn't seeming to happen due to the delayed onCreate, so they have to send it to sleep again. Now that the activity is properly done being started, and screen is asleep, the expected functionality happens at next wakeup-- can be downloaded also from the downloads tab.
This seems like an extremely irrational thing to be caused only by specific apps. I am quite baffled and out of ideas for a solution unless I've made some critical mistake in my activity definitions.
View 1 Replies
View Related
Apr 30, 2010
I tried to invoke another activity from my main acitivty which is located in a jar file.
CODE:..........
Im doing it this way because i only know the name of the class. This works fine but unfortunately, all resource files can't be found while loading the activity from the jar file. at the first occurence of loading a res file there is a ResourceNotFoundException:
CODE:..............
View 1 Replies
View Related
Jan 16, 2010
Is there a way for an App to invoke the default Alarm Clock application and receive a intent at a given time for specific functions to be activated.I understand the the AlarmManager can be used for this sort of purpose but I'm trying to leverage the complete alarmclock GUI framework that allows users to set the time of an alarm, activate/deactivate them, etc (as implemented in the default alarmclock application package and the setalarm.java file for example).
View 2 Replies
View Related
Jan 20, 2009
I want to start the application after particular interval time. How this could be possible. Can some one give me some clue ? Which permission i will have to use ? I hope some one will give me reply as early as possible ?
View 4 Replies
View Related
Oct 13, 2010
Do you know any application to prevent other applications from reading your personal data (contact, identity, history, ...) ? That would be great to be able to use our phone without giving away to unknown company/people our very personal data.
View 2 Replies
View Related
Mar 1, 2010
How the heck to I stop Virtual VM and Messages from automatically starting and running in the background every time I get a text message or voicemail? I have already downloaded/installed and set chompSMS to the default text app. Even though text messages will open/send in chompSMS automatically, the Messages and Virtual VM apps will still automatically open and run in the background without telling me. Since they sap up so much battery life on my Eris, I want them to stop opening.
View 4 Replies
View Related
Mar 11, 2010
Is there a particular flag that we can use to prevent apps showing up in marketplace which require the phone to have a Camera Flash /LED. typical apps are ones which make the phone act like a torchlight in dark , i have seen a tag which prevents apps requiring autofocus in a camera from appearing in the marketplace. Just looking to find out if there is something similar for camera flash.
View 2 Replies
View Related
Aug 3, 2010
Please find the code sample below:
public class Abc extends Activity implements OnClickListener{
private ListView displayList;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.mainlayout);
displayList =(ListView)findViewById(R.id.addressbooklistview);
addressbookAdapter = new CustomListAdapter(this,addressbookList);
displayList.setAdapter(addressbookAdapter);
registerForContextMenu(displayList);}
I am not able to invoke the context menu on long press. Please let me know any solution for the same.
View 2 Replies
View Related
Aug 15, 2010
I have purchased several apps through the Google market. Updating to Froyo required a system reset for me so the apps had to be reinstalled from the market. My google checkout and login ID are the same but Google charged me again for the apps and they showed up on my CC. Tried to resolve through google but gave up in frustration trying to find some way to dispute or rectify the situation. I disputed the charge through my CC but I have a feeling that is going to cause more trouble. Surely there is some way this is SUPPOSED to work and a planned way to rectify easily when it does not.
View 2 Replies
View Related
Apr 20, 2012
Some apps seem to install to internal memory by default, and some to sd card if one is present.
Even more annoyingly however, many of the apps that default to SD card if you move them to internal memory MOVE BACK TO THE SD CARD when you update them.
Is there any way to prevent apps from automatically installing to the SD card? Or at the very least, installing to SD card is fine... but to prevent them from moving BACK to the sd card when you update them?
View 2 Replies
View Related
May 2, 2012
I am planning to factory restore my phone. I have purchased lots of apps from Google play store. I do not want all the apps to be downloaded. How can I prevent all apps from getting downloaded to my phone? There is a firmware upgrade waiting to be installed right now. is it possible to delete the firmware? I do not want to put that on my phone....
View 2 Replies
View Related
Feb 15, 2013
I am use CSipSimple for my VoIP calling and unfortunately, every time I do a Memory Clear (under the RAM tab), it kills nearly all of my programs including CSipSimple. I know that 2 apps that this action definitely doesn't close is my AVAST! mobile security and my Ultimate Rotation Control. I'd like to be able to make CSipSimple be immune to such "clears" as those two apps but I do not know how to go about it.
At the moment, I always have to reopen it after I clear and sometimes it takes a bit for it to reconnect.
View 1 Replies
View Related
Dec 4, 2009
I just switched to the Moment and I'm really digging it so far, except for the battery. I was wondering if anyone knows of an app out there or some settings that can prevent apps from loading automatically. Often, I find that apps like Sprint Nav, Sprint TV, Moxier Mail, etc. loaded automatically. I'm getting tired of killing apps all day long to save memory and battery. It seems like my Moment doesn't want to run with more than 30mb free cause it just keeps loading apps until it gets to around 26-30mb.
View 10 Replies
View Related
Dec 6, 2009
As I continue to downlaod and try new apps, I notice that some of the permissions that some of them have are/is: "Prevent phone from sleeping". I didn't think much about it, but after conditioning my phone...for a few days I was getting around 11% awake time, now after a few of these apps after a recharge this AM I am showing 26%...before the charge my awake time was very high again. I always use Adavanced Task Killer after messing with the phone, 9/10 trials.
View 3 Replies
View Related
Aug 11, 2010
There are some apps which I don't want to upgrade. Shazaam comes to mind since it is now a paid service.
Others I don't want to upgrade because the current app works for me and the "upgrade" introduces problems.
Is it possible to turn off the upgrade notification for some but not all apps? I don't want to accidentally include an app when I am upgrading others.
View 6 Replies
View Related
Aug 14, 2013
Today I was trying to download and update some apps via wifi but later I discovered that it was on mobile data and I received message from Operator/Carrier that I have crossed my data pack limit and using it further will be chargeable. Is there any way to stop or prevent downloading apps when phone is using Data Pack?
View 2 Replies
View Related
Dec 28, 2013
Certain apps disable auto-sleep while they're open.Is there any way to force my device (Nexus 7) to sleep in these apps after a certain time.
Example. I have a Nexus 7 in my dash and leave navigation running. When I turn my ignition off the charger turns off however the tablet doesn't because I left navigation on.
View 1 Replies
View Related
Sep 24, 2010
There's a lot of posting going on about removing bloatware, but, other than un-cluttering the apps drawer, what are the benefits over just leaving them in place and not invoking them?
View 8 Replies
View Related
Apr 7, 2009
My use case is to launch one of settings app screen when I receive a certain event in idle state. For which, I added my new intent to PhoneAppBroadcastReceiver() in PhoneApp.java (looks like this receiver handles the misc intents) But when i call startActivity(), The phone seems to go into a panic ex. startActivity(new Intent(this, NetworkSetting.class)); My questions are is this the right approach to go about ? If so 1. How can I launch the activity inside of broadcastReceiver? secondly 2. How do i verify if the activity i want to start is already started?Can the NEW_TASK_LAUNCH be used to verify this ,
View 2 Replies
View Related
Nov 23, 2009
I have splitted my Android project in 2 packages, lets say: test.current and test.another. From an activity in test.current I want to start an activity in the package test.another
View 6 Replies
View Related
Jul 15, 2010
Why should I use startActivity() in a Service? If I need an Activity a have to call an activity and if I need a "delayed activity" I have to use the notification. So, why should I use startActivity()?
View 1 Replies
View Related
Jul 22, 2010
I'm new in Android development and I've a problem when I create my new activity.I want to use my activity before start it. For example, But, my "menu" and "MyActivity.class" aren't the same instance.
View 2 Replies
View Related
Jun 29, 2009
According to the doc, if the intent in startActivity(intent) is not found, there will be an exception raised. Therefore I use a try/catch block. However, even if I use a random string as the intent, the promised exception does not occur.Instead I see a dialog that says: "No application can perform this function". I also get the same dialog if the intent is valid (picked up by an app) but apparently doesn't want to act when the extras are not what the app expects (e.g. my earlier question about Intent.ACTION_SEND and mime types). I am using the 1.5_r2 SDK on an AVD running 1.5, with the app running at version 1.1 (sdk=2). Is this a doc error, a bug or am I misunderstanding something? Can I simply delete the try/catch block?
View 3 Replies
View Related
May 15, 2009
I have a Activity and I have a class which extends this Activity. In this subclass I call:
startActivity(new Intent(this, CameraView.class))
Which should start the "CameraView" Activity. However, I always get this error:
CODE:...........
If it makes any difference the subclass creates a ListView and when a row of the ListView is clicked it calls startActivity();
View 5 Replies
View Related
Dec 7, 2009
I have a TabActivity subclass that attempts to start a new activity via a menu item selection in onOptionsItemSelected.I am receiving the following exception which eludes me at the moment.I'm not sure why it thinks I am *not* in an activity!
View 2 Replies
View Related
Apr 7, 2009
I'd like to launch one of settings app screen when I received a certain event in idle state. For that, I added my new intent to PhoneAppBroadcastReceiver() in PhoneApp.java (because it seems this receiver handles the misc intents) But if I called startActivity(), seems phone goes to panic. ex. startActivity(new Intent(this, NetworkSetting.class));
1. How can I launch the activity inside of bradcastreceiver?
2. If the activity which I want to start is already started, how can I check it? I read can use NEW_TASK_LAUNCH but don't know how to use it. If you have a sample code, could you post it?
View 3 Replies
View Related
Mar 3, 2009
what is the scenario that makes me to pick between startActivity and startSubActivity
View 2 Replies
View Related
Apr 20, 2009
What's the correct way to pass a bundle to the activity that is being launched from the current one? Shared properties?
View 2 Replies
View Related
Sep 28, 2010
Is there any event triggered on an activity when I call startActivity("activity_id", myIntent);
If the Activity exists already. I pass a parameter to the activity via i.putExtra("someID", someSerializableObject ); and would like to call a method to refresh a WebView. Right now, the call on startActivity brings the activity in the foreground but the webview does not display what i want.
View 1 Replies
View Related