Problem Rho::RhoContact.find

Rho :: RhoContact.find () is not working in Rhodes 5.0.2 version, or am I doing something wrong, will someone help me?

if System::get_property('platform') == 'APPLE'

      contact = {

          "first_name" => @params['first_name'],

          "mobile_number" =>  "(" + @params['mobile_number_ddd'] + ") " + @params['mobile_number'],

          "person_note" => @params['addressDescription'] + " " + @params['addressNumber'] + " " + @params['neighborhood'] + " " + @params['cityName'] + " " + @params['cityUF']

      }

    else

      contact = {

          "first_name" => @params['first_name'],

          "mobile_number" =>  "(" + @params['mobile_number_ddd'] + ") " + @params['mobile_number']

      }

    end

 

    @contact2 = Rho::RhoContact.find(contact)

Kutir Mobility
Hi Fernando,We will try it

Hi Fernando,

We will try it locally and get back to you. In the mean time, could please paste your log?

Visnupriya R

Kutir Mobility

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Fernando Coelho...
build.yml     capabiliities: 

build.yml

     capabiliities:

               - pim

               - phone

rholog.txt

I 09/23/2014 08:41:32:149 0000008c              APP| RHO serve: /app/Resource/check_network
I 09/23/2014 08:41:32:157 0000008c              APP| Params: {"fn"=>"showModalContact(false)"}
I 09/23/2014 08:41:32:157 0000008c          Network| NetworkC hasNetwork+
I 09/23/2014 08:41:32:157 0000008c       HttpServer| GC Start.
I 09/23/2014 08:41:32:209 0000008c       HttpServer| GC End.
I 09/23/2014 08:41:33:055 0000008c       HttpServer| Process URI: '/app/Resource/createContact'
I 09/23/2014 08:41:33:055 0000008c              APP| RHO serve: /app/Resource/createContact
I 09/23/2014 08:41:33:055 0000008c              APP| Params: {"first_name"=>"ASSOCIACAO BENEFICENTE DOS MILITARES EST", "mobile_number_ddd"=>"48", "mobile_number"=>"3229-6500"}
I 09/23/2014 08:41:33:063 0000008c              APP| Can't open phonebook
I 09/23/2014 08:41:33:063 0000008c       HttpServer| GC Start.
I 09/23/2014 08:41:33:063 0000008c       HttpServer| GC End.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Kutir Mobility
Hi Fernando,FYI, Rhosimulator

Hi Fernando,

FYI, Rhosimulator won't support RhoContact. Have you tried it on a device?

Try as shown below to find particular contact

Rho::RhoContact.select('first_name' => first_name, 'mobile_number' => mobile_number )

Visnupriya R

Kutir Mobility

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Fernando Coelho...
Visnupriya R, Thanks for the

Visnupriya R,

Thanks for the help now worked!

More here is my request for the MOTOROLA update the documentation because this command in there anywhere.


Rhomobile | RhoContact API

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Jon Tara
The real iOS simulator

The real iOS simulator supports Contacts. Just not RhoSimulator. So, you can test on a device or iOS simulator.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Bruno Beirao
I try: @contacts = Rho:


I try:

@contacts = Rho::RhoContact.select('first_name' => @params['first_name'], 

    'mobile_number' =>  "(" + @params['mobile_number_ddd'] + ") " + @params['mobile_number'])


But my application crash on some devices when I try it. help me?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Kutir Mobility
Hi Bruno,Can you give some

Hi Bruno,

Can you give some more details like

1. What devices got crashed with this app?

2. Log trace when the crash happens

Visnupriya R

Kutir Mobility

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Fernando Coelho...
Bruno,Checks Log activating

Bruno,

Checks Log activating Rhoconfig.txt and put the output here for us.

On my Moto X ta functioning properly.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Bruno Beirao
Hi,The problem happens in iOS

Hi,

The problem happens in iOS, regardless of the iOS device. I did test with a list of contacts synced with hotmail, facebook, etc ... and the app closes with the crash. If I retreat to sync and delete contacts, my app works correctly.

RhoContact.select can give problem in this case?

Thanks Fernando! In android did not have this problem.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Bruno Beirao
Can anyone help me ?

Can anyone help me ?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Rob Roberts
There is a fix for this

There is a fix for this problem in the current Rhodes master. (Not released yet, though.) See here for more info: iOS: RhoContact.find can crash app · Issue #812 · rhomobile/rhodes · GitHub

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments