sdk

Saving photos and videos using Android FileProvider to the gallery

杀马特。学长 韩版系。学妹 提交于 2021-02-19 06:54:06
问题 My application (using SDK less than 24) can take photos and video using the camera. The photos and videos can be viewed in the gallery outside the app. SDK 24 and above requires FileProvider to create the uri for saving the photo or video to the gallery. Prior to SDK 24 I would use a uri and an intent to take a photo: private void openCameraForResult(int requestCode){ Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); picturesDirectoryPhotoFileName = nextFileName(); File photoFile =

Android Facebook 4.0 Logout Programmatically

穿精又带淫゛_ 提交于 2021-02-19 03:08:58
问题 In my app, I allow users to login to and logout from Facebook programmatically. For login, I call: ArrayList<String> permissions = new ArrayList(); permissions.add("manage_pages"); permissions.add("publish_actions"); LoginManager.getInstance().logInWithPublishPermissions(App.activity, permissions); And for logout, I call: FacebookSdk.sdkInitialize(getApplicationContext()); LoginManager.getInstance().logOut(); When I call the logInWithPublishPermissions() method above, the official Facebook

Android Facebook 4.0 Logout Programmatically

旧巷老猫 提交于 2021-02-19 03:08:39
问题 In my app, I allow users to login to and logout from Facebook programmatically. For login, I call: ArrayList<String> permissions = new ArrayList(); permissions.add("manage_pages"); permissions.add("publish_actions"); LoginManager.getInstance().logInWithPublishPermissions(App.activity, permissions); And for logout, I call: FacebookSdk.sdkInitialize(getApplicationContext()); LoginManager.getInstance().logOut(); When I call the logInWithPublishPermissions() method above, the official Facebook

Android Facebook 4.0 Logout Programmatically

家住魔仙堡 提交于 2021-02-19 03:08:04
问题 In my app, I allow users to login to and logout from Facebook programmatically. For login, I call: ArrayList<String> permissions = new ArrayList(); permissions.add("manage_pages"); permissions.add("publish_actions"); LoginManager.getInstance().logInWithPublishPermissions(App.activity, permissions); And for logout, I call: FacebookSdk.sdkInitialize(getApplicationContext()); LoginManager.getInstance().logOut(); When I call the logInWithPublishPermissions() method above, the official Facebook

AWS DotNet SDK Error: Unable to get IAM security credentials from EC2 Instance Metadata Service

被刻印的时光 ゝ 提交于 2021-02-18 23:28:10
问题 I use an example from here in order to retreive a secret from AWS SecretsManager in c# code. I have set credentials locally via AWS CLI, and I am able to retreive secret list using AWS CLI command "aws secretsmanager list-secrets". But c# console app fails with an error: > Unhandled exception. System.AggregateException: One or more errors occurred. (Unable to get IAM security credentials from EC2 Instance Metadata Service.) ---> Amazon.Runtime.AmazonServiceException: Unable to get IAM

Win API for changing input language programmatically

旧时模样 提交于 2021-02-18 11:31:20
问题 I want to change the input language in WinXP to Spanish, programmatically. Is there an API to support that? Thanks 回答1: LoadKeyboardLayout ActivateKeyboardLayout GetKeyboardLayout etc. 回答2: i managed to do it with keyboard events & shortcut assignment. go to "text services and input language" (that's how it's called windows 7 control panel) assign keys for the uni-directional language. e.g. "To English", and "To Hebrew". I've chosen Alt-Shift-7 and Alt-Shift-8, because they're rarely used

Android SDK

倾然丶 夕夏残阳落幕 提交于 2021-02-13 19:01:45
一、Android SDK植入流程 1. 导入广告平台的SDK 请参照以下步骤导入AdsMOGO SDK及您想要使用的各广告平台SDK。 1.1 在项目的根目录新建libs文件夹。 1.2 右键单击新建的libs文件夹,在弹出窗口中,选择Import-> General-> File System,完成操作后,点击“next”按钮,进入下一步。如图所示: 1.3 找到AdsMOGO_Android_SDK_1.2.6/libs文件夹路径,右侧选中芒果SDK(AdsMOGO_SDK_Android.jar)和您要使用的广告平台SDK,选中Create selected folders only,点击完成按钮,如图所示: 注:关于各jar包对应哪个广告平台,请查看Android SDK下载包中“Android-jar包对应平台列表.pdf”文件或是论坛经验交流中“使用问题汇总”帖的 “20、Android-jar包对应平台列表” 。 **强烈建议开发者在使用芒果Android SDK v1.2.6时,添加与该版本一同发布的单一平台SDK(Android SDK下载包中libs.zip),不要使用1.2.5及以前版本提供的单一平台SDK,以免为您带来不必要的麻烦。 1.4 选中libs文件夹中所有jar包,单击右键->Build Path->Add to Build Path, 如图所示

Facebook grap APU $accessToken = $helper->getAccessToken() with no value

蹲街弑〆低调 提交于 2021-02-11 12:22:30
问题 I'm stuck... Everything looks correct but it does not work. Tried with a debug access token from my app at facebook developer and it works great so its not an issue with the resto of the code. index.php <?php session_start(); /******Improting Facebook API Files**************/ require_once 'src/Facebook/autoload.php'; require_once 'credentials.php'; /******Facebook API Connection With My APP**************/ $fb = new Facebook\Facebook([ 'app_id' => $appid, 'app_secret' => $appsecret, 'default

Setup of IMTransform Video Processor for color space conversion

荒凉一梦 提交于 2021-02-10 12:44:16
问题 I am trying to do some basic color space conversion using Video Processor MFT. My camera natively supports NV12 and I need RGB24, to code some shader which will provide cartoon-like effect. Here is definition of class Media which is used to perform MF. class Media : public IMFSourceReaderCallback //this class inhertis from IMFSourceReaderCallback { CRITICAL_SECTION criticalSection; long referenceCount; WCHAR *wSymbolicLink; UINT32 cchSymbolicLink; IMFSourceReader* sourceReader; MFT_REGISTER

Azure service bus access using Java SDK, Connectivity Mode

寵の児 提交于 2021-02-10 05:39:15
问题 There are several examples of configuring the service bus environment to use http/https with C#, using the call: ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.Http; My question is - can and how do I do this via a java client? 回答1: The newer versions of the SDK (1.0 and later) do not support HTTP connectivity (AMQP only), and the older ones do not support AMQP (HTTP only). As a result there's no "need" for connectivity mode settings. The Java SDK is AMQP only. If http is