I need one or more approaches to realize the following scenarion:
Let's say we have a windows application (a journal) where journal entries are serialized as XML.
The application is on a usb stick and also the XML file.
The main problem is: no one should be able to write/delete the usb stick except the application itself.
I've read about usb sticks with mechanical or software write lock. But this would also disallow the application to write?!
I'm happy about any approaches.
p.s. It would be a .NET 3.5 WPF Application. But I think that doesn't matter the problem.
Thank you in advance
An idea would be two use 2 partitions. One readonly partition (there should be tools out there that can create cdfs partitions) with your application on it and another secured with a password only known by your App. Possibly Truecrypt or some other partition encryption tools have the needed feature.
Related
I’ve been following various articles and answers regarding saving
API keys / password / strings still havent gotten specifically that i have been searching.
The idea is to save KEY in a form of string in Xamarin.Form
where the KEY can be accessed while debugging
but should not be exposed if reversed engineered an APK or IPA file.
Stated by one of my colleague ‘Gradle’ used to do similar in android native
yet am unsure on it and where do i get it working in Xamarin.Forms with respect to iOS and Android
Any information related would be much helpful
Your best bet is to make use of SecureStorage this will use the platform specific secure stores to store the data you provide.
As pointed out in comments you should always operate under the assumption that someone will be able to gain access to your code and reverse engineer it. Using the secure stores per platform will require that anyone accessing the device will be able to unlock it via PIN or biometrics, depending on the device.
I am using dotSpatial labrary in c#, I only can read realtime data.
but my problem is this.. how could I extract gps data storaged in my usb-gps device (it is passive gps)?
device information
brand : landairsea
Model: Gps Tracking Key
webPage: http://www.landairsea.com/gps-tracker/gps-tracking-key
From looking at their user guide:
http://www.landairsea.com/downloads/past-track-10.pdf
You could use the past-track software to save the stored data as .las format.
I believe that DotSpatial has a LIDAR plug-in that can read .las files:
Dotspatial.Plugins.LiDAR
If you are asking how to write a C# replacement for the Past-Track program that connects directly to the USB however, I don't know exactly.
DotSpatial has a positioning library that is DotSpatial.Positioning that was originally ported from http://geoframework.codeplex.com/. It is possible that this utility will have the capability to connect to your device, but I think it would probably only support a limited subset of GPS devices, and I never used it myself at all.
Hopefully that information is a little helpful though and will point you in the right direction.
Edit:
I have downloaded the Past-Track 10 software that is designed to retrieve data from the unit. This in turn installed Antaris4 and u-blox5 USB drivers. I think this is half of what you will need to write a C# app that can talk to your GPS and do things in code. You can find the drivers on the web. I think I found it here:
http://www.driverguide.com/driver/detail.php?driverid=1869444
But make sure you find a version of the driver that matches your PC configuration (32/64 and correct operating system). Incidentally, that will probably mean you will need to make x86 and x64 builds for your C# app.
The next step is to find some documentation for it and then attempt to use the drivers from C#. So far I haven't found a good document showing how to work with the drivers, but I'm sure it exits. I will update with a link when I find it.
I'am programming a Windows 8 Store App (Metro Design) with C# and XAML using Visual Studio 2012.
There is no need for a database server with multi user support etc.
I want to store my data in a local database and don't know which database is suitable for my needs.
Maybe SQLite? Or are there solutions that fits better for Windows Store Apps and integrates better in Visual Studio?
The app is kind of a calender and the database should store the user data that consists of the dates, tasks and so on.
SQLite is supported for WinRT.
http://visualstudiogallery.msdn.microsoft.com/23f6c55a-4909-4b1f-80b1-25792b11639e
SQLite is the recommended database to be used for Win 8 Apps.
Links for implementing the same
http://timheuer.com/blog/archive/2012/08/07/updated-how-to-using-sqlite-from-windows-store-apps.aspx
http://code.msdn.microsoft.com/windowsapps/Using-SQLite-Asynchronously-b8372137
https://visualstudiogallery.msdn.microsoft.com/23f6c55a-4909-4b1f-80b1-25792b11639e
Ok, this is a great question that I had to learn the hard way. By default WinRT applications do NOT have access to, directly at least, to any type of database structure. This means no Express, Compact, CE, SQLite etc.
There are three ways around this. Do not use a database and instead use a local file structure where you store and retrieve your data. XML works very nicely with this because you can maintain many of the same features a database would give you.
The second option is to use IndexedDB. It is similar to a cookie style local storage model where files are saved in your apps local apps folder.
The third and final option is to use web services. WinRT does have access to the internet which means you can write API and WebServices that can be called. This does mean that you need to have a server running which is connected to a master database. When your app needs data it calls your web service and obtains what it needs.
Overall, for the application you are describing the first option may best suite your needs. Keep a local XML file in your apps folder and read/write from it.
My question was marked as a duplicate of this question (although it was about C++ not C#). I thought I should still post my findings here. C++ apps have another alternative:
Extensible Storage Engine (ESE)
The list of all such API available for Store apps can be found on this link under the section Jet.
As one of variant:
Devart LinqConnect for Metro – a fully-functional high-performance ORM solution for developing Windows Store applications using either of LINQ or ADO.NET to access data.
http://code.msdn.microsoft.com/windowsapps/A-Simple-Windows-Store-85f29843#content
or next link can be usefull to
http://social.technet.microsoft.com/wiki/contents/articles/18417.windows-store-app-with-a-sqlite-database.aspx
I would like to have a lot of data (quotes of famous people, arround 100 k quotes). And I want that users are able to search, sort on category and sort on authors.
Got a big big xml file at the moment, but what is smart to do? How can i get all the quotes in the app? maybe a sql lite database? or just loop the xml when app starts?
Any tips are most welcome!
Kevin
UPDATE: Thanks for all the replies and tips, I really appreciate it and I am looking forward to program my App, did make a runkeeper-like app yesterday, now starting the quotes app.
I would recommend storing this data on a webserver somewhere and using some SOAP interface of something like this, to access it. I wouldn't be positively surprised when a downloaded application all of a sudden decides to download a big file of quotes.
I would recommend a SQL CE database (.sdf file)
Great overview here: http://windowsphonegeek.com/tips/Windows-Phone-Mango-Local-Database%28SQL-CE%29-Introduction
And here: http://msdn.microsoft.com/en-us/library/hh202860%28v=VS.92%29.aspx
There's no SQLite on WP7. There's SQL Server Compact though. Read up on the latter, and also on LINQ. WP7.5 only.
Alternatively, store data on the Web server, and use a service to pull it on demand. In that case, read up on services and SOAP.
With the fact that you are looking at a 500mb file I think you have a couple of options.
1) Put all of this data in a database on a webserver, then have your phone application use whatever method you like to contact the database to get specific data that is needed. Obviously your UI would have to be optimised to allow a user to sort by the type of quote and / or the person to whom the quote is attributed.
2) If you want this to be done without the use of the webserver you could have a stripped down basic database of quotes in the application itself, to extend this connect to the database and download more data.
This method may be best as it lets you use the database data to say populate a website if you wanted to (make a bit of money from ad revenue / promote your app) and also it means if your users dont have an internet connection they can still get some use from your app.
Without more knowledge of the platform I couldnt say what would happen if you try load a 500mb application but I doubt it would be good, though having such a large file locally is a bad idea for a mobile device. I can see this going two ways.
1) Im out and see your application, I set it downloading, pay it no attention and then later check to find it has downloaded 500mb over my mobile phone data package. This could mean a big bill.
2) I start to download your application, it hasnt finished downloading after 10mins, I delete it and dont bother trying again.
You can do something like let the user to enter three character minimum before search from webservice ans user the service result to bind the data.
Check the following links
How to connect to a Webservice from a Windows Mobile Device 6.0
http://msdn.microsoft.com/en-us/library/aa446547.aspx
Let me know if this helps.
Let's say I'm writing a eBook reader for Windows Phone 7. Now the first thing that the user will need to do is add some books to his device, and since I don't offer a online book store or similar service, the only option is file transfer from his PC to the phone. Is he able to do this, how? Then how do I access this file. Can this file be placed in Isolated Storage of my app? I was searching around and didn't find any solution, in fact I believe that similar scenario is currently impossible but I just wanted to hear your toughs on the problem and probably some workaround ideas.
I haven't seen any way to add files from the desktop the phone is connected to. However, you can build your own software for the desktop that uses a WCF service and allows connections from the phone. The phone can download files from the desktop WCF service. See a similar concept here, you can implement the concept discussed in the post the other way round.
HTH, indyfromoz
Would you not be able to download the ebooks using some kind of webservice/http?
(Obviously you'll need a website, somewhere for this)