본문 바로가기

전체 글288

oAuth의 인증 플로우 oAuth 인증 플로우유저가 google 로그인페이지에 접속한다.caly서버에서 원하는 권한 scope가 설정되어있으며 해당 권한을 요청하는 구글 uri를 반환해준다.유저는 해당 반환되어진 구글 인증 페이지에서 해당 권한울 확인하고 동의하에 허락을 클릭하게 된다.유저의 클릭 순간 구글서버에서 caly 콜백 메소드로 요청이 날라온다.(유저 credentials.)해당 credentials로 유저를 caly서버에 가입시키고, 해당 userToken을 통해 허락된 서비스의 정보를 접근할 수 있게 된다. 2017. 9. 2.
Invalid_grant Invalid_grant error has two common causes.Your server’s clock is not in sync with NTP. (Solution: check the server time if its incorrect fix it. )The refresh token limit has been exceeded. (Solution: Nothing you can do they cant have more refresh tokens in use) Applications can request multiple refresh tokens. For example, this is useful in situations where a user wants to install an application.. 2017. 9. 2.
how to use file in android assets link : https://stackoverflow.com/questions/30888783/key-p12-open-failed-enoent-no-such-file-or-directory Using AssetManager AssetManager am = getAssets(); InputStream inputStream = am.open("xxxxxxxxxxKey.p12"); File file = createFileFromInputStream(inputStream);As a raw resource , put the file in raw folder inside res directory InputStream ins = getResources().openRawResource(R.raw.keyfile); Fil.. 2017. 9. 2.
everything for facebook login in android https://www.codeproject.com/Articles/1113631/Adding-Facebook-Login-to-Android-App http://yucaroll.tistory.com/m/2 2017. 8. 20.
when using a permission in android ActivityCompat.requestPermissions(this,new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION}, 1); int permissionCheck = ContextCompat.checkSelfPermission(this,android.Manifest.permission.ACCESS_FINE_LOCATION); System.out.println("[DEBUG]ActivityWorkMain permissionCheck="+permissionCheck); private void fn_permission() { if ((ContextCompat.checkSelfPermission(getApplicationContext(), andr.. 2017. 8. 12.
to move location at a center of camera activeoldestvotesup vote63down voteacceptedmake sure you have these permissions: Then make some activity and register a LocationListenerpackage com.example.location; import android.content.Context; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.view.View; import com.actionbarsherlock.ap.. 2017. 8. 7.
how to use moving on current location The above answer is not according to what Google Doc Referred for Location Tracking in Google api v2.I just followed the official tutorial and ended up with this class that is fetching the current location and centring the map on it as soon as i get that.you can extend this class to have LocationReciever to have periodic Location Update. I just executed this code on api level 7http://developer.a.. 2017. 8. 6.
service template in android public class MainActivity extends Activity { private CustomService mService = null; private boolean mIsBound; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); startService(new Intent(this.getBaseContext(), CustomService.class)); doBindService(); } private ServiceConnection mConnection = new ServiceConnection() { @Override public void onServiceCon.. 2017. 7. 27.
using parsing round math written by http://2ssoosike.tistory.com/149 ##. 소수점 7자리에서 반올림으로 표현하고 소수점 이상은 3자리마다 콤마표시 String price ="12323445.9090900909"; String result = String.format("%,.7f", Double.parseDouble(price)); System.out.println("output: "+result);결과 - output: 12,323,445.909##. java round func 이용한 반올림? (현재 숫자와 가장 근사치인 정수) String result1 = String.format("%,d", Math.round(Double.parseDouble(price))); System.out.pri.. 2017. 7. 16.