Go to Post We're not disappointed if we don't achieve excellence, so long as we did everything we could in our pursuit of it. - JVN [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
  #61   Spotlight this post!  
Unread 23-05-2014, 11:03
raystubbs's Avatar
raystubbs raystubbs is offline
Programmer, Builder, Designer
FRC #2657 (Thundercats)
Team Role: Student
 
Join Date: Mar 2014
Rookie Year: 2012
Location: Deming NM
Posts: 121
raystubbs will become famous soon enough
Re: Android Driver Station

Quote:
Originally Posted by dmaciel10123 View Post
With the newest version (from both repos) the app crashes when I try to launch it.

Here's the log from the Binary from the Source repo:
05-23 10:35:48.082 E/AndroidRuntime(4855): java.lang.RuntimeException: Unable to resume activity {com.example.driverstation/com.example.driverstation.MainActivity}: java.lang.NumberFormatException: Invalid int: "30-80"

Also, I downloaded the source and am going to look at getting the video feed working for you.
Thanks for letting me know, this should be easy to fix.
__________________
"If all else fails, read the instructions."
  #62   Spotlight this post!  
Unread 23-05-2014, 11:33
raystubbs's Avatar
raystubbs raystubbs is offline
Programmer, Builder, Designer
FRC #2657 (Thundercats)
Team Role: Student
 
Join Date: Mar 2014
Rookie Year: 2012
Location: Deming NM
Posts: 121
raystubbs will become famous soon enough
Re: Android Driver Station

Quote:
Originally Posted by dmaciel10123 View Post
With the newest version (from both repos) the app crashes when I try to launch it.

Here's the log from the Binary from the Source repo:
05-23 10:35:48.082 E/AndroidRuntime(4855): java.lang.RuntimeException: Unable to resume activity {com.example.driverstation/com.example.driverstation.MainActivity}: java.lang.NumberFormatException: Invalid int: "30-80"

Also, I downloaded the source and am going to look at getting the video feed working for you.

I don't get this error, could you try re-installing the app. Sorry, I don't know what else to do since I can't work on a problem I don't have. On second thought, what type of device do you have? If it is a problem with the UI that it could be specific to the screen-size. I will launch the app on an emulator of a smaller screen and see what I can find out.
__________________
"If all else fails, read the instructions."

Last edited by raystubbs : 23-05-2014 at 11:40.
  #63   Spotlight this post!  
Unread 23-05-2014, 11:40
raystubbs's Avatar
raystubbs raystubbs is offline
Programmer, Builder, Designer
FRC #2657 (Thundercats)
Team Role: Student
 
Join Date: Mar 2014
Rookie Year: 2012
Location: Deming NM
Posts: 121
raystubbs will become famous soon enough
Re: Android Driver Station

Quote:
Originally Posted by raystubbs View Post
I don't get this error, could you try re-installing the app. Sorry, I don't know what else to do since I can't work on a problem I don't have. On second thought, what type of device do you have, if it is a problem with the UI that it could be specific to the screen-size. I will launch the app on an emulator of a smaller screen and see what I can find out.
I tried the app on and emulator and it works fine. I'm actually baffled by this error being in both apps since in the second one I don't have any integers or any code that used integers. But in the first version I can see where this error could come from, but since I don't get the error I can't investigate.

Maybe it is a version error, try uninstalling the app, and re-downloading it maybe? If you do this I would suggest redownloading the second app (Android-FRC-Driverstation).
__________________
"If all else fails, read the instructions."

Last edited by raystubbs : 23-05-2014 at 12:00.
  #64   Spotlight this post!  
Unread 23-05-2014, 11:40
dmaciel10123 dmaciel10123 is offline
The Everything Guy
AKA: David Maciel
FRC #3525 (The Nuts and Bolts of Fury)
Team Role: Alumni
 
Join Date: Feb 2013
Rookie Year: 2013
Location: Waterbury, Connecticut
Posts: 100
dmaciel10123 is an unknown quantity at this point
Quote:
Originally Posted by raystubbs View Post
I don't get this error, could you try re-installing the app. Sorry, I don't know what else to do since I can't work on a problem I don't have. On second thought, what type of device do you have, if it is a problem with the UI that it could be specific to the screen-size. I will launch the app on an emulator of a smaller screen and see what I can find out.
I'll reinstall again and check for any errors. I have a Samsung Galaxy S3.

Edit: I think it may be because of the network I'm connected to. The IP I was assigned had 3 characters in the 3rd portion of the IP. I changed my network settings and it was able to start normal.
__________________

Last edited by dmaciel10123 : 23-05-2014 at 11:52.
  #65   Spotlight this post!  
Unread 23-05-2014, 12:24
raystubbs's Avatar
raystubbs raystubbs is offline
Programmer, Builder, Designer
FRC #2657 (Thundercats)
Team Role: Student
 
Join Date: Mar 2014
Rookie Year: 2012
Location: Deming NM
Posts: 121
raystubbs will become famous soon enough
Re: Android Driver Station

Quote:
Originally Posted by dmaciel10123 View Post
I'll reinstall again and check for any errors. I have a Samsung Galaxy S3.

Edit: I think it may be because of the network I'm connected to. The IP I was assigned had 3 characters in the 3rd portion of the IP. I changed my network settings and it was able to start normal.
O, yea, that would do it, it's strange to have characters in an ipv4 IP (I didn't anticipate it), I have only ever heard of them in ipv6 and mac addresses.
__________________
"If all else fails, read the instructions."

Last edited by raystubbs : 23-05-2014 at 13:36.
  #66   Spotlight this post!  
Unread 23-05-2014, 14:25
dmaciel10123 dmaciel10123 is offline
The Everything Guy
AKA: David Maciel
FRC #3525 (The Nuts and Bolts of Fury)
Team Role: Alumni
 
Join Date: Feb 2013
Rookie Year: 2013
Location: Waterbury, Connecticut
Posts: 100
dmaciel10123 is an unknown quantity at this point
Quote:
Originally Posted by raystubbs View Post
O, yea, that would do it, it's strange to have characters in an ipv4 IP (I didn't anticipate it), I have only ever heard of them in ipv6 and mac addresses.
Sorry not characters, integers. The IP was xx.xx.xxx.xx instead of xx.xx.xx.xx. The three integers being in the 3rd quarter of the IP messed it up.

Also, I was messing around and added some simple code that may be able to display video but I can't test it yet because I don't have a robot or IP camera. I'll test it probably tomorrow at BattleCry.
__________________
  #67   Spotlight this post!  
Unread 23-05-2014, 14:38
raystubbs's Avatar
raystubbs raystubbs is offline
Programmer, Builder, Designer
FRC #2657 (Thundercats)
Team Role: Student
 
Join Date: Mar 2014
Rookie Year: 2012
Location: Deming NM
Posts: 121
raystubbs will become famous soon enough
Re: Android Driver Station

Quote:
Originally Posted by dmaciel10123 View Post
Sorry not characters, integers. The IP was xx.xx.xxx.xx instead of xx.xx.xx.xx. The three integers being in the 3rd quarter of the IP messed it up.

Also, I was messing around and added some simple code that may be able to display video but I can't test it yet because I don't have a robot or IP camera. I'll test it probably tomorrow at BattleCry.
Could you upload the code to the repo please? I have access to a robot right now and could test the code.
__________________
"If all else fails, read the instructions."
  #68   Spotlight this post!  
Unread 23-05-2014, 15:11
dmaciel10123 dmaciel10123 is offline
The Everything Guy
AKA: David Maciel
FRC #3525 (The Nuts and Bolts of Fury)
Team Role: Alumni
 
Join Date: Feb 2013
Rookie Year: 2013
Location: Waterbury, Connecticut
Posts: 100
dmaciel10123 is an unknown quantity at this point
Quote:
Originally Posted by raystubbs View Post
Could you upload the code to the repo please? I have access to a robot right now and could test the code.
Sure. Give me a few minutes so I can get my hands on a computer. I've been using my phone all day.

Edit: wow okay whoops. I dun goofed. Just tried opening it with the code I added and it crashed immediately. I'll keep working on it.
__________________

Last edited by dmaciel10123 : 23-05-2014 at 15:33.
  #69   Spotlight this post!  
Unread 23-05-2014, 15:44
raystubbs's Avatar
raystubbs raystubbs is offline
Programmer, Builder, Designer
FRC #2657 (Thundercats)
Team Role: Student
 
Join Date: Mar 2014
Rookie Year: 2012
Location: Deming NM
Posts: 121
raystubbs will become famous soon enough
Re: Android Driver Station

Quote:
Originally Posted by dmaciel10123 View Post
Sure. Give me a few minutes so I can get my hands on a computer. I've been using my phone all day.

Edit: wow okay whoops. I dun goofed. Just tried opening it with the code I added and it crashed immediately. I'll keep working on it.
Are you using VideoView? What I've tried is:

Code:
video = (VideoView)findViewById(R.id.video);

// Set uriString to "rtsp://10.xx.yy.11/axis-media/media.3gp"
String uriString = "rtsp://" + "10." + Integer.toString((addr & 0xff0000)>>16)  //"rtsp://10.xx.yy.11/axis-media/media.3gp"
	+"."+ Integer.toString((addr & 0xff00)>>8) + ".11/" + "axis-media/media.3gp";  

video.setVideoURI(Uri.parse(uriString));
video.requestFocus();
video.start();
Nothing happens for a while, but then a dialog comes up and says that it can't play the video.
__________________
"If all else fails, read the instructions."
  #70   Spotlight this post!  
Unread 23-05-2014, 16:11
dmaciel10123 dmaciel10123 is offline
The Everything Guy
AKA: David Maciel
FRC #3525 (The Nuts and Bolts of Fury)
Team Role: Alumni
 
Join Date: Feb 2013
Rookie Year: 2013
Location: Waterbury, Connecticut
Posts: 100
dmaciel10123 is an unknown quantity at this point
Quote:
Originally Posted by raystubbs View Post
Are you using VideoView? What I've tried is:

Code:
video = (VideoView)findViewById(R.id.video);

// Set uriString to "rtsp://10.xx.yy.11/axis-media/media.3gp"
String uriString = "rtsp://" + "10." + Integer.toString((addr & 0xff0000)>>16)  //"rtsp://10.xx.yy.11/axis-media/media.3gp"
	+"."+ Integer.toString((addr & 0xff00)>>8) + ".11/" + "axis-media/media.3gp";  

video.setVideoURI(Uri.parse(uriString));
video.requestFocus();
video.start();
Nothing happens for a while, but then a dialog comes up and says that it can't play the video.
I'm actually trying to load the image that the Axis Camera saves at image.jpg and set it as the background at about 30 fps
__________________
  #71   Spotlight this post!  
Unread 23-05-2014, 16:18
raystubbs's Avatar
raystubbs raystubbs is offline
Programmer, Builder, Designer
FRC #2657 (Thundercats)
Team Role: Student
 
Join Date: Mar 2014
Rookie Year: 2012
Location: Deming NM
Posts: 121
raystubbs will become famous soon enough
Re: Android Driver Station

What is the full uri (path) of the image file? I thought of using the image before. I knew the axis had one I just didn't know where it was.
__________________
"If all else fails, read the instructions."
  #72   Spotlight this post!  
Unread 23-05-2014, 16:33
dmaciel10123 dmaciel10123 is offline
The Everything Guy
AKA: David Maciel
FRC #3525 (The Nuts and Bolts of Fury)
Team Role: Alumni
 
Join Date: Feb 2013
Rookie Year: 2013
Location: Waterbury, Connecticut
Posts: 100
dmaciel10123 is an unknown quantity at this point
Re: Android Driver Station

I'm pretty sure it's just http://10.xx.xx.11/image.jpg
I may be wrong, but I do have a code that theoretically will work. I just can't test it yet. I uploaded the code to a forked repo at https://github.com/crazyman10123/And...-Driverstation
I didn't upload a new binary, just the code.
__________________
  #73   Spotlight this post!  
Unread 23-05-2014, 16:54
raystubbs's Avatar
raystubbs raystubbs is offline
Programmer, Builder, Designer
FRC #2657 (Thundercats)
Team Role: Student
 
Join Date: Mar 2014
Rookie Year: 2012
Location: Deming NM
Posts: 121
raystubbs will become famous soon enough
Re: Android Driver Station

Quote:
Originally Posted by dmaciel10123 View Post
I'm pretty sure it's just http://10.xx.xx.11/image.jpg
I may be wrong, but I do have a code that theoretically will work. I just can't test it yet. I uploaded the code to a forked repo at https://github.com/crazyman10123/And...-Driverstation
I didn't upload a new binary, just the code.
Thanks, I'll try this when I get a chance, I no longer have access to our robot.

I do have a question though, does it work to put your code in the start() method of a thread? I have only ever put code in the run() method.
__________________
"If all else fails, read the instructions."
  #74   Spotlight this post!  
Unread 23-05-2014, 17:04
dmaciel10123 dmaciel10123 is offline
The Everything Guy
AKA: David Maciel
FRC #3525 (The Nuts and Bolts of Fury)
Team Role: Alumni
 
Join Date: Feb 2013
Rookie Year: 2013
Location: Waterbury, Connecticut
Posts: 100
dmaciel10123 is an unknown quantity at this point
I probably should change it to the run() method because the way it is right now, start() would never end. I wasn't even paying attention to that haha thanks.

Edit: I fixed the start/run methods, and uploaded the changes to the repo. I'll also be trying it tomorrow at BattleCry when I have access to our bot.
__________________

Last edited by dmaciel10123 : 23-05-2014 at 17:14.
  #75   Spotlight this post!  
Unread 23-05-2014, 19:16
Dr.Gusta's Avatar
Dr.Gusta Dr.Gusta is offline
Registered User
FRC #5107 (The Neurotoxins)
Team Role: CAD
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Upland, CA
Posts: 155
Dr.Gusta is a glorious beacon of lightDr.Gusta is a glorious beacon of lightDr.Gusta is a glorious beacon of lightDr.Gusta is a glorious beacon of lightDr.Gusta is a glorious beacon of lightDr.Gusta is a glorious beacon of light
Re: Android Driver Station

I have a Galaxy S4 and I don't have the option to set my subnet mask and it is asking me for a lot more information. Like Default Gateway, DNS, etc when I try to set up a static IP as instructed.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 18:59.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi