in Education by
In my Application I am not having any UI part, so I need to start a Service as soon as the Applicaton gets installed on the Device. I saw many links from which the answer was that its not possible but I guess it is surely possible. Just have a look at PlanB Application on the Android Market that does fulfil my requirement. Below is my Manifest file how I tried, but the Service was not called at all. So, let me know what is the best possible way to start a Service when the Application gets Installed. UPDATE I also tried using android.intent.action.PACKAGE_ADDED it works fine for detecting the Package for the other Applications but not for itself. <?xml version="1.0" encoding="utf-8"?> JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Fortunately, Plan B does not work on Android 3.1+, as tested on a XOOM and a Galaxy Nexus. What Plan B does is exploit a security hole that could be used by drive-by malware, which is specifically why Android prevents it from happening anymore. UPDATE To clarify: As inazaruk posted and I put into comments on other answers, all applications, upon installation, are placed in a "stopped" state. This is the same state that the application winds up in after the user force-stops the app from the Settings application. While in this "stopped" state, the application will not run for any reason, except by a manual launch of an activity. Notably, no BroadcastReceviers will be invoked, regardless of the event for which they have registered, until the user runs the app manually. This block covers the Plan B scenario of remote-install-and-run, which they were taking advantage of previously. After all, with that, anyone with a hacked Google account would be at risk of having their device infected, hands-free as it were. So, when the OP says: I need to start a Service as soon as the Applicaton gets installed on the Device the OP will be unsuccessful and will need to redesign the application to avoid this purported "need".

Related questions

0 votes
0 votes
    I have recently developed an Android application which uses the GoogleMaps API and represents the points of the ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 26, 2022 in Education by JackTerrance
0 votes
    I read this thread and I find it very useful but my question is how can I find the manifest ? I ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 11, 2022 in Education by JackTerrance
0 votes
    I have a playbook that looks like the following. It is supposed to install python onto the remote machine ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 14, 2022 in Education by JackTerrance
0 votes
    I have a fixed list of services in a Linux server. I want to check the status of these services ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 4, 2022 in Education by JackTerrance
0 votes
    I am trying to start the redis service on the Redis Server on Unbuntu 16.04 and I am facing this error: Failed ... you please help me? Select the correct answer from above options...
asked Jan 25, 2022 in Education by JackTerrance
0 votes
    Let's say I have this variable: long myMillis = 20000; This means that I want my Chronometer to ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 14, 2022 in Education by JackTerrance
0 votes
    How to define a pipeline to not run between its start and end time? (1)isPaused: false (2)isPaused: true (3)is paused: true (4)is paused: false...
asked Sep 1, 2021 in Technology by JackTerrance
0 votes
    3- To specify the start value of the first item from which an ordered list should star, the attributes used. Select the correct answer from above options...
asked Dec 14, 2021 in Education by JackTerrance
0 votes
    3. To specify the start value of the first item from which an ordered list should start, attributes used Select the correct answer from above options...
asked Dec 13, 2021 in Education by JackTerrance
0 votes
    Which function is used to start the time logging? (a) startTimeLogging() (b) start() (c) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
    ___________ determines which transactions to undo, which pages were dirty at the time of the crash, and ... Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    The rate constant for a first order reaction is 60s-1 . How much time will it take to reduce the initial ... 1/16th value ? Select the correct answer from above options...
asked Jan 4, 2022 in Education by JackTerrance
0 votes
    Which of the following attribute triggers event when media can start play, but might has to stop for buffering? A - onbeforeplay B - onplay C - oncanplay D - oncanplaythrough...
asked Dec 3, 2020 in Technology by JackTerrance
...