I want to read SMS from device for this I use the following code..
using namespace bb::pim::message;
MessageService service;
MessageSearchFilter filter;
filter.addSearchCriteria(SearchFilterCriteria::Subject, "");
filter.addStatusCriteria(SearchStatusCriteria::Unread);
filter.setLimit(10);
QList<Message> localMessageResults = service.searchLocal(1, filter);
But I can't get any SMS list in result.
I believe you are missing permission in your .bar file. See link for more information.
Permissions: To use the messaging service, you must set the
access_pimdomain_messages permission to access email and PIN messages
and the access_sms_mms permission to access text messages. These
permissions are set in the bar-descriptor.xml file of your project.
Also this sample app will help.
Related
So, I am trying to get the address for Alexa units that access my skill per https://developer.amazon.com/en-US/docs/alexa/custom-skills/device-address-api.html#request-message-example-1.
I tried this, but I am getting back a 403 (forbidden). Any idea what I am doing wrong?
device = handler_input.request_envelope.context.system.device
api_access = handler_input.request_envelope.context.system.api_access_token
data = {"Host":"api.amazonalexa.com", "Accept":"application/json", "Authorization":"Bearer " + api_access}
alexa_response = requests.get(f'https://api.amazonalexa.com/v1/devices/{device}/settings/address', data)
print(alexa_response)
From the documentation that you linked:
To test the case where the customer has not provided permissions to your skill, ensure that the address permissions for your skill in the Alexa companion app are not enabled. When you open the skill ("Alexa, open skill_name"), that will cause a LaunchRequest to be sent. This request will contain the deviceId value and the apiAccessToken value, but the apiAccessToken will not specify the correct permissions. Passing this token to the Device Address API will return a 403 Forbidden response code.
I'm assuming this skill is in the development stage. You can check the permissions for dev stage skills enabled on your account from here: https://alexa.amazon.com/spa/index.html#skills/your-skills/?ref-suffix=ysa_gw
Sorry. Thanks for the response, but I failed to send a permission card. Once I sent that and had location enabled on my device, everything worked as it should have. Oops.
Working on an Ionic Framework app that allows users to send an email. Currently, the app just sends using the device's default email application. Is there any way to allow the user to choose which email app they want to use?
check this link
According to documentation this plugin takes app as a parameter. Like below;
this.email.open({
app: 'gmail',
...
});
By making following changes in your code, it will open gmail app by default-
For details, refer https://ionicframework.com/docs/native/email-composer/
// add alias
this.emailComposer.addAlias('gmail', 'com.google.android.gm');
// then use alias when sending email
this.emailComposer.open({ app: 'gmail', ... });
I am using playgameservices sdk for unity in my game. However, I am not able to get the email id of logged in user on iOS. Do I need to define any permission while initialising the playgamesserviceplatform class? Please let me know the correct procedure to get email id.
Thanks
I found this link that might be helpful. Below is the process described in the link
In order to access the player's email or access token, you need to configure a web app associated with your game in the Play Game Console. If your game does not use a custom back-end application, you can set the launch URL to be https://localhost.
Copy the client id from the web application and enter it in the setup dialog for this plugin. This will configure the correct permissions and settings needed to access the email address and access token.
To get the email:
Debug.Log("Local user's email is " +
((PlayGamesLocalUser)Social.localUser).Email);
To get the access token:
Debug.Log("AccessToken is " +
((PlayGamesLocalUser)Social.localUser).accessToken);
To get the id token:
Debug.Log("IdToken is " +
((PlayGamesLocalUser)Social.localUser).idToken);
NOTE: The email and access tokens are only available on the UI Thread. If you need to get these from the non-UI thread, you can use the helper function RunOnGameThread:
GooglePlayGames.OurUtils.PlayGamesHelperObject.RunOnGameThread(
() => { Debug.Log("Local user's email is " +
((PlayGamesLocalUser)Social.localUser).Email);
// use the email as needed
});
When i'm trying to log in to facebook with button from fbconnect module, I am getting nullpointer at this line:
String email = data.get("email").getAsString();
where data is JsonObject. So I checked this json response from facebook, and found that has many data, but email isn't included.
I suppose i have to change something in fbconnect module, like change request, to get more data from facebook, can somebody tell me where and how ?
Im talking about play framework ofc.
You need the email extended permission to access the email field for a user - ensure you have this by calling /me/permissions with your access token - it'll show you the permissions your access token has
Add the email scope tag to your fbconnect button:
#{fbconnect.button label:'Login using your facebook account.', scope:'email'/}
I know this might sound a very basic question but I am having an issue in using Facebook SDK for Blackberry. I have downloaded the latest one 0.8.25. I have imported them in my eclipse and they are present in the referenced libraries. I have a game app where I want the users to login using their facebook account. Which class contains the code for logging in? Are the jar files implementable or they are just for reference? I have read forums posts where users say that they executed Strawberry program but I can no where find any executable source code. Kindly please let me know how do I create a login page for BlackBerry using its SDK. I did go through another link of Sample Code here!
Let me know which class has login code or how do i use the SDK
At the very basic least, you need to get an instance of the Facebook object and call getCurrentUser(). So, for example:
String[] permissions = new String[] { Facebook.Permissions.ALL_PERMISSIONS };
Facebook fb = Facebook.getInstance(new ApplicationSettings(myNextUrl, myAppId, myAppSecret, permissions));
User fbUser = fb.getCurrentUser();
The code in the library will handle all of the details like getting the user to login to facebook account and accept the requested permissions and so on. You'll want to wrap that all in a try/except to catch FacebookException for error conditions (e.g. user refuses your request).