My meaning is that I cannot find any document/javadoc of "SMS_RECEIVED" or
"android.provider.Telephony.SMS_RECEIVED"
even on Android developer site
http://developer.android.com/reference/packages.html. Is this strange?
But now I find it in the source code below:
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String SMS_RECEIVED_ACTION =
"android.provider.Telephony.SMS_RECEIVED";
which is in file:
~/android-sdks/sources/android-16/android/provider/Telephony.java
And for the whole file Telephony.java, it is marked with @hide (as below).
That should be the reason why I cannot find SMS_RECEIVED via javadoc.
/**
* The Telephony provider contains data related to phone operation.
*
* @hide
*/
However, thank you for your help!
BR,
Tom
在 2012年9月17日星期一UTC+8上午12时01分49秒,Kristopher Micinski写道:
>
> I don't think I understand you.
>
> It sounds like you want to know: how do I know when I need permission?
> Generally the API for stuff will tell you. For example, to catch the
> SMS_RECEIVED permission you need a permission to receive texts,
> RECEIVE_SMS. If the API doesn't tell you when you need the
> permission, that's a bug in the documentation. However, in all
> honesty, not having a permission should be pretty obvious when you
> test the app, if you don't have it the app crashes, you look at the
> error log, and then you include the permission.
>
> kris
>
> On Sun, Sep 16, 2012 at 10:41 AM, tomLinux <[email protected]<javascript:>>
> wrote:
> > Thank you very much for your reply!
> > The Manifest page is helpful! With it I can find the definition of
> > CHANGE_NETWORK_STATE.
> > But still for the 1st item, even the short term "SMS_RECEIVED", I cannot
> > find official document of it.
> > That makes me confused. So how could people write program by using it?
> How
> > do they know its purpose and usage?
> >
> > BR,
> > Tom
> >
> >
> >
> >
> > On Thursday, September 13, 2012 5:19:04 AM UTC+8, Kristopher Micinski
> wrote:
> >>
> >> are you asking how these permissions can be used in Android?
> >>
> >> You can see a brief description here:
> >>
> >> http://developer.android.com/reference/android/Manifest.permission.html
> >>
> >> Unfortunately I don't think there's a clear mapping from APIs to
> >> permission usage anywhere right now, there is an old research project
> >> here:
> >>
> >> http://www.android-permissions.org/
> >>
> >> The goal of that project is to try to ascertain which permissions go
> >> with which APIs, though at this point the document is fairly old
> >> (android 2.2 I believe!) and the static analysis hasn't been redone
> >> for Android 4.
> >>
> >> If you have specific questions you can probably find out on a case by
> >> case basis. (I believe the static analysis is actually simple enough
> >> to do, we've recreated some of it in our work, though nothing
> >> substantial enough to post publicly..)
> >>
> >> kris
> >>
> >> On Tue, Sep 11, 2012 at 11:33 PM, tomLinux <[email protected]> wrote:
> >> > I don't know where I can find the definition or detailed description
> of
> >> > SMS_RECEIVED, which could be set as below:
> >> >
> >> > <action android:name="android.provider.Telephony.SMS_RECEIVED"/>
> >> >
> >> > I searched it on website
> >> > http://developer.android.com/reference/packages.html, but no result.
> >> > Thanks!
> >> >
> >> > And also this one:
> >> >
> >> > <uses -permission
> >> > android:name="android.permission.CHANGE_NETWORK_STATE"></uses>
> >> >
> >> > This kind of usage is in AndroidManifest.xml file. And what confuses
> me
> >> > is
> >> > that how do I know them? Where to find them? I can find them only
> from
> >> > other
> >> > guys' projects? No official douments at all?
> >> >
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> > Groups "Android Developers" group.
> >> > To post to this group, send email to [email protected]
> >> > To unsubscribe from this group, send email to
> >> > [email protected] <javascript:>
> >> > For more options, visit this group at
> >> > http://groups.google.com/group/android-developers?hl=en
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to
> > [email protected]<javascript:>
> > To unsubscribe from this group, send email to
> > [email protected] <javascript:>
> > For more options, visit this group at
> > http://groups.google.com/group/android-developers?hl=en
>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en