[android-developers] Digest for android-developers@googlegroups.com - 4 Messages in 4 Topics

Group: http://groups.google.com/group/android-developers/topics

    Dhaval Sodha Parmar <dhaval0122@gmail.com> Aug 25 10:14PM -0700  

    I want Vertical seekBar like below image *(for android 4.O+))*. its in Google
    Play Music<https://play.google.com/store/apps/details?id=com.google.android.music>
    App.
     
    [image: enter image description here]
     
    i have tried below way: *but i can't set hight & width*
     
    <SeekBar
    android:id="@+id/seekBar1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:rotation="270"
    />
     
    i want like below:
     
    [image: enter image description here]
     
    right now i have used this Stack Answer<http://stackoverflow.com/a/8893285/1168654> but
    its too hard to manage multiple vertical seekbar.
     
    i am looking for better way than this.

     

    Ricardo Cardoso <rick.duk@gmail.com> Aug 25 11:03PM -0300  

    I have the following return my webservice created in ruby on rails
     
    {"created_at":"2013-08-24T02:45:13Z","datebirth":null,"email":"email@gmail.com","firstname":"Ricardo","gender":null,"id":11,"lastname":null,"modelphone":null,"password":null,"password_confirmation":null,"picture":null,"token":"98e58617a9beb77c71de20b3545550e4","typeos":null,"updated_at":"2013-08-25T20:45:25Z"}
     
    This return I'm typing the curl in the console like this:
     
    curl -v -H 'Content-Type: application/json' -H 'Accept:
    application/json' -X POST http://localhost:3000/api/v1/sessions.json
    -d "{\"user\":{\"email\":\"email@gmail.com\",\"password\":\"secret1234\"}}"
     
    and I also have the same return on Android!
     
    I'm using AndroidAnnotations and created the code that calls the webservice
     
    @Background
     
    void login(UserWrapper userWrapper){
     
    try {
     
    //Acessa o webservice através de rest passando o objeto UserWrapper
    que tem o Objeto User
     
    JsonObject json = userRestClient.login(userWrapper);
     
    Gson gson = new Gson();
     
    userWrapper = gson.fromJson(json, UserWrapper.class);
     
    sucessLogin(userWrapper);
     
    } catch (RestClientException e) {
     
    errorLogin();
     
    }
     
    }
     
     
    But I am getting the following error
     
    08-24 18:34:19.420: E/LoginActivity_(11373):
    com.google.gson.JsonSyntaxException: java.lang.IllegalStateException:
    Expected BEGIN_OBJECT but was STRING
     
    My class is as follows restclient
     
     
    @Rest(rootUrl="http://192.168.1.100:3000",
    converters={GsonHttpMessageConverter.class})
    @Accept(MediaType.APPLICATION_JSON) public interface UserRestClient {
     
    @Post("/api/v1/registrations")
     
    UserWrapper addUser(UserWrapper user);
     
    @Post("/api/v1/sessions.json")
     
    JsonObject login(UserWrapper user);
     
    @Get("/users/{id}.json")
     
    JsonObject edit(int id);
     
    @Put("/users/{id}")
     
    void update(User user, int id);
     
    @Post("/user")
     
    void recoverPassWordUser(String email);
     
     
    I know that the return is a String from my server, but I need to get a
    JSONObject. I also know I need to use a parse, so I made the following way
    by changing my code
     
     
    String json = userRestClient.login(userWrapper);
     
    JsonParser parser = new JsonParser();
     
    JsonObject jsonObject = parser.parse(json).getAsJsonObject();
     
    Gson gson = new Gson();
     
    userWrapper = gson.fromJson(jsonObject, UserWrapper.class);
     
    sucessLogin(userWrapper);
     
     
    But I get the error the following error:
     
     
    08-25 18:31:17.945: E/LoginActivity_(13266):
    org.springframework.http.converter.HttpMessageNotReadableException:
    Could not read JSON: java.lang.IllegalStateException: Expected a
    string but was BEGIN_OBJECT at line 1 column 2; nested exception is
    com.google.gson.JsonSyntaxException: java.lang.IllegalStateException:
    Expected a string but was BEGIN_OBJECT at line 1 column 2
     
    When I change to receive a JSONObject error says that is a String, when I
    change a String to receive the error says that is a JSONObject.
     
    Help-me

     

    "Fábio cunha" <psxbrasil@gmail.com> Aug 25 07:25AM -0700  

    Hi,
    The new Google Play privacy policy will begin to remove apps from Google
    Play that use push ads.
    Because of that I'll need to change the way that I generate revenue from
    Google Play.
     
    I pretend to use two ads types in my games and I want to know if Google
    pretend to banish this type of apps, or something because they are not good
    for android users experience.
     
    The first ad type:
    The first ad type that I want to use in my apps is the ads by reward, the
    user can go to an specific screen, in this screen if the user download a
    game, the user receive some benefit for the game.
     
    The second ad type:
    The second ad is a poll ad, user is incentivized to respond a poll, when
    the poll is completed, the user receive a reward for the game.
     
    The use of these both ads in Google Play are allowed? There's any privacy
    policy that not allow this type of ad?

     

    Hand Green <cooperateonline@gmail.com> Aug 25 07:40PM +0800  

    Thank you.
     
     
    2013/8/24 TreKing <trekingapp@gmail.com>
     

     

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment