Skip to main content

Posts

Store Image to Google Cloud Store using Google App engine java

Here is sample code for uploading image files to cloud storage bucket in google cloud platform Step 1 Create a google cloud project in cloud (https://console.cloud.google.com/)  enable cloud storage Step 2: Create a new web application project I am using Eclipse with Java for App engine Project Step 3: create a POST web service method the below code for upload image to the existing bucket in google cloud and the uploaded image url will be returned Code   @Path("/addres")  @POST       @Consumes(MediaType.MULTIPART_FORM_DATA)    public String addRestaurant( @FormDataParam("imgname")  String imagename,            @FormDataParam("file") InputStream uploadedInputStream,         @FormDataParam("file") FormDataContentDisposition restImages     ) throws IOException  {   try { // Create your service object Storage storage = St...
Recent posts

Google Map v2 signed map isssue fixed

Hi Step 1: Develop Map Application  using android studio Step 2: For Map viewing we need to have google api key .in order to get api key we need to register application in google api console  https://console.developers.google.com/apis/ Step 3; For getting SHA1 Key please follow the steps            1) Go the java installed folder location , open cmd                 Eg: C:\Program Files\Java\jdk1.7.0_04\bin            2)  Type                   Windows keytool -list -v -keystore "CHANGE WITH OUR KEYSTORE LOC" -alias ALIASNAME -storepass PASSWORD -keypass PASSWORD                   Mac & Linux  keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android Ref:  http://www.truiton.com/2015/04/obtaining-sha1...

Multiple apk based on Flavours in Android Studio

Step 1. Create Android Studio Project Step 2. Go to the build.gradle file in the app module then add Flavours in that file productFlavors { demo { applicationIdSuffix ".demo" resValue "string" , "app_name" , "Demo App" } full { applicationIdSuffix ".full" resValue "string" , "app_name" , "Full App" } } after changes sync gradle ,their will be option Build Variants their we can switch demo / full application build Full Source code of build.gradle apply plugin : 'com.android.application' android { compileSdkVersion 25 buildToolsVersion "25.0.2" defaultConfig { // applicationId "com.example.nithin.flavoursample" // minSdkVersion 14 // targetSdkVersion 25 // versionCode 1 // versionName "1.0" // testInstrumentationRun...

Custom Spinner

CustomSpinner .java import android . content . Context ; import android . util . AttributeSet ; import android . widget . Spinner ; public class CustomSpinner extends Spinner { private static final String TAG = "CustomSpinner" ; private OnSpinnerEventsListener mListener ; private boolean mOpenInitiated = false ; public CustomSpinner ( Context context , AttributeSet attrs , int defStyleAttr , int mode ) { super ( context , attrs , defStyleAttr , mode ); } public CustomSpinner ( Context context , AttributeSet attrs , int defStyleAttr ) { super ( context , attrs , defStyleAttr ); } public CustomSpinner ( Context context , AttributeSet attrs ) { super ( context , attrs ); } public CustomSpinner ( Context context , int mode ) { super ( context , mode ); } public CustomSpinner ( Context context ) { super ( conte...