ArchiveNovember 2017

Rest API Call for GET and POST

R

@RestResource(urlMapping=’/Account/*’) global with sharing class MyRestResource { @HttpGet global static Account doGet() { RestRequest req = RestContext.request; RestResponse res = RestContext.response; String accountId = req.requestURI.substring(req.requestURI.lastIndexOf(‘/’)+1); Account result = [SELECT Id, Name, Phone, Website FROM Account WHERE Id = :accountId];...

What are Salesforce ID’s composed of?

W

The Id Field Type is a base-62 encoded string. Each character can be one of 62 possible values: a lowercase letter (a-z) – 26 values an uppercase letter (A-Z) – 26 values a numeric digit (0-9) – 10 values As there is a combination of lower and upper case letters the casing of the 15 character Id has significance. E.g. 50130000000014 c is a different ID from 50130000000014C...

What is REST API in PHP?

W

Before explaining what is ‘REST API‘ we should know what is ‘REST’ and ‘API’. REST stands for ‘Representational State Transfer’. REST is web standards-based architecture and uses HTTP Protocol for exchanging data between applications or systems. It is a simple way to interact with independent systems. API stands for ‘Application Programming...

Uploading image to Google Drive from Android

U

Below code will help to upload image directly to your google drive private void saveFileToDrive() { final Bitmap image = mBitmapToSave; Drive.DriveApi.newDriveContents(getGoogleApiClient()) .setResultCallback(new ResultCallback<DriveApi.DriveContentsResult>() { @Override public void onResult(DriveApi.DriveContentsResult result) { if (!result.getStatus().isSuccess()) { Log.i("ERROR", "Failed...

Maintain cookie session in Android(Retrofit)

M

A session is a sequence of requests made by a single end-user during a visit to a particular site. A session or query session may be all queries made by a user in a particular time period or it may also be a series of queries or navigation with a consistent underlying user need. In Android, if we use the retrofit for web services call it internally uses OkHttp and OkHttp does not keep the track...

Get CrashLogs with Fabric Crashlytics

G

Crashlytics provides deep and actionable insights, even the exact line of code your app crashed on. While Crashlytics gives you powerful crash reporting, with one additional click you can enable real-time analytics that help you understand what’s happening in your app. Installation: 1. Add kit to your Podfile. use_frameworks! pod ‘Fabric’ pod ‘Crashlytics’ Then run...

Reduce friction with the new Location APIs

R

The new APIs do not require your app to manually manage a connection to Google Play services through a GoogleApiClient. This reduces boilerplate and common pitfalls in your app.   A better developer experience The new LocationServices APIs are much simpler and will make your code less error prone. The connection logic is handled automatically, and you only need to attach a single completion...

Drawable Animation

D

Drawable animation lets you load a series of Drawable resources one after another to create an animation. This is a traditional animation in the sense that it is created with a sequence of different images, played in order, like a roll of film. The AnimationDrawable class is the basis for Drawable animations. While you can define the frames of an animation in your code, using the...

PHP for the Internet of Things

P

Analysts claim the connected devices to reach the mark of 6.5 billion by the starting of 2017. This makes PHP and IOT go hand in hand. Thanks to icicle, one can write asynchronous code using synchronous coding techniques in PHP. It means that now the PHP code is able to run several tasks by using the same script. Methods of asynchronous programming provide better data exchange between connected...

Category