Currently I'm in the process of updating my application to work with Android API 30 to comply with Googles new Privacy Rules. Prior to this I was using the "Use legacy storage" flag so I could access Public storage with ease once Read/Write permissions were achieved, however that's no longer available in the latest API.
For a temporary workaround I am using ACTION_OPEN_DOCUMENT_TREE or Intent.ActionOpenDocumentTree (In Xamarin) in order to gain read / write access to the device bluetooth folder (It has to be this folder as that's where im looking for the specific files).
Whilst this method works, it's not ideal for a regular user as it requires them to actually search and find the folder instead of just getting a pop up asking for access.
What the process currently looks like #1
What the process currently looks like #2
What the process currently looks like #3
Ideally what I'm after is Image 3 to be the only interaction the user has to perform in order to give access to this particular folder. However Xamarin Documentation isn't particuarly clear (Especially on these new storage API's) and was hoping someone could help point me in the right direction!
Any help would be greatly appreciated thanks :)
I am currently working on my school project - Android app that informs you about strong lightning strikes near your house in real time.
There are some websites like blitzortung.org or lightningmaps.org (or other), any ideas how can I get nice output file from one of these sites, so that I can obtain geographical data, determine whether it is near your house or not, and send a push notification for user? Displaying the strikes on the map are not needed.
I am using an Android Studio, Visual Studio 2015 as well as MS SQL database.
Thanks
You can get complete source code for this from following URL
https://github.com/wuan/bo-android
It's using data from lightningmaps.org
You can give a try to Open Weather or check this answer.
For Push you can use FCM. Just google "How to implement GCM in android?" you will whole lot of help.
According to blitzortung forum:
Please remember that Blitzortung data may not be used for commercial
purposes. General operator data access info: login to your main
Blitzortung Org account, and click the 'compendium' link under
'project area'. If you haven't already, you might also see
http://www.lightningmaps.org/doc/intro
My goal is not to clutter blobs.
• I am using latest webjobs sdk at the time of writing (ver 1.1.1). Using Queues, running WebJobs, creating files, deleting files and writing database entries.
• I tried searching but it seems that "azure-jobs-host-output" and "azure-webjobs-hosts/output-logs" are automatically created and filled with lots of stuff.
• My effort so far after searching through web is just this one line of code I have written in order to stop some logging:
config.Tracing.ConsoleLevel = TraceLevel.Error;
This is supposed to restrict logs to error level. Which is good I understand but I am not sure which one of the above will it restrict.
• Can I disable the other one completely?
• Or more precisely, can I stop/disable all logging/logs and bring it to bare minimum, to only the ones which are absolutely necessary to run webjobs sdk?
Thanks for reading, any help is highly appreciated.
Setting config.Tracing.ConsoleLevel only controls output written to the Console. It sounds like you want to turn off Dashboard logging (if you don't want to use the WebJobs Dashboard). Those additional blob containers that you mentioned are the storage for all the Dashboard analytics logs. To disable that, you can set config.DashboardConnectionString to null. That will completely disable all Dashboard logging.
At that point, you'll be running with the bare minimum :)
Migrating (rewriting) a whole portal originally made in .net to shareopoint doesn't seem like a very easy thing to do.
I've been assigned such task and now i'm just learning, planning and starting to get things practical in order to accomplish it faster.
It's not exactly a question, it should be a discussion about it and may help others who might get to do the same job further on.
1 - There's something like a "message board" in the current portal, which i'm planning on building with a blog site kind, what do you sugest?
2 - as asked in another question, i have to manage users, and the local active directory is organized and reliable, so i guess that's what i'm going to use
3 - There's got to be a way to store files, images, documents and having version controlling in some of them.
4 - There's got to be a customization in design and a cleaning in the default controls of sharepoint masterpage (which may be useless for the desired purposes)
5 - About 30 local users and being accessible from the internet (local server) in case our consultors have to access it from clients
6 - i have available a version of the Visual Studio 2010 (already with the graphical webpart designer) because the company i work is MS gold partner.
7 - I'm going to program webparts in c#, and the designing part is still a mistery to me, since i'm not that familiar to shareopint yet.
I'd like some tips, links and answers.. i'm going to be watching this question from now on and answering any other information.
1.) SharePoint 2007 has some blog/wiki/board functionality but it's very immature. I tried to get my team to use them but the user interface is lacking and it is challenging to enhance those elements. SP2010 might offer a better experience though.
2.) User management in SharePoint is easy to perform but difficult to manage. Establish processes for adding/modifying end users and keep the number of people with that ability to a minimum. Otherwise it gets out of control and you end up not knowing who has access to what. I would also suggest relying on AD groups as opposed to giving individuals specific access in sites.
3.) Document storage is SharePoint's forte, I think you'll be impressed.
4.) SharePoint branding will require some time but other people have it down to an art form. Note that some pages (referred to as Application pages) shouldn't be fully controlled. Also note that you don't want to remove controls from the master page as some functionality in SharePoint assumes the controls are there - rather it is better to hide them using CSS.
5.) This sounds like a bad idea. SharePoint exposed to the Internet is supposed to be severely locked down - but if you lock it down (i.e. remove access to Application pages), the functionality that you seek won't be available. Have you considered an intranet and separate extranet?
6.) Should be okay, VS2010 is supposed to be a better development experience with regards to SharePoint.
7.) Keep your branding and functionality separate and be sure to deploy them using solution files (as opposed to working directly with the file system). Also, never ever read/write the database directly.
I think you'll find that replacing a custom intranet with SharePoint is a common task but there will be a learning curve. The hard part will be branding and data migration. End users will reject the new system if it is slow - so be sure to get the architecture and configuration right before launch (might require a consultant).
1 - There's something like a "message
board" in the current portal, which
i'm planning on building with a blog
site kind, what do you sugest?
SharePoint discussions are perfect for what they are intended ... small targeted discussions. A forum is very different. It is a centralized area with multiple threads with different topics. You can try CodePlex (which is your friend)
SharePoint Forums
2 - as asked in another question, i
have to manage users, and the local
active directory is organized and
reliable, so i guess that's what i'm
going to use
AD is perfect if you already have it ... nice thing is that you can use the Profile page to update AD information which syncs ... you have a lot of capability with this. But, one of the main benefits is that SharePoint can support multiple authentications. You can extend a SharePoint site and plug in a different authentication (like SQL Auth) and then multiple sets of users can interact on the same sites with different permissions. Not to mention that SharePoint doesn't just provide site access but you can make security granular all the wat down to individual items in a list or library.
3 - There's got to be a way to store
files, images, documents and having
version controlling in some of them.
This is where SharePoint has the most capability OOB.
4 - There's got to be a customization
in design and a cleaning in the
default controls of sharepoint
masterpage (which may be useless for
the desired purposes)
We have a completely customized MasterPage complete with code behind. You need to know about Feature Stapling and Feature Receivers. Also use Heather Solomon's website
5 - About 30 local users and being
accessible from the internet (local
server) in case our consultors have to
access it from clients
SharePoint seems almost overkill for this number of users.
6 - i have available a version of the
Visual Studio 2010 (already with the
graphical webpart designer) because
the company i work is MS gold partner.
Get the Visual Studio Extensions for SharePoint
7 - I'm going to program webparts in
c#, and the designing part is still a
mistery to me, since i'm not that
familiar to shareopint yet.
Look into Application Pages instead of WebParts ... Application pages are way more flexible for custom forms than web parts. Web parts are only usefull for when functionality needs to be available on an ad hoc basis so that you can allow users to drag the functionality onto a page or if you need to restrict functionality to specific sets of users (since layout pages are available to all sites).
The answers to this person's similar but not identical question may be helpful: Sharepoint for a C# Asp.net Developer
There's a lot of help available in other existing SO questions. Just click on the "sharepoint" tag, then sort by votes, and you'll find a lot of interesting reading.
Regarding 7 - Programming web parts:
Have a look at SmartPart on CodePlex. This is a fairly easy way to create simple web parts especially if you have some ASP experience.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am working on a project right now that involves receiving a message from another application, formatting the contents of that message, and sending it to a printer. The technology of choice is C# windows service. The output could be called a report, I suppose, but a reporting engine is not necessary. A simple templating engine, like StringTemplate, or even XSLT outputting HTML would be fine. The problem I'm having is finding a free way to print this kind of output from a service. Since it seems that it will work, I'm working on a prototype using Microsoft's RDLC, populating a local report and then rendering it as an image to a memory stream, which I will then print. Issues with that are:
Multi-page printing will be a big headache.
Still have to use PrintDocument to print the memory stream, which is unsupported in a Windows Service (though it may work - haven't gotten that far with the prototype yet)
If the data coming across changes, I have to change the dataset and the class that the data is being deserialized into. bad bad bad.
Has anyone had to do anything remotely like this? Any advice? I already posted a question about printing HTML without user input, and after wasting about 3 days on that, I have come to the conclusion that it cannot be done, at least not with any freely available tool.
All help is appreciated.
EDIT: We are on version 2.0 of the .NET framework.
Trust me, you will spend more money trying to search/develop a solution for this as compared to buying a third party component. Do not reinvent the wheel and go for the paid solution.
Printing is a complex problem and I would love to see the day when better framework support is added for this.
Printing from a Windows service is really painful. It seems to work... sometimes... but finally it craches or throws an exception from time to time, without any clear reason. It's really hopeless. Officially, it's even not supported, without any explanation, nor any proposal for an alternate solution.
Recently, I have been confronted to the problem and after several unsuccessful trials and experimentations, I came finally with two viable solutions:
Write your own printing DLL using the Win32 API (in C/C++ for instance), then use it from your service with P/Invoke (works fine)
Write your own printing COM+ component, then uses it from your service. I have chosen this solution with success recently (but it was third party COM+ component, not own written) It works absolutely fine too.
I've done it. It's a pain in the A*s. The problem is that printing requires that GDI engine to be in place, which normally means that you have to have the desktop, which only loads when you're logged in. If you're attempting to do this from a Service on a Server, then you normally aren't logged in.
So first you can't run as the normal service user, but instead as a real user that has interactive login rights. Then you have to tweak the service registry entries (I forget how at the moment, would have to find the code which I can do tonight if you're really interested). Finally, you have to pray.
Your biggest long term headache will be with print drivers. If you are running as a service without a logged in user, some print drivers like to pop up dialogs from time to time. What happens when your printer is out of toner? Or out of paper? The driver may pop up a dialog that will never be seen, and hold up the printer queue because nobody is logged in!
To answer your first question, this can be fairly straight forward depending on the data. We have a variety of Service-based applications that do exactly what you are asking. Typically, we parse the incoming file and wrap our own Postscript or PCL around it. If you layout is fairly simple, then there are some very basic PCL codes you can wrap it with to provide the font/print layup you want (I'd be more then happy to give you some guidance here offline).
One you have a print ready file you can send it to a UNC printer that is shared, directly to a locally installed printer, or even to the IP of the device (RAW or LPR type data).
If, however, you are going down the PDF path, the simplest method is to send the PDF output to a printer that supports direct PDF printing (many do now). In this case you just send the PDF to the device and away it prints.
The other option is to launch Ghostscript which should be free for your needs (check the licensing as they have a few different version, some GNU, some GPL etc.) and either use it's built in print function or simply convert to Postscript and send to the device. I've used Ghostscript many times in Service apps but not a huge fan as you will basically be shelling out and executing a command line app to do the conversion. That being said, it's a stable app that does tend to fail gracefully
Printing from a service is a bad idea. Network printers are connected "per-user". You can mark the service to be run as a particular user, but I'd consider that a bad security practice. You might be able to connect to a local printer, but I'd still hesitate before going this route.
The best option is to have the service store the data and have a user-launched application do the printing by asking the service for the data. Or a common location that the data is stored, like a database.
If you need to have the data printed as regular intervals, setup a Task event thru the Task Scheduler. Launching a process from a service will require knowing the user name and password, which again is bad security practice.
As for the printing itself, use a third-party tool to generate the report will be the easiest.
This may not be what you're looking for, but if I needed to do this quick&dirty, I would:
Create a separate WPF application (so I could use the built-in document handling)
Give the service the ability to interact with the desktop (note that you don't actually have to show anything on the desktop, or be logged in for this to work)
Have the service run the application, and give it the data to print.
You could probably also jigger this to print from a web browser that you run from the service (though I'd recommend building your own shell IE, rather than using a full browser).
For a more detailed (also free) solution, your best bet is probably to manually format the document yourself (using GDI+ to do the layout for you). This is tedious, error prone, time consuming, and wastes a lot of paper during development, but also gives you the most control over what's going to the printer.
If you can output to post script some printers will print anything that gets FTPed to a certain directory on them.
We used this to get past the print credits that our university exposed on us, but if your service outputs to a ps then you can just ftp the ps file to the printer.
We are using DevExpress' XtraReports to print from a service without any problems. Their report model is similar to that of Windows Forms, so you could dynamically insert text elements and then issue the print command.
I think we are going to go the third party route. I like the XSL -> HTML -> PDF -> Printer flow... Winnovative's HTML to PDF looks good for the first part, but I'm running into a block finding a good PDF printing solution... any suggestions? Ideally the license would be on a developer basis, not on a deployed runtime basis.
In answer to your question about PDF printing, I have not found an elegant solution. I was "shell" ing out to Adobe which was unreliable and required a user to be logged in at all times. To fix this specific problem, I requested that the files we process (invoices) be formatted as multi-page Tiff files instead which can be split apart and printed using native .NET printing functions. Adobe's position seems to be "get the user to view the file in Adobe Reader and they can click print". Useless.
I am still keen to find a good way of producing quality reports which can be output from the web server...
Printing using System.Drawing.Printing is not supported by MS, as per Yann Trevin's response. However, you might be able to use the new, WPF-based, System.Printing (I think)