Can i insert a some code in HTML to set android wallpaper - java

This would be my first post ever on stackoverflow.com
I have found many many of the answers to my questions but this one question i cannot figure out.
I know that it is possible to invoke few android commands via either java code or other html code and was wondering if it is possible for a my website to set an image on my site as their wallpaper on their android phone.
To better explain this is what im doing.
My website will have say for example 50 images of something and when the user clicks on one of those photos the website will ( if possible ) invoke the android " set as background " Process.
Currently it is set to just download to their phone and then the user goes and selects the photo as their wallpaper from their download folder on their phone.
Thank You in advance
Vick S.

Interesting question. In Android, java runtime environment is what being run inside OS, and in order to execute commands you wish to make, rooting to OS is only way, and this can be done in java. So, if I were in your shoes, I'd drop the idea of rooting command line to android via HTML - but look over onto java side.
In other words...yes, it is possible. But, end-users will already have their phone/mobile pre-set to guard against that rooting commands, but to ask for permission from owner. If owner clicked yes, then you are in game. The hardest part about this is the complexity requiring bunches of efforts to code such rooting functions.
But, this could something as a starting point, at least? Running Shell commands though java code on Android?
Good luck!

Related

How to see and send commands to minecraft server without typing them

I have a tlauncher (cracked Mincraft) player, and I play on cracked minecraft servers.
I put a request here is because what I want to do is, to earn money players sell blaze rods by click on the gui which is opened when we type /shop command.
Now what I want is to get the line of code which my tlauncher player sends to the server when I click on the sell blaze rod button, and then I want to send that command to server without opening the GUI.
So what I want to know is "what is going on the backend". I have no idea of what to do here. I am a python developer but I have a basic Idea of java, I don't know anything in minecraft java development.
You question seems too board. I suggest you multiple things :
Search a mod that have a config to run a command when you say something in chat. Possible to don't find something.
Create your own version of minecraft such as suggested here. Require lot of Java skill
Use forge, and just make a mod. You can follow tutorial like this one. Require some Java Skill
You should listen for event, in your case it seems to be ClientChatReceivedEvent. Then, run this code:
MinecraftServer.getServer().getCommandManager().executeCommand(player, "shop")
Use fabric, and add all features that you want. You can follow tutorial like this one. Require some Java Skill
To listen events, you should take a look here.

What are steps to make a program which will protect my tutorial video from being copy?

I made some video tutorials which customer can buy them from my website and i will send videos on DVDs to them .
But they will copy my video and give to each other without any more paying!
I want to write a program which keep my videos safe just in these type of problem ( I know they can capture screen !) .So what are the steps?
(as a detail i can write code in C# , JAVA for windows side and PHP for server side)
(because DVDs are note long lifetime i prefer to install my videos inside a program on their computer)
( I already can write Android application for this problem because android has some safe directory to put my data which user has not access to that directory .what i want is same thing on windows)
I expect the way which install my program on a single computer which user must active his/her program with serial key (which check through internet api).
Then I expect my video won't show regularly like *.mp4 to user ! ( should i put my video to a database ?!)( or encrypt them ? )
make your website where people can subscribe and only watch your tutorials videos whenever they want but not download them, like lynda.com etc. Its not easy but if you want to protect your videos, you have to do it.

Java ME on Siemens CX70

I have very old Siemens CX70 in working state and just don't want to throw it out. My idea is to use its math power and peripherals (GSM module, USB, Camera and screen) to build some simple applications for home use (multichannel termometer, timer and cheap security system - for examples).
I know I should use Java ME and IDE (I love Netbeans, for example). Can you tell me what I need more to start developing? I know Java well, I just need to make an environment to developing, debug and deploy. Mobile library documentation will be very helpful too.
Thanks.
There are so many online tutorials about this topic that the only right thing to do is to refer you to google.com
Search after "getting started with j2me".
However, there's something else you should know upfront before getting too excited.
The security model in JavaME will prevent you from doing much useful stuff, in relation to some of the things you mention.
Every time you try to access certain things in the phone, like e.g. the camera, or send SMS, or read/write a file on SD card, etc etc - the phone will show a popup "This app is trying to access camera. Allow this?". And the app will only continue after a manual click on Yes.
As you can imagine, this of course renders a lot of ideas useless.
In order to prevent these popups, you can sign your app with a certificate you buy from Thawte or Verisign. But as that'll cost you $300 a year, it's not the way most sparetime hobby developers chooses.
Personally, I found another way, but it requires you to use a phone from Sony Ericsson.
Because the old Sony Ericsson phones can be patched in order to remove the Java security. After doing this on one of my old phones, I've been having fun making apps like the ones you mention. For example, an app that keeps an eye on my home when we're out, by taking a picture every second. If it detects a difference in the picture, it sends me an MMS with the picture. :-)
I have searched a long time for patching options for other brands, but I just can't find anything useful. Nokia should supposedly also be patchable, but I just can't find anything useful about it.
So in short: If you'd like to make some sparetime hobby apps on a phone like that, you should either find a Sony Ericsson phone and patch it - or go dig up an old used Android device.
Good luck.

Web app needs to communicate with serial port

I'm writing an application that needs access to a serial port (it's a credit card reader). I'd like to be able to read and write to the port. The following seems like it would let me do exactly that: http://www.activexperts.com/serial-port-component/howto/html/. However, this deals with ActiveX/COM which means I'm tied to Windows.
Any better solutions for me? Would be nice if the solution would work on multiple platforms, not just Windows.
I'm using PHP.
Does the device emulate a keyboard? You'd be much better off getting the user to position the cursor inside a textbox (or putting the cursor there programmatically) and swiping the card if that's the case.
I spent a lot of time writing a userspace driver in C for a Magtek Mini-Mag card reader only to realize years later that it was academic more than anything. I mean we used the code, only if we'd have gone with the keyboard solution there would have been tons of time to focus on other things.
For the Mini-Mag the USB/HID support in the kernel would recognize the device, hopefully there's something similar for the device you're getting.
Also, Windows has it's own variant of USB/HID so the 'treat it as a keyboard' solution works pretty much out of the box for devices that act that way.

how does android understand which home screen is being viewed by the user?

I wanted to understand how does the Android OS figure out which home screen the user is viewing currently and render the appropriate icons and widgets on that screen based on the user's left or right swipe on the touch screen of the device.
The OS must save a state of the screen and IDs or something relative to the objects placed on the screen to retrieve the state each time the screen becomes visible.
From my research I understand that Android OS treats all the 7-8 homescreens on devices as one single host.
Also my question might seem vague, but the reason why I am asking is because it seems reasonable that app widgets on android devices, update not only when the phone is awake but also only when the app widget itself is visible. I know that Google has declined the enhancement request by many others but I don't think that is good enough. Link here.
That is the reason why I am trying to give it a shot to understand and implement it for my app with whatever Android knows about the state of the home screens.
Any help or insight is much appreciated. Also the experts out there let me know if you think this can be even implemented for one off apps at all?
Well, as the link you posted clearly states, there's no way to know.
Also, if you consider the fact that "Home" is just an application like all the others, it makes even less sense to have a unified API for that. A lot of people use Launcher Pro or similar applications, which would probably not implement it.

Categories