PDA

View Full Version : nDroid v1.2.x (Beta) support thread



bgowland
2011-03-11, 01:01 AM
I'd intended to post another version sooner than this but it was a bit like cleaning windows...once you start you realise another bit needs cleaning. :D

I've made quite a few changes to the way the nDroid client app behaves on 'first run' hopefully making it a lot smoother to install. Bear in mind this is Beta code and fairly limited so consider it for 'testing' purposes only rather than relying on guaranteed results.

NOTE: From now on, downloads will be available from the new nDroid wiki page...

http://www.gbpvr.com/nwiki/pmwiki.php?n=Utility.NDroid

LATEST CLIENT VERSION: v1.2.10
LAST UPDATE: 2011-03-22 03:15

LATEST SERVICE VERSION: v1.1.4098.5833
LAST UPDATE: 2011-03-22 03:15


2011-03-22 03:15Update to nDroid client - added new logo to show when no channel logo availableUpdate to nDroid client - can now trigger channel selector popup by touching either the channel logo box or the channel name area to the right of itUpdate to nDroid client - added channel numbers to the main channel name area and also to the channel selector popupUpdate to nDroid client and nDroidService - fixed problem with downloading/retaining currently scheduled recording info - still a bug here though, I'm working on itUpdate to nDroid client - after initial (first run) setup, no longer needs a wifi/mobile internet connection to start. NOTE: Attempting to set/cancel a recording still isn't handled well if wifi and mobile internet are disabled in settingsFixed my Acronis backup set after realising the project hadn't been backed up for the past 3 weeks...sorry, ignore that one, but I had to share. I almost had kittens when I discovered it. :eek:A whole bunch of other minor bug fixes / tweaks that I've forgotten along the way
2011-03-17 02:55Update to nDroid client to use internal memory for SQLite DB due to problems with Android versions pre - v2.2
2011-03-16 23:30Update to nDroid client to fix false DST reporting
2011-03-15 23:25Update to nDroid client moving the 'first run' file downloads to a splash screen activityUpdate to nDroid client to the programme 'details' popup to restrict the description text to a scrolling text view to prevent Record/Cancel buttons being pushed out of the popup windowUpdate to nDroid client and nDroidService to correctly check for .jpg, .png and .gif channel logo files. Also corrected handling at the download stage when no logos have been found and the logos.zip file isn't createdUpdate to nDroid client to fix password hash bug
2011-03-14 00:50Update to nDroid client to fix default user credentials always being sentUpdate to nDroid client to fix DST offset being ignored
2011-03-13 97:40Update to nDroidService to better handle waking from standby
2011-03-12 22:30Update to nDroid client to correctly handle time-zone differencesMinor bug fixes to nDroidService
2011-03-11 22:00Update to nDroidServiceHelper to handle programme titles with apostrophes
2011-03-11 08:00Update to ndroidService components to fix issues with x64 systems
2011-03-11 01:00Initial release of v1.2.0

bgowland
2011-03-11, 01:02 AM
Content moved to the new nDroid wiki page...

http://www.gbpvr.com/nwiki/pmwiki.php?n=Utility.NDroid

bgowland
2011-03-11, 01:03 AM
Content moved to the new nDroid wiki page...

http://www.gbpvr.com/nwiki/pmwiki.php?n=Utility.NDroid

BrettB
2011-03-11, 04:02 AM
I'm trying installing this for the first time. I unzipped the service files, ran the installservice.bat file, and edited the ndroidsettings.xml file.

When I went to the service manager, the ndroidservice service was set to Auto not Manual start. However it wasn't running. When I try to Start it, I get an error saying that it didn't respond in a timely manner. The logfile contains the following:
10/03/2011 22:56:27.531 GetSettings entered...
10/03/2011 22:56:27.531 xNode.Name: username xNode.InnerText:BrettB
10/03/2011 22:56:27.541 strHashedUsername: 0b5109ac05c69735b1f9f5000dbb5a0f
10/03/2011 22:56:27.541 xNode.Name: password xNode.InnerText:newserver
10/03/2011 22:56:27.541 strHashedPassword: 253200ceca0268d0a838f19fdce57808
10/03/2011 22:56:27.541 xNode.Name: port xNode.InnerText:8790
10/03/2011 22:56:27.541 xNode.Name: downloadbuffersize xNode.InnerText:16
10/03/2011 22:56:27.551 Object reference not set to an instance of an object.
10/03/2011 22:56:27.551 Object reference not set to an instance of an object.

My server is Windows 7 64-bit. I tried putting the service files in both the C:\Program Files (x86)\ directory and the C:\Users\Public\ directory. Both tries gave the same results.

mvallevand
2011-03-11, 04:02 AM
@bgowland, I have the same problem as with the previous version. It doesn't transfer the big listing file. Hopefully other 2.1 users will have better luck.



3/03/2011 00:07:07.205 CREDENTIALS OK!
03/03/2011 00:07:07.205 fi.Name: sevendayxml.zip fi.Length: 963750
03/03/2011 00:07:07.206 bytesRead: 131072
03/03/2011 00:07:07.601 bytesRead: 131072
03/03/2011 00:07:08.062 bytesRead: 131072
03/03/2011 00:07:08.219 CreateHttpListener - action:download threw exception: The specified network name is no longer available at System.Net.HttpResponseStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at uk.co.beetec.csharp.nDroid.nDroidServiceListener.C reateHttpListener() in C:\Documents and Settings\gbpvr\My Documents\Visual Studio 2008\Projects\nDroidService\nDroidService\nDroidSe rviceListener.cs:line 124
03/03/2011 00:07:08.227 CreateHttpListener threw exception: Cannot close stream until all bytes are written. at System.Net.HttpResponseStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at System.Net.HttpListenerResponse.Dispose(Boolean disposing)
at System.Net.HttpListenerResponse.System.IDisposable .Dispose()
at System.Net.HttpListenerResponse.Close()
at uk.co.beetec.csharp.nDroid.nDroidServiceListener.C reateHttpListener() in C:\Documents and Settings\gbpvr\My Documents\Visual Studio 2008\Projects\nDroidService\nDroidService\nDroidSe rviceListener.cs:line 138
03/03/2011 00:07:08.227 HttpListener created.


Martin

bgowland
2011-03-11, 04:26 AM
My server is Windows 7 64-bit. I tried putting the service files in both the C:\Program Files (x86)\ directory and the C:\Users\Public\ directory. Both tries gave the same results.If you zip and post all of the log files, I'll take a look.

BrettB
2011-03-11, 04:29 AM
If you zip and post all of the log files, I'll take a look.

@bgowland, what I posted is the only log file there is.

bgowland
2011-03-11, 04:38 AM
@bgowland, I have the same problem as with the previous version. It doesn't transfer the big listing file. Hopefully other 2.1 users will have better luck.Thanks Martin, could you let me have the very start of the logcat (sorry, you'll need to uninstall/reinstall again :o ).

It will start like this...


03-11 05:31:33.204: DEBUG/uk.co.beetec.android.nDroid.NDroid(16506): onCreate() entered
03-11 05:31:33.204: DEBUG/uk.co.beetec.android.nDroid.NDroid(16506): packageName: uk.co.beetec.android.nDroid
03-11 05:31:33.204: DEBUG/uk.co.beetec.android.nDroid.NDroid(16506): onCreate() - sdkVersion: 8
03-11 05:31:33.214: DEBUG/uk.co.beetec.android.nDroid.NDroid(16506): onCreate() - nDroidHelper.CanWriteExtStorage() returned TRUE
03-11 05:31:33.214: DEBUG/uk.co.beetec.android.nDroid.NDroid(16506): onCreate() - nDroidFilesDir: /mnt/sdcard/Android/data/uk.co.beetec.android.nDroid/files

I'm particularly interested in the last few lines for sdkVersion, CanWriteExtStorage() result and the nDroidFilesDir

bgowland
2011-03-11, 04:45 AM
@bgowland, what I posted is the only log file there is.There should be one more - did you uninstall the nDroidService before you moved it? If not, stop the service (if it's running) and put it back where you originally had it.

mvallevand
2011-03-11, 04:46 AM
Ok



I/ActivityManager( 1001): Start proc uk.co.beetec.android.nDroid for activity uk.co.beetec.android.nDroid/.MainActivity: pid=3844 uid=10042 gids={3003, 1015}
D/uk.co.beetec.android.nDroid.NDroid( 3844): onCreate() entered
D/uk.co.beetec.android.nDroid.NDroid( 3844): packageName: uk.co.beetec.android.nDroid
D/uk.co.beetec.android.nDroid.NDroid( 3844): onCreate() - sdkVersion: 7
D/uk.co.beetec.android.nDroid.q( 3844): uk.co.beetec.android.nDroid.NDroid@450943f8
D/uk.co.beetec.android.nDroid.NDroid( 3844): onCreate() - nDroidHelper.CanWriteExtStorage() returned TRUE
D/uk.co.beetec.android.nDroid.NDroid( 3844): onCreate() - nDroidFilesDir: /nand/Android/data/uk.co.beetec.android.nDroid/files
D/uk.co.beetec.android.nDroid.MainActivity( 3844): Entered onCreate()...
D/uk.co.beetec.android.nDroid.MainActivity( 3844): First run...


Martin

BrettB
2011-03-11, 05:26 AM
There should be one more - did you uninstall the nDroidService before you moved it? If not, stop the service (if it's running) and put it back where you originally had it.

Yes, I ran the unstall.bat before I tried moving it. And I can't stop the service because it won't start. What I posted is from the only logfile that gets created when I try to start the service, but it won't start. And the service control manager says:
Windows could not start the ndroidservice on the local computer.

Error 1053: The service did not respond to the start or control request in a timely fashion.

BrettB
2011-03-11, 05:43 AM
OK, I checked the Application Event Log and found the following:
Log Name: Application
Source: nDroid Service
Date: 3/11/2011 12:36:53 AM
Event ID: 0
Task Category: None
Level: Information
Keywords: Classic
User: N/A
Computer: Dogbert
Description:
serviceHelper.GetInstallDirs() returned false - aborting
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="nDroid Service" />
<EventID Qualifiers="0">0</EventID>
<Level>4</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2011-03-11T06:36:53.000000000Z" />
<EventRecordID>5432</EventRecordID>
<Channel>Application</Channel>
<Computer>Dogbert</Computer>
<Security />
</System>
<EventData>
<Data>serviceHelper.GetInstallDirs() returned false - aborting</Data>
</EventData>
</Event>

bgowland
2011-03-11, 05:58 AM
Ah, OK, thanks - that explains a bit more.

I was wondering if this was a permissions issue but I think I may have missed something with the x64 stuff. I'll take a look.

bgowland
2011-03-11, 07:03 AM
@BrettB: Could you try the latest upload when you have the time (see post #1). I'm hoping it fixes the x64 issue.

Nistrod
2011-03-11, 08:54 AM
I am still having the timezone issue. The Midday Report is shown as 02:00.

BrettB
2011-03-11, 07:05 PM
@BrettB: Could you try the latest upload when you have the time (see post #1). I'm hoping it fixes the x64 issue.
That version lets the service startup OK.

BrettB
2011-03-11, 07:28 PM
I got the application to install on my Motorola Atrix and startup OK.

The first thing that I noticed is that the times for programs are wrong. On channel WCCO-DT, it is showing on Sat at 01:00, "The Defenders*" set to record. But, that should actually be on Fri at 19:00. And each subsequent show is off by the same amount there on WCCO-DT on Sat. This offset sort of makes sense to me since my timezone (US-CST) is GMT-6, so it seems to be displaying those in GMT rather than the local timezone that the phone is in.

The next thing I did was try to schedule a one-time recording. When I do that, the application on the droid hangs and has to be force exited. In the server log, I see:
11/03/2011 14:21:26.003 Url: http://192.168.143.10:8790/
11/03/2011 14:21:26.003 request: System.Net.HttpListenerRequest
11/03/2011 14:21:26.003 hrhkey.Key: x-ndroid-action hrhkey.Value: record
11/03/2011 14:21:26.003 hrhkey.Key: x-ndroid-oid hrhkey.Value: 2191166
11/03/2011 14:21:26.003 hrhkey.Key: x-ndroid-channeloid hrhkey.Value: 6870
11/03/2011 14:21:26.003 hrhkey.Key: x-ndroid-starttime hrhkey.Value: 2011-03-11 20:00:00
11/03/2011 14:21:26.003 hrhkey.Key: x-ndroid-title hrhkey.Value: The People's Court *
11/03/2011 14:21:26.003 hrhkey.Key: x-ndroid-rectype hrhkey.Value: ro
11/03/2011 14:21:26.003 hrhkey.Key: x-ndroid-exdata1 hrhkey.Value: admin
11/03/2011 14:21:26.003 hrhkey.Key: x-ndroid-exdata2 hrhkey.Value: 5f4dcc3b5aa765d61d8327deb882cf99
11/03/2011 14:21:26.003 hrhkey.Key: Connection hrhkey.Value: Keep-Alive
11/03/2011 14:21:26.003 hrhkey.Key: Host hrhkey.Value: 192.168.143.10:8790
11/03/2011 14:21:26.003 User authenticated
11/03/2011 14:21:26.003 CreateHttpListener - action:record threw exception: Object reference not set to an instance of an object. at uk.co.beetec.csharp.nDroid.nDroidServiceHelper.Get RequestedRecordingOid(String oid, String channel_oid, String start_time, String title) in C:\Documents and Settings\gbpvr\My Documents\Visual Studio 2008\Projects\nDroidService\nDroidLib\nDroidServic eHelper.cs:line 548
at uk.co.beetec.csharp.nDroid.nDroidServiceListener.C reateHttpListener() in C:\Documents and Settings\gbpvr\My Documents\Visual Studio 2008\Projects\nDroidService\nDroidService\nDroidSe rviceListener.cs:line 161
11/03/2011 14:21:26.003 CreateHttpListener() listening...
I'm attaching a .zip of all the logs.

- Brett

bgowland
2011-03-11, 07:28 PM
I am still having the timezone issue. The Midday Report is shown as 02:00.Hmm, I'd hoped I'd fixed that. I'll look at it tonight.


That version lets the service startup OK.OK, that's good to hear, thanks.

bgowland
2011-03-11, 07:35 PM
The first thing that I noticed is that the times for programs are wrong.Yes Nistrod reported this for my first version - I'd hoped I was adjusting for local time in this version but it obviously isn't fixed. I'll get a look at it ASAP.


11/03/2011 14:21:26.003 hrhkey.Key: x-ndroid-title hrhkey.Value: The People's Court *
Hmmm, I don't like the look of that title - is that really what it should be with the '*' at the end?

BrettB
2011-03-11, 07:38 PM
11/03/2011 14:21:26.003 hrhkey.Key: x-ndroid-title hrhkey.Value: The People's Court *
Hmmm, I don't like the look of that title - is that really what it should be with the '*' at the end?

Yes, the '*' is really at the end of the title and indicates that it is a "new" show.

bgowland
2011-03-11, 07:53 PM
Yes, the '*' is really at the end of the title and indicates that it is a "new" show.OK, I didn't think it would be a problem, it just looked odd.

The bit I missed was the apostrophe in People's, doh! This will mess with the SQL query. Just for completeness sake, try something without an apostrophe - it should work. I'll put a fix in for apostrophes and upload a new service version in a short while.

BrettB
2011-03-11, 08:01 PM
The bit I missed was the apostrophe in People's, doh! This will mess with the SQL query. Just for completeness sake, try something without an apostrophe - it should work. I'll put a fix in for apostrophes and upload a new service version in a short while.

Yep, that seemed to do it.

bgowland
2011-03-11, 08:20 PM
Yep, that seemed to do it.Great, thanks. I've got to pop out for half an hour then I'll get the new service version uploaded.

bgowland
2011-03-11, 09:43 PM
Great, thanks. I've got to pop out for half an hour then I'll get the new service version uploaded.I've just uploaded a new version of nDroidService.zip. I've tested this and it is correctly handling programme titles with apostrophes for me.

Now to look at the time-zone issue. :)

bgowland
2011-03-11, 11:51 PM
This version of the nDroid client hopefully fixes the time offset issue. If somebody can test and confirm, I'll upload to post #1 as the official current version. Thanks.

BrettB
2011-03-12, 01:35 AM
This version of the nDroid client hopefully fixes the time offset issue. If somebody can test and confirm, I'll upload to post #1 as the official current version. Thanks.

I believe that I successfully uninstalled both the old versions of the service and the client and then installed the new service from post #1, and this client. The times still seem to be GMT instead of local time. Sorry!

BrettB
2011-03-12, 02:00 AM
Another little gui issue: for the day tabs at the top, the current selection has white text on a white tab, so you can't read the text.

BrettB
2011-03-12, 02:04 AM
I've just uploaded a new version of nDroidService.zip. I've tested this and it is correctly handling programme titles with apostrophes for me.

That did fix it for me to set a recording, too. However, then cancelling the same recording doesn't work. :-(

bgowland
2011-03-12, 02:31 AM
I believe that I successfully uninstalled both the old versions of the service and the client and then installed the new service from post #1, and this client. The times still seem to be GMT instead of local time. Sorry!OK, this is confusing me, I'll need to look further.


Another little gui issue: for the day tabs at the top, the current selection has white text on a white tab, so you can't read the text.Yes, good point. There are a number of cosmetic points I have to fix - I'll gradually get to those.


That did fix it for me to set a recording, too. However, then cancelling the same recording doesn't work. :-(I hadn't tried cancelling my test as it doesn't require the title but you're right, I couldn't cancel mine either. I'll take a look.

Thanks for the feedback.

BrettB
2011-03-12, 02:38 AM
Instead of the generic droid application icon, I would suggest something like the one I just hacked together and am attaching.

bgowland
2011-03-12, 03:50 AM
I hadn't got as far as choosing a custom icon yet. I quite like the look of that - if you could create a png for that and one where the white background is transparent, I'll give them a go to see how well they work.

BrettB
2011-03-12, 04:13 AM
I hadn't got as far as choosing a custom icon yet. I quite like the look of that - if you could create a png for that and one where the white background is transparent, I'll give them a go to see how well they work.

Give these a try...

bgowland
2011-03-12, 04:34 AM
Thanks I'll give them a try.

One thing occurs to me though is I'd need to clear this with sub as using the name in the icon might imply direct association with the N-PVR project (don't want him being blamed for my hacky Android code :D ).

sub
2011-03-12, 04:38 AM
I dont mind. I'm not bothered by this.

bgowland
2011-03-12, 04:46 AM
I dont mind. I'm not bothered by this.OK, thanks.

bgowland
2011-03-12, 09:50 PM
Living in a GMT time-zone working with a UTC (effectively GMT) data source and pretending it belongs to various people in different time-zones and adjusting accordingly and deciding if the Guide list looks the way they should see it. Sounds so easy. :eek:

OK, the attached (I hope) should fix the time-offset issues. If it does, I'll move it to post #1 as the current release.

EDIT: Attached file removed - now found in Post #1 as official release.

Nistrod
2011-03-12, 11:02 PM
Yes, yes, yes.... Oh, you are SO wonderful!

bgowland
2011-03-12, 11:29 PM
Yes, yes, yes.... Oh, you are SO wonderful!lol, thanks. I could say the same about you for giving me some good news. :)

My phone has visited so many time-zones today it thinks I've become an international traveller. :D

Cheers,
Brian

Nistrod
2011-03-13, 01:34 AM
Now for the bad news.
The service seems to fail a few seconds after the machine recovers from standby.
I can start it again, but I have to remember to.
From the log:

13/03/2011 12:25:37.899 OnPowerEvent() called. powerStatus = ResumeAutomatic
13/03/2011 12:25:37.899 Creating new nDroidServiceListener thread...
13/03/2011 12:25:37.900 Starting nDroidServiceListener thread...
13/03/2011 12:25:38.014 OnPowerEvent() called. powerStatus = ResumeSuspend
13/03/2011 12:25:38.014 Creating new nDroidServiceListener thread...
13/03/2011 12:25:38.014 Starting nDroidServiceListener thread...
13/03/2011 12:25:38.020 UnhandledExceptionHandler caught exception. threw exception: Cannot access a closed file. at System.IO.__Error.FileNotOpen()
at System.IO.FileStream.Write(Byte[] array, Int32 offset, Int32 count)
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at System.IO.StreamWriter.Write(Char[] buffer, Int32 index, Int32 count)
at System.IO.TextWriter.WriteLine(String value)
at BGowland.DvbrLib.DvbrLogger.WriteLine(String value) in C:\Documents and Settings\gbpvr\My Documents\Visual Studio 2008\Projects\nDroidService\nDroidLib\DvbrLogger.c s:line 27
at BGowland.DvbrLib.DvbrLogger.LogException(String MethodName, Exception e) in C:\Documents and Settings\gbpvr\My Documents\Visual Studio 2008\Projects\nDroidService\nDroidLib\DvbrLogger.c s:line 17
at uk.co.beetec.csharp.nDroid.nDroidServiceListener.S tart() in C:\Documents and Settings\gbpvr\My Documents\Visual Studio 2008\Projects\nDroidService\nDroidService\nDroidSe rviceListener.cs:line 43
at System.Threading.ThreadHelper.ThreadStart_Context( Object state)
at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

bgowland
2011-03-13, 01:54 AM
Thanks I'll take a look - I can see a couple of problems in there.

bgowland
2011-03-13, 07:43 AM
I'm hoping this will work - my machine doesn't always play nice going into or coming out of standby so I've had a couple of odd results. I think it should be OK though.

I've only included the 4 main files - stopping the nDroidService and dropping these in place then start the service again should work.

EDIT: Attachment moved to post #1

BrettB
2011-03-13, 05:27 PM
Living in a GMT time-zone working with a UTC (effectively GMT) data source and pretending it belongs to various people in different time-zones and adjusting accordingly and deciding if the Guide list looks the way they should see it. Sounds so easy. :eek:

OK, the attached (I hope) should fix the time-offset issues. If it does, I'll move it to post #1 as the current release.

Well, it's closer. :D Now the listings are only off by 1 hour. I'm guessing that yesterday they would have been correct, but today, since daylight savings time began today, they are showing up 1 hour earlier than they should. (i.e. a show which actually starts at 7pm is listed as starting at 6pm)

agerdin
2011-03-13, 06:53 PM
bgowland,

Been trying the differernt releases for some days now and I just cannot get it to work. Since trying the last time I have rooted my phone and is now running Android version 2.3.3.

Installing according to instructions but I am getting "INVALID CREDENTIALS" in the logs.


13-03-2011 19:48:11.453 CreateHttpListener() listening...
13-03-2011 19:49:26.578 Url: http://192.168.0.100:8790/
13-03-2011 19:49:26.578 request: System.Net.HttpListenerRequest
13-03-2011 19:49:26.578 hrhkey.Key: x-ndroid-action hrhkey.Value: download
13-03-2011 19:49:26.578 hrhkey.Key: x-ndroid-file hrhkey.Value: channel.zip
13-03-2011 19:49:26.578 hrhkey.Key: x-ndroid-exdata1 hrhkey.Value: admin
13-03-2011 19:49:26.578 hrhkey.Key: x-ndroid-exdata2 hrhkey.Value: 5f4dcc3b5aa765d61d8327deb882cf99
13-03-2011 19:49:26.578 hrhkey.Key: Connection hrhkey.Value: Keep-Alive
13-03-2011 19:49:26.578 hrhkey.Key: Accept-Encoding hrhkey.Value: gzip
13-03-2011 19:49:26.578 hrhkey.Key: Host hrhkey.Value: 192.168.0.100:8790
13-03-2011 19:49:26.578 INVALID CREDENTIALS
13-03-2011 19:49:26.578 CreateHttpListener() listening...

I am sure I am using the same credentials as in my NEWA and they are also entered in the nDroidSettings.xml file.

Any ideas?

\\Agerdin
\\Agerdin

bgowland
2011-03-13, 09:39 PM
I'm guessing that yesterday they would have been correct, but today, since daylight savings time began today, they are showing up 1 hour earlier than they should.At least we got to that sooner rather than later. I wasn't sure if the offset function I'm using included DST or not - now we know. :) Relatively quick fix, I'll post an update ASAP.


I am sure I am using the same credentials as in my NEWA and they are also entered in the nDroidSettings.xml file.All I can suggest is to reset everything to the defaults...


Reset npvr on the MVP & web settings page to use admin and password for username/password
Edit nDroidSettings.xml to be the same NOTE use something simple like Notepad as there's a possibility something like Wordpad might introduce Unicode characters which would cause problems
Restart the nDroidService after making the above changes as they are only read at startup
Reset the nDroid client on you phone to use the same (or leave it alone if you haven't changed them on your phone as these are the defaults).
NOTE: These are ALL case-sensitive.

Let me know if you still have problems.

bgowland
2011-03-13, 09:47 PM
bump

BrettB
2011-03-13, 09:53 PM
Installing according to instructions but I am getting "INVALID CREDENTIALS" in the logs.
\\Agerdin

I think that when I was first trying this out I was running into a similar problem. If I recall correctly, the nDroidServiceHelper.log showed the user and password correctly from the nDroidSettings.xml file, but the nDroidServiceListener.log file was always using the "admin" and encrypted "password" instead of what was specified in nDroidSettings.xml.

bgowland
2011-03-13, 10:01 PM
I think that when I was first trying this out I was running into a similar problem. If I recall correctly, the nDroidServiceHelper.log showed the user and password correctly from the nDroidSettings.xml file, but the nDroidServiceListener.log file was always using the "admin" and encrypted "password" instead of what was specified in nDroidSettings.xml.The username and password in the nDroidSettings.xml file must be in plain text - encryption is handle by the service helper to match the NEWA credentials.

bgowland
2011-03-13, 11:27 PM
As the title says, I've updated the nDroid client to compensate for DST. I'll move this to post #1 when I get confirmation that things work how they should.

EDIT: Attachment moved, download from post #1

marcuswar
2011-03-13, 11:30 PM
I think that when I was first trying this out I was running into a similar problem. If I recall correctly, the nDroidServiceHelper.log showed the user and password correctly from the nDroidSettings.xml file, but the nDroidServiceListener.log file was always using the "admin" and encrypted "password" instead of what was specified in nDroidSettings.xml.

Yes same here, what ever username and password I put in the nDroidSettings.xml gets ignored and it seems to be using the defaults of "admin" and "password". I've changed the NEWA password back to the default "password", rstarted the services and it now connects fine. Looking in the logs the hashed password string is always the same, so it looks like the nDrod client is not honouring the username and password settings.

BrettB
2011-03-13, 11:32 PM
As the title says, I've updated the nDroid client to compensate for DST. I'll move this to post #1 when I get confirmation that things work how they should.

That did it. Thanks!

bgowland
2011-03-13, 11:39 PM
Looking in the logs the hashed password string is always the same, so it looks like the nDrod client is not honouring the username and password settings.I was just beginning to look at this possibility - it's possible I broke something where it should be saving username/password changes.

Nistrod
2011-03-13, 11:59 PM
I'm hoping this will work - my machine doesn't always play nice going into or coming out of standby so I've had a couple of odd results. I think it should be OK though.

I've only included the 4 main files - stopping the nDroidService and dropping these in place then start the service again should work.

Its still up several minutes later - looking good!

bgowland
2011-03-14, 01:23 AM
That did it. Thanks!Great, thanks for confirmation.


Its still up several minutes later - looking good!OK, fingers crossed. :)

bgowland
2011-03-14, 01:26 AM
I've uploaded v1.2.4 of the nDroid client which rolls up the fix for DST offset being ignored and will properly pass updated user credentials instead of falling back to the defaults. See post #1.

JonnyCam
2011-03-14, 08:11 AM
I don't seem to be able to get this to work.
The logs keep saying invalid credentials.

Checking the hash between
Helper: d0763edaa9d9bd2a9516280e9044d885
npve config: D0763EDAA9D9BD2A9516280E9044D885
Listener: d0763edaa9d9bd2a951628e9044d885

So the listener seems to have a missing 0 in the hash - 16280e vs 1628e

And 2 missing zeroes in the below

helper: 6b7330782b2feb4924020cc4a57782a9
listener: 6b7330782b2feb49242cc4a57782a9
config 6B7330782B2FEB4924020CC4A57782A9

my android client just sits there saying downloading files.

Am I doing something wrong here? Logs attached.

Cheers

bgowland
2011-03-14, 08:26 AM
Am I doing something wrong here?No, you're not. I've seen this once before but couldn't reproduce - there's something screwy about the Android hash algorithm I'm using in certain cases. I'll get back to you.

bgowland
2011-03-14, 09:11 AM
@JonnyCam: Try this attached with the same credentials which were failing to hash correctly and let me know what happens.

EDIT: Correct version this time :)

JonnyCam
2011-03-14, 10:45 AM
Thanks. That fixed the has problem. It then complained about no logos.zip, so I copied the channel.zip and renamed it.

Looks good. Can I copy my logos accross to a zip file?

bgowland
2011-03-14, 10:58 AM
Thanks. That fixed the has problem.Thanks that's good to hear.


It then complained about no logos.zipHmm, OK, I thought I had it set to ignore the case where logos.zip is missing - I'll check my code.


Looks good. Can I copy my logos accross to a zip file?It should generate the logos.zip file automatically although I think it currently only checks for .png files with exact channel name match (which is why I thought I had it ignore downloading if the logos.zip hadn't been created). I'll check and post any fixes needed later.

EDIT: It's only checking for .jpg files at the moment - about to fix this to add .png and .gif to the mix.

agerdin
2011-03-14, 12:17 PM
bgowland,

Its now working for me.

Another thing I would like to report is that when the EPG description is very long the "record" and "cancel" button is off the screen and there is no way to scroll.


When initially setting up, use a numeric IP address - I haven't tested for a DNS name and I'm fairly sure it could cause problems.

I have tried and looks like i can use a DNS name rather than a IP adress, which allows me to use my dynds.org account for the ndroid.

Thanks,

\\Agerdin

bgowland
2011-03-14, 01:55 PM
Its now working for me.Great.


Another thing I would like to report is that when the EPG description is very long the "record" and "cancel" button is off the screen and there is no way to scroll.OK, the popup details dialog is still a work in progress but I'll check to see what I can do there.



When initially setting up, use a numeric IP address - I haven't tested for a DNS name and I'm fairly sure it could cause problems.

I have tried and looks like i can use a DNS name rather than a IP adress, which allows me to use my dynds.org account for the ndroid.Good to know, thanks for confirming that.


ThanksStill early days, hopefully I can make some good progress now it is working a bit better for more people. Thanks for sticking with it.

Cheers,
Brian

marcuswar
2011-03-14, 09:53 PM
Not had a chance to install the newer version yet (still running 1.2.2), but I think I may have found another bug (sorry Brian).
After initially launching nDroid if I change channel listing then every program I click on bring up the correct details but with the the initial channels name not the newly selected channel name.

Another suggestion (not a bug) would be to make the popup program details always full width of screen (instead of collapsing to a narrow width if the decsription is short) and make the "Close" & "Record" buttons bigger and wider apart. At the moment I find its too easy to hit the wrong button with my fat fingers :p

With regards the Cancel/Record buttons being pushed off the bottom when the program description is too long, how about putting the buttons at the top of the dialogue, there seems to be a far bit of blank space at the top anyway ?

Are there plans to have a "manage recordings" option ?

Marcus

bgowland
2011-03-14, 10:47 PM
After initially launching nDroid if I change channel listing then every program I click on bring up the correct details but with the the initial channels name not the newly selected channel name.Right you are - will fix for next release.


Another suggestion (not a bug) would be to make the popup program details always full width of screen (instead of collapsing to a narrow width if the decsription is short) and make the "Close" & "Record" buttons bigger and wider apart. At the moment I find its too easy to hit the wrong button with my fat fingers :p

With regards the Cancel/Record buttons being pushed off the bottom when the program description is too long, how about putting the buttons at the top of the dialogue, there seems to be a far bit of blank space at the top anyway ?The popups were/are a bit of a hack just to get something functional for a release of 1.2.x and are a work in progress.

The 'record' popup has always been full width for 1.2.x but I never got around to it with the details popup (until earlier today for next release so I'm ahead of you on that one :D ). The buttons definitely need work from a layout (spacing) point of view but I can't put them at the top with these popups (long story cut short, part of the hack, that gap is dead space I can't use). I've fixed the long description causing the buttons to be forced off the bottom by making the description box scrollable which will hopefully suffice in the short term. I'll aim to review the popups completely in the near future.


Are there plans to have a "manage recordings" option ?Yes at some point hopefully when the app is as stable/usable as I can get it in this form. I have a number of ideas/plans but need a stable base first.

Cheers,
Brian

BrettB
2011-03-15, 02:00 AM
OK, so now that we're moving on to wishlist items, :D I'll add mine:


When first opening, go to the current time on the current day.
When selecting another day, stay in the same time range. (i.e. if I have scrolled to "prime time" show me "prime time" on the newly selected day)
On the details pop-up screen, the background is a little bit transparent letting the schedule text show through. I think that makes it harder to read and looks "dirty." I would prefer for the background to be totally opaque.
Have a screen that lists (all of?) the upcoming pending recordings.
Be able to enter 2 IP addresses to be used: a LAN one and a WAN one. When starting, the application would determine if there is a wifi connection and if its IP address is on the same (sub-)network as the LAN address in the config. If so, it would connect to the LAN IP address. If not, it would use the WAN IP address. This way it could be used at home, directly via the wifi and from any other location via the cellular data network.
Eventually, a schedule/guide by time slots across the top and channels down the side.
Even more eventually: add some of the functionality from the System plug-in like displaying free disk space and current tuner status

bgowland
2011-03-15, 07:46 PM
OK, so now that we're moving on to wishlist items, :D I'll add mine:Wishlist items always welcome - some of your list are already on my todo list and I'll bear the others in mind for future development.

BTW, unfortunately the icons you provided don't really work on the phone screen as the text tends to get lost and isn't particularly clear. I am going to use the transparent background one temporarily for a splash screen in the next release later today as I need something relevant to fill a space. Long term, however, I feel it needs something a little simpler. I was wondering about the Android with an 'n' in a circle on it's chest. Basically the same icon the npvr systray app uses. What do you think?

Anybody else with icon/logo suggestion are welcome to sugest things if you have the time/interest/inclination. :)

BrettB
2011-03-15, 10:10 PM
BTW, unfortunately the icons you provided don't really work on the phone screen as the text tends to get lost and isn't particularly clear. I am going to use the transparent background one temporarily for a splash screen in the next release later today as I need something relevant to fill a space. Long term, however, I feel it needs something a little simpler. I was wondering about the Android with an 'n' in a circle on it's chest. Basically the same icon the npvr systray app uses.

You could try these and see how they look.

bgowland
2011-03-15, 10:53 PM
Thanks - I'll try them out.

bgowland
2011-03-16, 12:01 AM
Well basically what the title says. :)

From the version history...
2011-03-15 23:25Update to nDroid client moving the 'first run' file downloads to a splash screen activityUpdate to nDroid client to the programme 'details' popup to restrict the description text to a scrolling text view to prevent Record/Cancel buttons being pushed out of the popup windowUpdate to nDroid client and nDroidService to correctly check for .jpg, .png and .gif channel logo files. Also corrected handling at the download stage when no logos have been found and the logos.zip file isn't createdUpdate to nDroid client to fix password hash bug

I've also added an nDroid app icon and also the same image to the splash screen (thanks goes to BrettB). Possibly a work in progress but looking OK on my 3.7in 480x800 screen - I'd be interested in how they look on different screen formats.

BrettB
2011-03-16, 01:38 AM
Well basically what the title says. :)

Working well for me. The icon looks good on my Atrix. I haven't try changing my password yet.

agerdin
2011-03-16, 01:28 PM
bgowland,

Im not sure where we stand on the time issue, but I am still experiencing problems. A show that starts 21:00 in my EPG is showing as 22:00 on nDroid.

Im running the following versions:

LATEST CLIENT VERSION: v1.2.6
LAST UPDATE: 2011-03-15 23:25

LATEST SERVICE VERSION: v1.1.4090.20355
LAST UPDATE: 2011-03-15 23:25
\\Agerdin

bgowland
2011-03-16, 08:49 PM
Im not sure where we stand on the time issue, but I am still experiencing problems. A show that starts 21:00 in my EPG is showing as 22:00 on nDroid.One hour ahead sounds like a daylight savings confusion perhaps - when does Sweden adopt DST? Also, I presume the times are showing correctly in nPVR itself?

agerdin
2011-03-16, 10:07 PM
One hour ahead sounds like a daylight savings confusion perhaps - when does Sweden adopt DST? Also, I presume the times are showing correctly in nPVR itself?

We are not doing our DST until March 27 and yes, all EPG times in NPVR are correct.

The extract from my epg below is the show I am using for reference. It shows correctly at 21:00 in NPVR but as 22:00 in nDroid.


<programme start="20110316210000 +0100" stop="20110316215500 +0100" channel="7.tvgrabber">
<title>Grey's anatomy</title>
<desc>(Avsnitt 11/22) Amerikansk dramaserie från 2010-11. En beväpnad man öppnar eld på en lokal skola och det väller in patienter på sjukhuset. Säsong 7. Gästskådespelare: Peter MacNicol, Susan Ruttan.</desc>
<episode-num system="xmltv_ns">-1 . 10/22 .</episode-num>
</programme>

\\Agerdin

bgowland
2011-03-16, 10:18 PM
The extract from my epg below is the show I am using for reference. It shows correctly at 21:00 in NPVR but as 22:00 in nDroid.Urrm OK, rather embarrassingly I just realised my EPG is ahead by one hour as well.

I expect it's a fault in my code but I hope this isn't a replay of the 1990s when MS had to release a Windows TZ patch because they assumed Europe adopted DST at the same time as the US (yes, it happened and seriously messed up a lot of systems).

I'll check and get back to you.

bgowland
2011-03-16, 10:42 PM
Aaaargh!!!!
DEBUG/uk.co.beetec.android.nDroid.NDroidHelper(12719): rawOffset: 0 dstSavings: 3600000The value for dstSavings is +60 minutes represented in milliseconds - Android thinks we've already adopted DST and it'll be another 10 days before that happens.

OK, I'll upload a version ASAP with a manual override for DST - it's a hack but it'll work. Sigh!

bgowland
2011-03-16, 11:47 PM
OK, my bad (figures :rolleyes: ). I changed the 'time' functions I was using when I fixed the TZ problems and the ones I'm using now work slightly differently. Doh!

Post #1 has v1.2.7 of the nDroid client which fixes the problem.

bgowland
2011-03-17, 03:36 AM
v1.2.8 (and versions from now on) will store the nDroid SQLite DB in internal memory rather than attempt to use the SD card.

I can't see it taking up more than about 5MB (although time will tell) and in reality it possibly may only be a half to one-third of that size.

Anyone concerned about internal memory usage can go to Settings -> SD & phone storage on their device to see how much internal memory is available.

If you want to check how much nDroid is using, go to Settings -> Applications -> Manage Applications. Select nDroid and it will give Application Info showing total storage used.

mvallevand
2011-03-17, 04:04 AM
Good news, I am successfully running nDroid on my Android 2.1 tablet and all is working well. Looking over the comments I don't have a lot of new things to add but here goes

- I don't want to see expired programs today
- I'd like to tap the Channel text and not just the icon to change stations
- I don't use channel icons so I'd prefer a nicer generic icon
- One test channel icon (jpg) didn't display anything.
- future days show from the preceding show the day before. It's odd seeing some days start at 9:30pm
- Channels names for selection are useless I don't know the call-letters at all just the channel number.
- However for premium channels like HBO I'd want the name so I guess and want name an number
- I'd prefer channels by numbers in columns and not snaked (which sub might find contradictory because I argued against this for icon view) but that might be because I am counting to find which one is channel 13

Overall I was very impressed until I gave it to my wife. She made some very valid points. We watch and record looking at the EPG but we really don't know what channel most things are on after we select them scrolling through 8 channels at once for the evening. We know we record the Good Wife on Tuesdays at 10h but we don't know what number or network it is on. To use this it was funny watching her go to the EPG on the TV to get the channel name to select to load in nDroid.

I checked the competition and DirectTV's rtmp://directv.fcod.llnwd.net/a517/d1/mp4:com/cms2/widtv/DVR_Scheduler_Update.f4v is interesting (about 1/2 way through) it has the find, which I know my wife wants, plus a manual record, which is probably how I think but it's great to have manual record linked to the guide.

Please don't take this as negative, it is a fine app with lots of potential and as my wife said it would be great to be able to use this when you aren't at home if you hear about something to record.

Martin

bgowland
2011-03-17, 07:47 AM
Good news, I am successfully running nDroid on my Android 2.1 tablet and all is working well.Glad to hear it. :D


- I don't want to see expired programs today
- I'd like to tap the Channel text and not just the icon to change stations
- I don't use channel icons so I'd prefer a nicer generic icon
- One test channel icon (jpg) didn't display anything.
- future days show from the preceding show the day before. It's odd seeing some days start at 9:30pm
- Channels names for selection are useless I don't know the call-letters at all just the channel number.
- However for premium channels like HBO I'd want the name so I guess and want name an number
- I'd prefer channels by numbers in columns and not snaked (which sub might find contradictory because I argued against this for icon view) but that might be because I am counting to find which one is channel 13Thanks, several are on the todo list and are mostly just cosmetic/view related. I want to spend a lot of time in this area now I've hopefully ironed out a lot of the teething troubles (famous last words). Slightly confused about the test jpg problem though - possible filename issue, case-sensitivity?


Overall I was very impressed until I gave it to my wife.Oh, no!!!! You gave it your wife??? :eek:


Please don't take this as negative, it is a fine app with lots of potential and as my wife said it would be great to be able to use this when you aren't at home if you hear about something to record.All ideas/comments/feedback welcome, and that last comment nicely rounds it as it's how I came to start this - up until a couple of weeks ago I spent 30hrs a week on the road and lost count of how many TV programmes I meant to record and then remembered 5 minutes after they started (when I was miles away and nobody at home to call). The initial idea (and still my main focus) is a pocket TV Guide linked to npvr...but that's just a start. Ideally, long term, it could scale from small screen phones up to tablets with varying complexity of the UI and features.

BTW, I'm not able to connect to that DirecTV link.

Cheers,
Brian

Nistrod
2011-03-17, 08:48 AM
I agree with many of the comments above.
Previous discussions about wi-fi/3G bear thinking about. Its not quite that simple.
If I have a home wifi and an office wifi, the previous idea falls over.
I love the idea of being able to set up my home system and get to it over the Internet.

Suggestion: alternate local/remote addresses, selected by button or such. This means even if the office and home networks share IP address (pretty common, I would think), it would still ignore the office machine that happens to have the same address as my home server, and use the "other" address. To be even smarter, it could check if its on the same network as the server, and default to "remote" if not.

Also, a combined channels display - everything on all channels. Like mvallevand, I dont focus on what channel a show is on. Show everything at once - together with which channel its on.

Please note -nDroid has been promoted to a Home Screen! My wife was astounded when I said I was setting up a recording from the phone!

mvallevand
2011-03-17, 12:13 PM
BTW, I'm not able to connect to that DirecTV link.

I see it is an rtmp:// to a flash video maybe you don't support it on your browser. The watch video link is on this page http://www.directv.com/DTVAPP/content/directv/dvr_scheduler maybe your browser will handle this?

Marti

BrettB
2011-03-17, 03:17 PM
Previous discussions about wi-fi/3G bear thinking about. Its not quite that simple.
If I have a home wifi and an office wifi, the previous idea falls over.
I love the idea of being able to set up my home system and get to it over the Internet.

Suggestion: alternate local/remote addresses, selected by button or such. This means even if the office and home networks share IP address (pretty common, I would think), it would still ignore the office machine that happens to have the same address as my home server, and use the "other" address. To be even smarter, it could check if its on the same network as the server, and default to "remote" if not.

I wouldn't be opposed to having an override button or similar mechanism. But, personally, I would want it to work automatically. And since (I'm pretty sure) most users would have the control to change at least their home LAN IP network range if it happened to conflict with a work IP network range, I think that the method of deciding upon which server IP address to use (or at least to default to) could be very effective at making the process automatic.

BrettB
2011-03-17, 07:17 PM
- I'd like to tap the Channel text and not just the icon to change stations
- I don't use channel icons so I'd prefer a nicer generic icon
- One test channel icon (jpg) didn't display anything.
- future days show from the preceding show the day before. It's odd seeing some days start at 9:30pm
- Channels names for selection are useless I don't know the call-letters at all just the channel number.
- However for premium channels like HBO I'd want the name so I guess and want name an number
- I'd prefer channels by numbers in columns and not snaked (which sub might find contradictory because I argued against this for icon view) but that might be because I am counting to find which one is channel 13

Overall I was very impressed until I gave it to my wife. She made some very valid points. We watch and record looking at the EPG but we really don't know what channel most things are on after we select them scrolling through 8 channels at once for the evening. We know we record the Good Wife on Tuesdays at 10h but we don't know what number or network it is on. To use this it was funny watching her go to the EPG on the TV to get the channel name to select to load in nDroid.


Martin,

I particularly like the comment about your wife and the EPG on the TV. :D

As far as functionality for channels goes, I am almost the opposite of Martin. I don't use channel numbers at all except for getting the order of channels in the EPG. So for me, the logo is the most useful piece. (Although for a channel listing, it could probably a little smaller.) I think that depending upon the situation (cable, OTA, satellite, etc.) the number, the name, and/or the logo would be the most useful. So I'm thinking that the most ideal situation would be to have include/exclude configuration options for each of those 3 elements of a channel. Currently this would apply to the channel listing page. But in the future (hopefully) it would also apply to the EPG display by time slot with all channels and shows listed.

bgowland
2011-03-17, 11:44 PM
The watch video link is on this page http://www.directv.com/DTVAPP/content/directv/dvr_scheduler maybe your browser will handle this?I use Chrome and it didn't like the rtmp - I can connect with this one but it buffers 5 seconds, plays 2, and so on. I'll try again later perhaps the server is busy.


I wouldn't be opposed to having an override button or similar mechanism. But, personally, I would want it to work automatically. And since (I'm pretty sure) most users would have the control to change at least their home LAN IP network range if it happened to conflict with a work IP network range, I think that the method of deciding upon which server IP address to use (or at least to default to) could be very effective at making the process automatic.I hadn't decided how I was going to handle networking as it's still early days.

One thing I will say though is that Android is (rightly) very strict WRT what can and can't be done with software. Although I can detect network state (which interfaces are enabled/disabled, some connection details etc) I can't use software to enable/disable any interfaces automatically. More than that, wi-fi will normally take priority even if both wi-fi and mobile interfaces are enabled. I currently have an open question on a programmers' Q&A site about bypassing wi-fi in this sort of scenario but I can hear the wind whistling and see the tumbleweeds rolling past even as I type this. :)

I'll see what can be done - for the moment I'm looking at tidying/enhancing the UI plus a few other issues.

Cheers,
Brian

mvallevand
2011-03-18, 12:01 AM
What I really wanted you to see was this. For remote recording I'd probably use it most, especially if I am doing this because the EPG has changed and something I record has ben postponed or moved. Also I may want to capture a news or sporting event that isn't going to be in the guide that I have data for.

Martin

BrettB
2011-03-18, 12:04 AM
One thing I will say though is that Android is (rightly) very strict WRT what can and can't be done with software. Although I can detect network state (which interfaces are enabled/disabled, some connection details etc) I can't use software to enable/disable any interfaces automatically. More than that, wi-fi will normally take priority even if both wi-fi and mobile interfaces are enabled. I currently have an open question on a programmers' Q&A site about bypassing wi-fi in this sort of scenario but I can hear the wind whistling and see the tumbleweeds rolling past even as I type this. :)

Hey, Brian.

Yeah, I know the networking thing isn't a high priority. Just something to be thinking about for the future. Also, just to be clear, we weren't talking about trying to bypass wi-fi or to enable/disable anything. All we were talking about was deciding which of 2 IP address nDroid should use to connect to the npvr server. For example, here's the scenerio:

npvr server/nDroidService is on home LAN at IP address 192.168.100.10.
Home LAN is connected to the Internet via some ISP and uses DynDNS to map npvr.dyndns.net to its dynamic IP address currently assigned by the ISP.

Then you would configure nDroid with a Server LAN IP of "192.168.100.10" and a Server WAN IP of "npvr.dyndns.net".
When nDroid was launched, it would check to see if the wi-fi interface was connected and had an IP address. Let's say that it is and has address 192.168.100.101/24. Since the phone's IP address is on the same IP network (192.168.100.) as the configured Server LAN IP address, nDroid would use 192.168.100.10 for its connection to the server. If the wi-fi interface isn't connected or the wi-fi IP address is not on the same LAN IP network, then nDroid would use the configured Server WAN IP address ("npvr.dyndns.net") for its connection to the server. The phone would still do all the networking and would route via wi-fi or mobile interface just like normal. If I'm at a public wi-fi hotspot with address 192.168.1.215, the phone would still use the preference for the wi-fi connection to get to my npvr.dyndns.net server address.

bgowland
2011-03-18, 01:02 AM
What I really wanted you to see was this.I think I'd just got to that point in the video when it sat an buffered continuously and I gave up. I will try again later as it's always useful to get ideas. Implementing manual record will be quite straight-forward - I've put it on the todo list.


Also, just to be clear, we weren't talking about trying to bypass wi-fi or to enable/disable anything.But are you sure about that? ;)

The way Android works is that even if you have both wi-fi and mobile internet enabled in your device settings, if the wi-fi interface has an established connection, the mobile net interface will sit in a disconnected/dormant state.

Now suppose you're in your workplace and connected to the office WLAN - I can detect that the network IP address / SSID isn't the same as your home network. At this point, I choose to use npvr.dyndns.net instead of the numeric address, but it doesn't matter because Android will simply use the currently active network (wi-fi). My point is that using a DNS name won't affect Android's choice of which interface it uses (DNS names are valid on LANs/WLANs after all) so unless I can 'wake' the mobile interface and bind to it directly as my choice of routing the request, simply switching from a private IP address to a public DNS name won't make a difference.

BrettB
2011-03-18, 01:56 AM
But are you sure about that? ;)

The way Android works is that even if you have both wi-fi and mobile internet enabled in your device settings, if the wi-fi interface has an established connection, the mobile net interface will sit in a disconnected/dormant state.

Now suppose you're in your workplace and connected to the office WLAN - I can detect that the network IP address / SSID isn't the same as your home network. At this point, I choose to use npvr.dyndns.net instead of the numeric address, but it doesn't matter because Android will simply use the currently active network (wi-fi). My point is that using a DNS name won't affect Android's choice of which interface it uses (DNS names are valid on LANs/WLANs after all) so unless I can 'wake' the mobile interface and bind to it directly as my choice of routing the request, simply switching from a private IP address to a public DNS name won't make a difference.

Brian,

In your example, the connection from work would go from the phone via wi-fi to the work LAN, then out the work Internet connection to the Internet, then to my home LAN via my home ISP connection. So the mobile net interface still wouldn't be needed/used.

After thinking about it some more, I like you idea of using the SSID for determining which server address to use. That method takes care of the problem where the same LAN network range is being used in multiple places (i.e. at home and at work). Plus, it also takes care of the situation where the phone and server are both on the same LAN, but not on the same subnet (i.e. non-small offices, campuses, etc.). It requires storing another configuration item (the "Internal SSID"), but during configuration, you could query the SSID and use it as the default value, so users typically wouldn't need to manually enter it. Then the 2 server IP addresses could be called "Server Internal IP Address" and "Server External IP Address".

bgowland
2011-03-18, 02:46 AM
In your example, the connection from work would go from the phone via wi-fi to the work LAN, then out the work Internet connection to the Internet, then to my home LAN via my home ISP connection. So the mobile net interface still wouldn't be needed/used.In your place of work maybe but what about others? I used to work at a place where we had 4 subnets. Two of those subnets didn't even have a route between each other and one of them could only access the outside world through a proxy server and only if the client was using http on port 80...and its DNS server was internal-only.


I like you idea of using the SSID for determining which server address to use. That method takes care of the problem where the same LAN network range is being used in multiple places (i.e. at home and at work).SSID would need to be checked for that reason - I can't assume that because the network address is the same then it must be the same network.

BrettB
2011-03-18, 02:52 AM
In your place of work maybe but what about others? I used to work at a place where we had 4 subnets. Two of those subnets didn't even have a route between each other and one of them could only access the outside world through a proxy server and only if the client was using http on port 80...and its DNS server was internal-only.

In that case none of the other applications on the phone needing to use the Internet would work either. So, there wouldn't be any reason for me to have my phone setup to connect to the work wi-fi.

bgowland
2011-03-18, 04:24 PM
In that case none of the other applications on the phone needing to use the Internet would work either. So, there wouldn't be any reason for me to have my phone setup to connect to the work wi-fi.But again that's your scenario and not necessarily everybody's. Even a closed LAN/WLAN scenario can still provide access to local (corporate) resources such as network printers, access to intra-net web services, sync'ing of corporate email accounts etc.

One interesting use of wi-fi in a 'closed' network I came across, is a guy developing an 'exhibit guide' for a museum.

As the visitors enter different 'zones' (Science, Natural History etc) the app would identify roughly where they are based on available SSIDs of local APs. The app would present a 'gallery' of images of exhibits in each zone the user could flip through and select to get more information (textual, short movie clip, audio-commentary etc).

Nice idea, very innovative but no access to the outside world as the museum didn't want people just wandering in with their laptops and surfing for free. ;)

Anyway, enough of hypothetical discussions of smart-phone usage :) - I've hopefully managed to find a way of doing what I need to do so everybody will be happy...well...urrm, it might work. :D

Nistrod
2011-03-20, 03:34 AM
My server changed IP address, so I got an error on nDroid. Fair enough. But when I pressed OK, nDroid dropped out, and I was unable to change the network settings to fix the problem. I had to delete data, and then restart. Perhaps it could just drop into the network settings screen in this case?

Also, could we get some sort of indication of how up-to-date the EPG data is? Its hard to tell if its been updated or not. Maybe a date at the top?

bgowland
2011-03-20, 09:44 AM
My server changed IP address, so I got an error on nDroid. Fair enough.Out of interest can you remember the wording of the message (i.e., was it an nDroid error box or a standard Android...Force Close type message?)

I've been working on handling connection problems more gracefully and my original goal was to always allow for off-line usage (after the 'first run' setup) for guide browsing and submitting 'queued' recording requests to be processed when a connection is available.

There's a way to go on that (queuing requests, I mean) but I'll be able to release a version later which doesn't require a network connection at startup which would help in that scenario.


Also, could we get some sort of indication of how up-to-date the EPG data is? Its hard to tell if its been updated or not. Maybe a date at the top?Yes, I'll put a simple status screen in but initially it will require checking manually from the menu button. When I get as far as using the Notification Manager you'll get success/failure notifications on things like that...a way to go before I get there though.

Thanks for the feedback, oh and I meant to comment on your previous post...It made it to a Home Screen...praise indeed. :cool:

Nistrod
2011-03-20, 09:54 PM
Out of interest can you remember the wording of the message It looked like an application generated error - SERVER_NOT_AVAILABLE, with an OK button. At that point, pressing OK meant the app just went away.

bgowland
2011-03-20, 10:07 PM
It looked like an application generated error - SERVER_NOT_AVAILABLE, with an OK button. At that point, pressing OK meant the app just went away.Thanks - yes that's one of mine. Slightly more graceful than simply locking up (as early versions did) but admittedly not much help in your case. My current version starts without the need for a network connection - I've a few other things to finish before I upload though.

BrettB
2011-03-21, 01:10 AM
Brian,

Something else to think about: maybe have nDroid look in some location on the phone for a file with default configuration values. Admitedly this feature would not be particularly needed once the application is "finished" and in production. But, for now, when we keep getting new versions, uninstalling the old version, and then installing the new version, it would be nice to not have to enter all of the configuration items over and over again. For a new install, I would suggest still displaying the configuration settings screen, but just populate the fields with default values from a file on the phone that is not part of the application.

- Brett

bgowland
2011-03-21, 01:58 AM
Admitedly this feature would not be particularly needed once the application is "finished" and in production.Hi Brett,

Finished? I'm glad you have confidence in my abilities. Seems like every time I complete one stage I find three more to add to the todo list. :D


But, for now, when we keep getting new versions, uninstalling the old version, and then installing the new version, it would be nice to not have to enter all of the configuration items over and over again.Since the version which added the Splash screen, it should be fine just to install over the top of a previous version and it'll remember everything.


For a new install, I would suggest still displaying the configuration settings screen, but just populate the fields with default values from a file on the phone that is not part of the application.I could do this as a manual 'backup settings' option but not automatically - I'd rather not leave anything behind that the user hasn't agreed. The ethos of Android apps seems very much that they should clean up, switch off the light and close the door behind them on an un-install (if you see what I mean).

Worth thinking about though - I'll see what the options are for this. I do have a 'MyDocuments' folder on my SD card but I don't know if it's specific to my android version/phone or if it's a standard folder...

Cheers,
Brian

BrettB
2011-03-21, 02:10 AM
Finished? I'm glad you have confidence in my abilities. Seems like every time I complete one stage I find three more to add to the todo list. :D
Well, I did put the "finished" in quotes. :D I'm sure that users like us will continually have ideas for improvements!



Since the version which added the Splash screen, it should be fine just to install over the top of a previous version and it'll remember everything.
I didn't know that we could now just installed on top of the old version. If that is the case, then this ability probably isn't that useful. I was just getting tired of having to put in the ip address, username, and password everytime. Plus, as new options are added, it would just get worse.


I'd rather not leave anything behind that the user hasn't agreed. The ethos of Android apps seems very much that they should clean up, switch off the light and close the door behind them on an un-install (if you see what I mean).
Actually, I wasn't thinking that YOU (or rather nDroid) would create the file. I was thinking that I (as the user/tester) would manually create the file on my PC and then move it over the phone to whatever special location nDroid would check for it.

But, like I said, if we don't need to keep uninstalling, then it's probably not a big deal.

bgowland
2011-03-21, 03:06 AM
I didn't know that we could now just installed on top of the old version.I'd always advised a fresh install especially as start-up relied on a number of different things but since I added the splash screen activity, it's got a lot more stable (although I wasn't sure of that at the time). If I make any major changes then a fresh install might be needed but I'm hoping general updates shouldn't need it now.


I was thinking that I (as the user/tester) would manually create the file on my PC and then move it over the phone to whatever special location nDroid would check for it.

But, like I said, if we don't need to keep uninstalling, then it's probably not a big deal.I'll still bear it in mind though as it could be useful.

Cheers,
Brian

bgowland
2011-03-22, 04:53 AM
Two things...

First, I've created an nDroid wiki page at...

http://www.gbpvr.com/nwiki/pmwiki.php?n=Utility.NDroid

...I need to do a fair amount of work on it as most of the content has simply been cut/pasted from the original posts in this thread. I'm hoping it's pretty accurate though.

Secondly, I've uploaded v1.2.10 of the nDroid client and a new version of the nDroidService.

NOTE Please download and install both as there have been changes that affect each other's behaviour.

Please see post #1 of this thread for the changes - nothing ground-breaking as I've done a lot of behind the scenes work on stability and also some preparation for some enhancements.

Also, please note the Menu option for 'Manual Record' is currently disabled so don't be surprised if nothing happens when you select it. :)

mvallevand
2011-03-23, 04:34 AM
It could be the size of my 200+ channels, but each time I start nDroid now or try to change channels it takes a long time (minutes), the screen saver comes on twice, and I even get the Force Close Wait/prompt.

The new missing icon is nice and the channel numbers will become helpful when it is practical to change channels.

Martin

bgowland
2011-03-23, 06:44 AM
It could be the size of my 200+ channels, but each time I start nDroid now or try to change channels it takes a long time (minutes), the screen saver comes on twice, and I even get the Force Close Wait/prompt.I'm not sure I've changed anything that would have that much of an adverse effect - admittedly I only have about ~60 channels but changing between them is split-second. A couple of questions...

Have you been testing previously with that many channels?
Does your guide have extensive 'Description' text?

Nistrod
2011-03-23, 09:01 AM
Please sir, pretty please, with cherries and ice cream on top, can we have the display of whats on now on all channels?

bgowland
2011-03-23, 11:20 AM
lol - I almost got started on that one last night but got side-tracked several different directions. It's fairly high on the list and I'm hoping to have it included in a new update by the weekend.

I might even include a Windows installer for the service and nDroid client updates via the App Market. :)

mvallevand
2011-03-23, 11:51 AM
Have you been testing previously with that many channels?
Does your guide have extensive 'Description' text?

It is the same EPG I was using before and yes there are both lots of description and none, some of my channels are digital radio with no EPG data and nDroid doesn't like these very much

E/Database(24926): Failure 1 (3 values for 4 columns) on 0x125ab0 when preparing 'INSERT INTO SCHEDULED_RECORDING (oid,status,channel_oid,event_details) values('770','2','6865');'.

I've emailed you what logs there are it is so verbose it overruns.

Martin

bgowland
2011-03-23, 01:30 PM
some of my channels are digital radio with no EPG data and nDroid doesn't like these very muchI'll email you later about the radio channels - do you mean no EPG data at all? I'm not too worried about subtitle/description missing but I assume they have start/end times and titles etc???


E/Database(24926): Failure 1 (3 values for 4 columns) on 0x125ab0 when preparing 'INSERT INTO SCHEDULED_RECORDING (oid,status,channel_oid,event_details) values('770','2','6865');'.This is a manual recording - I'm about to upload a new version of nDroid which will hopefully cope with this.


I've emailed you what logs there are it is so verbose it overruns.Note to self: don't upload a version of software which logs in triplicate (once on the way in, once during and once on the way out). :o

I was debugging something and left too many logging points in place - it will hopefully explain the slow response you are seeing. I've pulled it back now and I'll gradually reduce all logging as I tie up loose ends.

mvallevand
2011-03-23, 01:46 PM
I'll email you later about the radio channels - do you mean no EPG data at all? I'm not too worried about subtitle/description missing but I assume they have start/end times and titles etc???

Nothing, they aren't in the EPG_EVENT table. There is no XMLTV schedule data and there is no EPG data broadcast for clear QAM.

Martin

bgowland
2011-03-23, 02:25 PM
I've put some new uploads on the wiki page. v1.2.11 of the nDroid client and also an associated nDroidService update (1.1.4099.23439) hopefully to fix problems with importing 'Manual' scheduled recordings data at the nDroid end.

Please update both for this to work.

Cheers,
Brian

BrettB
2011-03-23, 02:46 PM
I might even include a Windows installer for the service and nDroid client updates via the App Market. :)

+1 for the App Market. AT&T locks my phone and limits me to only apps from the App Market or installed via debugging via usb. When I tried to just reinstall (rather than uninstall and then install) the last version, it wouldn't let me do it via the usb connection because it was already installed. (There may be a work around, but I just took the easy route and uninstalled/installed.) Just installing directly from the App Market would be nice.

bgowland
2011-03-23, 03:56 PM
AT&T locks my phone and limits me to only apps from the App Market or installed via debugging via usb.Interesting to know. I always figured that distributing the app through the forums or the wiki might make things a little difficult depending on user experience or, in your case, limitations on your phone.

One downside I can see from using the App Market is somebody randomly stumbling across it when searching for something else then not having the slightest idea what the hell they just installed. :D

I will be putting it up on the Market fairly soon though.....oh, free of charge of course. :)

mvallevand
2011-03-23, 10:58 PM
Brian, good news, .11 fixes the slow load problem on startup and between channels, but the initial load does take 3+ minutes with two Force Close/Wait dialogs.

Martin

bgowland
2011-03-23, 11:37 PM
Brian, good news, .11 fixes the slow load problem on startup and between channelsGood to hear, at least it's a step in the right direction.


but the initial load does take 3+ minutes with two Force Close/Wait dialogs.I received your email and I'll look into this now. The initial load should be handled on a background thread so shouldn't cause those sort of dialog messages but I've a feeling I misplaced something along the way in a recent change.

Nistrod
2011-03-24, 04:41 AM
Wishlist: Help ... About to get the version (maybe the service version too?)

bgowland
2011-03-25, 09:38 AM
Wishlist: Help ... About to get the version (maybe the service version too?)Done. Part of a 'status' / 'info' part that I've been planning. Pretty minimal at the moment though room for expansion. :)

Nistrod
2011-03-27, 10:14 PM
OK, several problems:

1) nDroid didnt update its idea of "Today". I had to Force Stop it to get it to register that a day had passed and "Today" was now the next day. This was despite several Update Guides.

2) I have blank days at the end of the week. Clearly its not downloading the guide correctly or maybe at all. Yesterday, it was only missing one day, but its now two. There is no error given - it looks OK. How can I check if the guide downloaded correctly?

3) It failed set a recording of a show - just saying "Unable to set recording" (or some such) with no obvious reason. Nothing in the logs. Its not consistent - I can record shows this morning.

4) When I record a show, it does not go red until I change channels and change back. Similarly when I Cancel those shows.

Nistrod
2011-03-28, 01:19 AM
2) was fixed by restarting the service.

4) Is also fixed if I scroll the show off the screen and back on.

bgowland
2011-03-28, 02:56 AM
1) nDroid didnt update its idea of "Today". I had to Force Stop it to get it to register that a day had passed and "Today" was now the next day. This was despite several Update Guides.Ironically I think the original v1.x version handled this better. Android apps are meant to 'remember' their last state in order to cope with things like incoming phone calls etc The original didn't remember very much so updated everything on every change - 'improvements' I've made to follow the model mean I think the current version is remembering too much and not updating as often as it should. I'll look at this ASAP.


2) I have blank days at the end of the week. Clearly its not downloading the guide correctly or maybe at all. Yesterday, it was only missing one day, but its now two. There is no error given - it looks OK. How can I check if the guide downloaded correctly?Did you see the bit on the wiki page about setting PostUpdateEpg.bat to force the service to generate a new epg file when npvr does its daily update? I didn't document this properly early on so apologies for the confusion - it should fix the available EPG data.


3) It failed set a recording of a show - just saying "Unable to set recording" (or some such) with no obvious reason. Nothing in the logs. Its not consistent - I can record shows this morning.There would have been something in the Android logcat but that's water under the bridge now. If there's nothing at all in the service logs then that suggests a connection wasn't established. Another thing on the ideal todo list is to have a background retry for recording requests (it's in the pipeline).


4) When I record a show, it does not go red until I change channels and change back. Similarly when I Cancel those shows.Yes, I get varying results with this - normally I just touch/hold the screen and move up/down and it will appear after a few seconds. Something in the list update code I need to look at.

Thanks for the feedback. I've had a few things that have side-tracked me over the past few days but I've been working on some updates. Hopefully I'll have a new version soon.

marcuswar
2011-03-28, 09:00 PM
GR8 to see that nDroid is now downloading channel icons includings gifs... but... its doesn't seem to change the icon when I choose a different channel, it always changes to the placeholder graphic. I have to come out of nDroid and then relaunch to get it to update the channel icon.

Marcus

bgowland
2011-03-28, 10:49 PM
GR8 to see that nDroid is now downloading channel icons includings gifs... but... its doesn't seem to change the icon when I choose a different channel, it always changes to the placeholder graphic. I have to come out of nDroid and then relaunch to get it to update the channel icon.OK, thanks - I think I've found what's going wrong. Will fix for the next release.