Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4e40c03 authored by Joe Fernandez's avatar Joe Fernandez
Browse files

docs: remove obsolete FAQ pages

These pages have not been maintained and have not been included in the
DAC navigation structure for some time.

b/19413080

redirects change: If512bdf55b16f0faf21de7db81ab26d59489da15

Change-Id: Ibc1aa5c691edb938cbb7d4b2d885f1ea8a5f6ef4
parent fd743227
Loading
Loading
Loading
Loading
+0 −826

File deleted.

Preview size limit exceeded, changes collapsed.

docs/html/guide/faq/framework.jd

deleted100644 → 0
+0 −185
Original line number Diff line number Diff line
page.title=Android Application Framework FAQ
excludeFromSuggestions=true
@jd:body

<ul>
  <li><a href="#1">Do all the Activities and Services of an
  application run in a single process?</a></li>
  <li><a href="#2">Do all Activities run in the main thread of
  an application process?</a></li>
  <li><a href="#3">How do I pass complicated data structures
  from one Activity/Service to another?</a></li>
  <li><a href="#4">How can I check if an Activity is already
  running before starting it?</a></li>
  <li><a href="#5">If an Activity starts a remote service, is
  there any way for the Service to pass a message back to the Activity?</a></li>
  <li><a href="#6">How to avoid getting the Application not
  responding dialog?</a></li>
  <li><a href="#7">How does an application know if a package is
  added or removed?</a></li>
</ul>


<a name="1" id="1"></a>

<h2>Do all the Activities and Services of an application run in a
single process?</h2>

<p>All Activities and Services in an application run in a single process by
default. If needed, you can declare an <code>android:process</code> attribute
in your manifest file, to explicitly place a component (Activity/Service) in
another process.</p>



<a name="2" id="2"></a>

<h2>Do all Activities run in the main thread of an application
process?</h2>

<p>By default, all of the application code in a single process runs
in the main UI thread. This is the same thread
that also handles UI events. The only exception is the code that handles
IPC calls coming in from other processes. The system maintains a
separate pool of transaction threads in each process to dispatch all
incoming IPC calls. The developer should create separate threads for any
long-running code, to avoid blocking the main UI thread.</p>



<a name="3" id="3"></a>

<h2>How do I pass data between Activities/Services within a single
application?</h2>

<p>It depends on the type of data that you want to share:</p>

<h3>Primitive Data Types</h3>

<p>To share primitive data between Activities/Services in an
application, use Intent.putExtras(). For passing primitive data that
needs to persist use the 
<a href="{@docRoot}guide/topics/data/data-storage.html#preferences">
Preferences</a> storage mechanism.</p>

<h3>Non-Persistent Objects</h3>

<p>For sharing complex non-persistent user-defined objects for short
duration, the following approaches are recommended:
</p>
  <h4>Singleton class</h4>
  <p>You can take advantage of the fact that your application
components run in the same process through the use of a singleton.
This is a class that is designed to have only one instance.  It
has a static method with a name such as <code>getInstance()</code>
that returns the instance; the first time this method is called,
it creates the global instance.  Because all callers get the same
instance, they can use this as a point of interaction.  For
example activity A may retrieve the instance and call setValue(3);
later activity B may retrieve the instance and call getValue() to
retrieve the last set value.</p>

  <h4>A public static field/method</h4>
  <p>An alternate way to make data accessible across Activities/Services is to use <em>public static</em>
fields and/or methods. You can access these static fields from any other
class in your application. To share an object, the activity which creates your object sets a
static field to point to this object and any other activity that wants to use
this object just accesses this static field.</p>

  <h4>A HashMap of WeakReferences to Objects</h4>
  <p>You can also use a HashMap of WeakReferences to Objects with Long
keys. When an activity wants to pass an object to another activity, it
simply puts the object in the map and sends the key (which is a unique
Long based on a counter or time stamp) to the recipient activity via
intent extras. The recipient activity retrieves the object using this
key.</p>

<h3>Persistent Objects</h3>

<p>Even while an application appears to continue running, the system
may choose to kill its process and restart it later. If you have data
that you need to persist from one activity invocation to the next, you
need to represent that data as state that gets saved by an activity when
it is informed that it might go away.</p>

<p>For sharing complex persistent user-defined objects, the
following approaches are recommended:
<ul>
  <li>Application Preferences</li>
  <li>Files</li>
  <li>contentProviders</li>
  <li>SQLite DB</li>
</ul>
</p>

<p>If the shared data needs to be retained across points where the application
process can be killed, then place that data in persistent storage like
Application Preferences, SQLite DB, Files or ContentProviders. Please refer to
the <a href="{@docRoot}guide/topics/data/data-storage.html">Data Storage</a>
for further details on how to use these components.</p>




<a name="4" id="4"></a>

<h2>How can I check if an Activity is already running before starting
it?</h2>

<p>The general mechanism to start a new activity if its not running&mdash;
or to bring the activity stack to the front if is already running in the
background&mdash; is the to use the NEW_TASK_LAUNCH flag in the startActivity()
call.</p>



<a name="5" id="5"></a>

<h2>If an Activity starts a remote service, is there any way for the
Service to pass a message back to the Activity?</h2>

<p>See the {@link android.app.Service} documentation's for examples of
how clients can interact with a service.  You can take advantage of the
fact that your components run in the same process to greatly simplify
service interaction from the generic remote case, as shown by the "Local
Service Sample".  In some cases techniques like singletons may also make sense.


<a name="6" id="6"></a>

<h2>How to avoid getting the Application not responding dialog?</h2>

<p>Please read the <a href="{@docRoot}guide/practices/design/responsiveness.html">Designing for Responsiveness</a> 
document.</p>




<a name="7" id="7"></a>

<h2>How does an application know if a package is added or removed?
</h2>

<p>Whenever a package is added, an intent with PACKAGE_ADDED action
is broadcast by the system. Similarly when a package is removed, an
intent with PACKAGE_REMOVED action is broadcast. To receive these
intents, you should write something like this:
<pre>
       &lt;receiver android:name ="com.android.samples.app.PackageReceiver"&gt;
            &lt;intent-filter&gt;
             &lt;action android:name="android.intent.action.PACKAGE_ADDED"/&gt;
              &lt;action android:name="android.intent.action.PACKAGE_REMOVED"/&gt;            
            
              &lt;data android:scheme="package" /&gt;
            &lt;/intent-filter&gt;
        &lt;/receiver&gt;
  </pre>
  <br>
Here PackageReceiver is a BroadcastReceiver class.Its onReceive()
method is invoked, every time an application package is installed or
removed.

</p>


docs/html/guide/faq/index.jd

deleted100644 → 0
+0 −12
Original line number Diff line number Diff line
page.title=Android FAQs
excludeFromSuggestions=true
@jd:body

<dl>
    <dt><a href="framework.html">Application Framework FAQ</a></dt>
    <dd>Common questions about the Android Application Framework.</dd>
    <dt><a href="licensingandoss.html">Open Source Licensing FAQ</a></dt>
    <dd>Common topics around licensing and Android Open Source</dd>
    <dt><a href="security.html">Android Security FAQ</a></dt>
    <dd>Answers to common questions about Android security.</dd>
</dl>
+0 −18
Original line number Diff line number Diff line
page.title=Android Open Source Licensing FAQ
excludeFromSuggestions=true
@jd:body

<ul>
    <li><a href="#mirror">Where can I find the open source components of Android?</a></li>
    <li><a href="#timeline">When will we see more code released under open source licenses?</a></li>
    <li><a href="#apache2">Why are you releasing the code under the Apache License instead of GPLv2?</a></li>
</ul>

<a name="mirror" id="mirror"></a><h2>Where can I find the open source components of Android?</h2>
<p>The source code for the full Android stack is available from the <a href="http://source.android.com">Android Open Source Project </a> site. 

<p>Other mirrored GPL and LGPL'd components are available at <a href="http://code.google.com/p/android/downloads/list"><code>http://code.google.com/p/android/downloads/list</code></a>.</p>
<p>Notices for other licenses can be found within the SDK.</p>

<a name="apache2" id="apache2"></a><h2>Why are you releasing the code under the Apache License instead of GPLv2?</h2>
<p>One of the best explanations for the reasoning behind releasing code under Apache2 can be found in a <a href="http://arstechnica.com/news.ars/post/20071106-why-google-chose-the-apache-software-license-over-gplv2.html">ArsTechnica article</a> by Ryan Paul.</p>

docs/html/guide/faq/security.jd

deleted100644 → 0
+0 −157
Original line number Diff line number Diff line
page.title=Android Security FAQ
excludeFromSuggestions=true
@jd:body

<ul>
    <li><a href="#secure">Is Android Secure?</a></li>
    <li><a href="#issue">I think I found a security flaw. How do I report
    it?</a></li>
    <li><a href="#informed">How can I stay informed about Android security?</a></li>
    <li><a href="#use">How do I securely use my Android phone?</a></li>
    <li><a href="#malware">I think I found malicious software being distributed
    for Android. How can I help?</a></li>
    <li><a href="#fixes">How will Android-powered devices receive security fixes?</a>
    </li>
    <li><a href="#directfix">Can I get a fix directly from the Android Platform
    Project?</a></li>
</ul>


<a name="secure" id="secure"></a><h2>Is Android secure?</h2>

<p>The security and privacy of our users' data is of primary importance to the
Android Open Source Project. We are dedicated to building and maintaining one
of the most secure mobile platforms available while still fulfilling our goal
of opening the mobile device space to innovation and competition.</p>

<p> A comprehensive overview  of the <a
href="http://source.android.com/tech/security/index.html">Android
security model and Android security processes</a> is provided in the Android
Open Source Project Website.</p>

<p>Application developers play an important part in the security of Android.
The Android Platform provides developers with a rich <a
href="http://code.google.com/android/devel/security.html">security model</a>
that to request the capabilities, or access, needed by their
application and to define new capabilities that other applications can request.
The Android user can choose to grant or deny an application's request for
certain capabilities on the handset.</p>

<p>We have made great efforts to secure the Android platform, but it is
inevitable that security bugs will be found in any system of this complexity.
Therefore, the Android team works hard to find new bugs internally and responds
quickly and professionally to vulnerability reports from external researchers.
</p>


<a name="issue" id="issue"></a><h2>I think I found a security flaw. How do I
report it?</h2>

<p>You can reach the Android security team at security@android.com. If you like, you
can protect your message using our <a
href="http://code.google.com/android/security_at_android_dot_com.txt">PGP
key</a>.</p>

<p>We appreciate researchers practicing responsible disclosure by emailing us
with a detailed summary of the issue and keeping the issue confidential while
users are at risk. In return, we will make sure to keep the researcher informed
of our progress in issuing a fix. </p>

<p>Vulnerabilities specific to Android OEMs should be reported to the relevant
vendor. An incomplete list of Android vendor security contacts can be found below.
To be added to this list, please contact security@android.com.</p>

<ul>
  <li><a href="http://www.htc.com/www/terms/product-security/">HTC</a></li>
  <li><a href="http://www.motorolasolutions.com/US-EN/About/Security%20Vulnerability">Motorola</a></li>
  <li><a href="http://developer.samsung.com/notice/How-to-Use-the-Forum">Samsung</a> - m.security@samsung.com</li>
</ul>

<a name="informed" id="informed"></a><h2>How can I stay informed about Android security?</h2>

<p>For general discussion of Android platform security, or how to use
security features in your Android application, please subscribe to <a
href="http://groups.google.com/group/android-security-discuss">android-security-discuss</a>.
</p>


<a name="use" id="use"></a><h2>How do I securely use my Android phone?</h2>

<p>Android was designed so that you can safely use your phone without making
any changes to the device or installing any special software.  Android applications
run in an Application Sandbox that limits access to sensitive information or data
with the users permission.</p>

<p>To fully benefit from the security protections in Android, it is important that
users only download and install software from known sources.</p>

<p>As an open platform, Android allows users to visit any website and load
software from any developer onto a device. As with a home PC, the user must be
aware of who is providing the software they are downloading and must decide
whether they want to grant the application the capabilities it requests.
This decision can be informed by the user's judgment of the software
developer's trustworthiness, and where the software came from.</p>


<a name="malware" id="malware"></a><h2>I think I found malicious software being
distributed for Android. How can I help?</h2>

<p>Like any other platform, it will be possible for unethical developers
to create malicious software, known as <a
href="http://en.wikipedia.org/wiki/Malware">malware</a>, for Android. If you
think somebody is trying to spread malware, please let us know at
security@android.com. Please include as
much detail about the application as possible, with the location it is
being distributed from and why you suspect it of being malicious software.</p>

<p>The term <i>malicious software</i> is subjective, and we cannot make an
exhaustive definition.  Some examples of what the Android Security Team believes
to be malicious software is any application that:
<ul>
    <li>uses a bug or security vulnerability to gain permissions that have not
    been granted by the user</li>
    <li>shows the user unsolicited messages (especially messages urging the
    user to buy something);</li>
    <li>resists (or attempts to resist) the user's effort to uninstall it;</li>
    <li>attempts to automatically spread itself to other devices;</li>
    <li>hides its files and/or processes;</li>
    <li>discloses the user's private information to a third party, without the
    user's knowledge and consent;</li>
    <li>destroys the user's data (or the device itself) without the user's
    knowledge and consent;</li>
    <li>impersonates the user (such as by sending email or buying things from a
    web store) without the user's knowledge and consent; or</li>
    <li>otherwise degrades the user's experience with the device.</li>
</ul>
</p>


<a name="fixes" id="fixes"></a><h2>How do Android-powered devices receive security
fixes?</h2>

<p>The manufacturer of each device is responsible for distributing software
upgrades for it, including security fixes. Many devices will update themselves
automatically with software downloaded "over the air", while some devices
require the user to upgrade them manually.</p>

<p>Google provides software updates for a number of Android devices, including
the <a href="http://www.google.com/nexus">Nexus</a>
series of devices, using an "over the air" (OTA) update. These updates may include
security fixes as well as new features.</p>

<a name="directfix" id="directfix"></a><h2>Can I get a fix directly from the
Android Platform Project?</h2>

<p>Android is a mobile platform that is released as open source and
available for free use by anybody. This means that there are many
Android-based products available to consumers, and most of them are created
without the knowledge or participation of the Android Open Source Project. Like
the maintainers of other open source projects, we cannot build and release
patches for the entire ecosystem of products using Android. Instead, we will
work diligently to find and fix flaws as quickly as possible and to distribute
those fixes to the manufacturers of the products through the open source project.</p>

<p>If you are making an Android-powered device and would like to know how you can
properly support your customers by keeping abreast of software updates, please
contact us at <a
href="mailto:info@openhandsetalliance.com">info@openhandsetalliance.com</a>.</p>
Loading