4 Rozet
5 Sertifika
2 Soru Sordu
2 Cevap Verdi
0 Blog Yazısı
0 Etiket Takibi

Hakkında

-Studying Computer Engineering at Ege Uni. -Working part-time at ARGEFAR -Former intern at Oracle Turkey -amateur tennis player -amateur snowboarder -amateur wakeboarder -gamer

-Studying Computer Engineering at Ege Uni. -Working part-time at ARGEFAR -Former intern at Oracle Turkey -amateur tennis player -amateur snowboarder -amateur wakeboarder -gamer

İş Tecrubesi

Kullanıcıya ait İş tecrübesi bilgisi bulunmamaktadır.

Eğitim Geçmişi

Ege Üniversitesi
| Aralık 2020 - Aralık 2020

Sertifikalar & Başarılar

GY Sertifikaları (5)
Android 401 Sertifikası
Veriliş Tarihi: Şubat 2014
101 Sertifikası
Veriliş Tarihi: Şubat 2014
Android 301 Sertifikası
Veriliş Tarihi: Şubat 2014
Android 201 Sertifikası
Veriliş Tarihi: Şubat 2014
Android 101 Sertifikası
Veriliş Tarihi: Şubat 2014
Diğer Sertifikaları (0)
Kullanıcıya ait sertifika bulunmamaktadır.
Test Sonuçları (0)

Kullanıcıya ait test sonucu bulunmamaktadır.

Dil Becerileri

Son Forum Aktiviteleri

4
Tümünü Gör

ApiResponse null dönüyor

Usergrid ile kullanıcı singup&login işlemleri gerçekleştirmeye çalışıyorum.

Signup ile oluşturduğum account, servis içinde /users ta görebiliyorum fakat login olmaya çalışırken

response = client.authorizeAppUser(kullaniciAdi, sifre);  bu satırda null dönüyor ve login olamıyorum. Sizin örnek kodlarınızdan yararlandım ama eksik ya da hatalı biryer var sanırım

  

ApiResponse null dönüyor

Usergrid ile kullanıcı singup&login işlemleri gerçekleştirmeye çalışıyorum.

Signup ile oluşturduğum account, servis içinde /users ta görebiliyorum fakat login olmaya çalışırken

response = client.authorizeAppUser(kullaniciAdi, sifre);  bu satırda null dönüyor ve login olamıyorum. Sizin örnek kodlarınızdan yararlandım ama eksik ya da hatalı biryer var sanırım

10 yıl 2 ay önce yanıtladın

ApiResponse null dönüyor

tamam Erdem Bey en kısa zamanda dönüş yapacağım.

ApiResponse null dönüyor

17 Şubat 2014 tarihinde cevaplandı

Uygulamamda kullandığım kod bu şekilde :

[code]

public class UserGridController {
    // API url:
    // This is the url of the server where you have usergrid running.
    // You can see all usergrid activity from the usergrid
    // console: http://usergrid.github.com/console/?api_url=insert_your_api_url
    private String USERGRID_API_URL = "https://api.turkcell.com.tr/usergrid";

    // Application name:
    // This is the name you selected when you set up the usergrid application
    // It is reassigned when a new server url is entered while running the app.
    // It is grabbed as the
    // last segment of the API URL that the user enters.
    private String ORGNAME = "ffurkan.tanriverdi";
    private String APPNAME = "KOydummu";
    private String USERGRID_APP = ORGNAME + "/" + APPNAME;

    private ApigeeClient apigeeClient;
    private DataClient client;
    
    
    // This method initializes Apigee client for communication with an api url.
    // Only one client is created and used by all the applications views to
    // communicate with usergrid.
    public void initialize(Context context) {
        this.apigeeClient = new ApigeeClient(ORGNAME,APPNAME,USERGRID_API_URL,context);
        this.client = this.apigeeClient.getDataClient();
    }
    
    public ApigeeClient getApigeeClient() {
        return apigeeClient;
    }
    public void setApigeeClient(ApigeeClient apigeeClient) {
        this.apigeeClient = apigeeClient;
    }

    /*public UserGridController(){
        client = new DataClient(USERGRID_APP).withApiUrl(USERGRID_API_URL);
    }*/
    
    public ApiResponse login(String kullaniciAdi, String sifre) {
        // TODO Auto-generated method stub
        ApiResponse response = null; 
         
        // attempt to authorize user 
        try { 
            response = client.authorizeAppUser(kullaniciAdi, sifre);  //  null dönüyor
        } catch (Exception e) { 
            System.out.println("exception caught: " + e.getLocalizedMessage()); 
            response = null; 
        } 
          
        if( response != null) { 
            String error = response.getError(); 
            if( error != null ) { 
                System.out.println("login error: '" + error + "'"); 
            } 
        } else { 
            System.out.println("login response is null"); 
        } 
     
        // if response shows success, store account info 
        if ((response != null) && !"invalid_grant".equals(response.getError())) { 
     
            User user = response.getUser(); 
            String email = user.getEmail(); 
            String username = user.getUsername(); 
            String imageURL = user.getPicture(); 
        } 
     
        // return login response 
        return response; 
        
    }

[/code]