Skip to main content

Posts

Showing posts from 2018

Saved Perf in Android

Just add this class in your package  package com.plzf1.rollearn ; import android.app.Application ; import android.content.SharedPreferences ; public class MyApplication extends Application { public static final String MENULIST = "menulist" ; public static final String VEGLIST = "veglist" ; public static final String CARTLIST = "cartlist" ; public static final String FRUITLIST = "fruitlist" ; @Override public void onCreate () { super .onCreate() ; } public void saveIntoPrefs (String key , String value) { SharedPreferences prefs = getSharedPreferences(Fconstants.PREF_NAME , MODE_PRIVATE ) ; SharedPreferences.Editor edit = prefs.edit() ; edit.putString(key , value) ; edit.commit() ; } public void saveIntoPrefs (String key , int value) { SharedPreferences prefs = getSharedPreferences(Fconstants.PREF_NAME , MODE_PRIVATE ) ; SharedPreferences.Edit

Room Data base config insert update delete

for use room data base in android you need to setup faw things first you have to add two deandancy in your gradel file  implementation "android.arch.persistence.room:runtime:1.0.0-beta2" annotationProcessor "android.arch.persistence.room:compiler:1.0.0-beta2" then make a entity class and dao class in your file structure  Data base class   package com.plzf1.rollearn.database; import android.arch.persistence.room.Database; import android.arch.persistence.room.RoomDatabase; @Database(entities = User.class , version = 1) public abstract class MyDataBase extends RoomDatabase {     public abstract UserDao userDao(); } Entity Class android.arch.persistence.room.ColumnInfo; import android.arch.persistence.room.Entity; import android.arch.persistence.room.PrimaryKey; @Entity(tableName = "user") public class User {     @PrimaryKey(autoGenerate = true)     private int userid;     @C

Configuration 'compile' is obsolete and has been replaced with 'implementation'. It will be removed at the end of 2018

just add it in your main gradel file  and add this in your project gradel dependencies { classpath 'com.android.tools.build:gradle:3.1.0' classpath 'com.google.gms:google-services:3.2.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } repositories { jcenter() maven { url "https://jitpack.io" } }

How to add DNS in google cloud

how to add dns in google cloud  1 click on Cloud DNS under networking  create name of dns  DNS name - your website name 2 click on add record set in record resourse type set as a  3 pase your cloud server ip in IPv4 text Area again click on add record set  1. in DNS name set "www" 2 in resourse record type select cname 3. in canonical name type your domain name
                   Download link to android SDK WITH Eclipse below are the link of android sdk with eclips Links to bundles: linux 64 bit vm: http://dl.google.com/android/adt/adt-bundle-linux-x86_64-20140702.zip linux 32 bit vm:  http://dl.google.com/android/adt/adt-bundle-linux-x86-20140702.zip mac:  http://dl.google.com/android/adt/adt-bundle-mac-x86_64-20140702.zip win32:  http://dl.google.com/android/adt/adt-bundle-windows-x86-20140702.zip win64:  http://dl.google.com/android/adt/adt-bundle-windows-x86_64-20140702.zip Source:  https://code.google.com/p/android/issues/detail?id=72584 use it thanks regards
                             Top Troubleshooting in Android   If  you are android developer and you don't how to troubleshot your code so i am sharing with you some tips which will help you   ctrl + b for back trace your code it will redirect you to where you use of your code  ctrl+alt+ ← come back to privies use of code and if its not working then use alt + ← ctrl+ click it will redirect you to use code
how to get git full project check out In our particular case, we want to overwrite these files. So what do we do? We use the following: ? 1 2 git fetch --all git reset --hard origin /master This grabs the latest repository files without merging and resets the master branch and overwrites the modified ones.

How to setup wifi ADB debugger for android studio

How to setup wifi ADB debugger for android studio  Firstly set your adb path Which you can find here Step 1:  Goto your  Android sdk folder -> platform tools  and copy the whole path For example:  C:\Program Files (x86)\Android\android-sdk\platform-tools Step 2:  Goto command prompt or Android studio terminal cd C:\Program Files (x86)\Android\android-sdk\platform-tools and presss enter Step 3:  Connect your device & system with same wifi. Step 4:  Type  adb tcpip 5555  and press  Enter . Step 5:  Type  adb connect x.x.x.x:5555 , replacing the  x.x.x.x  with your phone IP address. find out phone IP address Settings -> About phone -> Status  (some phones may be vary) Note: Incase if you connect more than one devices disconnect other phones except which one you need to connect

How To Boost Android Studio Speed

                                        How To Boost Android Studio Speed here is the way using this you can boost up your runtime android studio speed check this first  Android Studio is infact pretty heavy. It's constantly doing work all of the time. I believe Eclipse is slightly less resource-hogging however, I don't think it would be a massive difference in that it's probably not worth it.What I would recommend is doing an  Alt+Ctrl+Del  whilst running Android Studio and taking a look at the CPU/Memory. If one is near the limit then, that will be the problem  way 1 :  Enable Offline Work: Click File -> Settings. Search for "gradle" and click in Offline work box. Go to Compiler (in same settings dialog just below Gradle) and add --offline to Command-line Options text box. Improve Gradle Performance gradle can be optimized too. The easy way is to modify the settings in global gradle.properties(create it if not exists in the following folde