Page 4 of 7

Re: Android Plugin

Posted: Fri May 31, 2013 6:44 am
by Mat
The speech recognition isn't working at the moment due to the changes in the Rest API as per one of my previous posts.

P.S fiveHellions - If your making changes and you come across the bit of code that sends the rest request to OSA and could make the update it would be much appreciated. I might be on the wrong track as I haven't looked at the problem.

Re: Android Plugin

Posted: Fri May 31, 2013 7:37 am
by fiveHellions
Already done. This version the speech recognition should be working (as long as I put the correct build out there)

If the speech recognition isn't working for anybody let me know.

Re: Android Plugin

Posted: Sun Jun 09, 2013 3:55 am
by Automate

I finally got around to installing your app. Thanks for developing it.

Installation seems to have completed without any problems. What is the Object Name specified in the setup wizard used for?

Also, if your Android device is configured for multiple accounts does the registration happen on all of them or just the default account?

Re: Android Plugin

Posted: Mon Jun 10, 2013 5:44 am
by fiveHellions
The object name is the name for that particular android device. If you don't have one created already it will create the OSA object for that device for you.

That way if you have a phone and a tablet and your wife has a phone, you can send messages to one particular device instead of all of them. Same with triggering tasker tasks.

As far as multiple accounts, do you mean the multiple users that google implemented with 4.2 for tablets? (some custom phone roms implement it as well) Or do you mean one user of the phone with multiple google accounts tied to it?

To be honest the answer either way is I'm not sure. The registration is with Google Cloud Messaging, when you register a device it gives you back an unique id to be able to send messages to that device. If you mean the former, I can do some testing on my nexus 7 and see if it gives a different id if you register the device under a different user. My thought is that it will generate a different ID so you would need to have an separate object created in OSA for both user of the device. But I will test and let you know.

Re: Android Plugin

Posted: Mon Jun 10, 2013 6:49 am
by Automate
I mean one user of the phone with multiple Google accounts tied to it.

For some reason my Android device is not getting created in OSA. I see an Android Device Type but no object. I'm running OSA 0.4.2. Is this dependent upon the latest code from the OSA repository

Re: Android Plugin

Posted: Mon Jun 10, 2013 10:19 am
by fiveHellions
It uses the REST api to create the object. So make sure you are either on your local wifi network or have the port opened up to the outside.

Are there any messages in the Rest log file?

You can try to pull a logcat off of your phone, that may give more info about why it isn't working. First go into the settings in the app and click verbose logging. Then you can download a logcat reader from the google play store. Try the wizard again then go read the logcat.

I think having multiple google accounts should be fine, but I will test adding another google account to my phone and make sure.

Alternatively if you can't get it to create the object in OSA. you can create one manually (object type ANDROID DEVICE). Once you have it created then you will need to enter the GCMID in the property for the object. Go into the app settings and you will see the GCM Registration ID, if you click it it will give you the option to share it and you can email it to yourself so you can copy and paste and not have to type the whole thing.

Re: Android Plugin

Posted: Mon Jun 10, 2013 11:05 am
by Automate
Rest plugin was running but not much info in the Rest.log. Stopped and restarted the OSA service after setting DEBUG to TRUE and the object was created properly by the Android wizard. Not sure what happen the previous two times I ran it.

Re: Android Plugin

Posted: Mon Jun 10, 2013 11:16 am
by fiveHellions
Glad you got it to work.

I may look into giving more information on the screen when it fails. Instead of making people go digging in the logcat. That way if anybody else has problems it will be easier to figure out why.

Re: Android Plugin

Posted: Mon Jun 17, 2013 6:00 pm
by JerLarge
it creates the object, but that is about it. on the final stage of the wizard the "test" it says sucessful, but i checked the log and it didnt work.

I then tried to manually notify from the objects page, and got the same error in the android log.

Code: Select all

06/17/2013 09:46:13.607 PM - Found Command: NOTIFY | param1: Hello OSA | param2: default,5
06/17/2013 09:46:13.637 PM - Added AndroidDevice to list: JeremyPhone
06/17/2013 09:46:13.650 PM - NOTIFY event triggered (JeremyPhone), parameter_1=Hello OSA, parameter_2=default,5
06/17/2013 09:46:13.654 PM - address = 
06/17/2013 09:46:13.657 PM - GCM response new version = [ERROR] Device Token or API Key has not been set

06/17/2013 09:57:15.620 PM - Found Command: NOTIFY | param1: not working still? | param2: default
06/17/2013 09:57:15.793 PM - NOTIFY event triggered (JeremyPhone), parameter_1=not working still?, parameter_2=default
06/17/2013 09:57:15.798 PM - address = 
06/17/2013 09:57:15.803 PM - GCM response new version = [ERROR] Device Token or API Key has not been set
i emailed the GCM id to myself and pasted it into the owner property of JeremyPhone, but that made little difference. Also it doesnt seem to load up anything on the interface, although it says it installed correctly, and the wizard was fine.

Any Ideas?

Re: Android Plugin

Posted: Mon Jun 17, 2013 6:39 pm
by fiveHellions
Put the long id in the GCMID property instead of the owner property.

I probably should have not included the owner property since it isn't used yet.

The main interface shows the mobile Web ui. I think it is set up to show places and let you drill down from there to individual objects.

I remember when I first tried to use the mobile Web ui mine was blank because I hadn't set up any place objects.