Generate date + time and copy to clipboard? - Android Q&A, Help & Troubleshooting

Hello
I know nothing about writing applications for Android: What is the simplest way to create an applet that will simply...
1. generate the date and time as "[YYYY-MM-DD] ",
2. copy this string the clipboard
3. display an OK dialog just to confirm that it worked?
Since I know nothing about development on Android and Java, I'd like something that won't take me days to get up and running. Could I get this done in B4A within a day?
Thank you.

FreyrNjord said:
Hello
I know nothing about writing applications for Android: What is the simplest way to create an applet that will simply...
1. generate the date and time as "[YYYY-MM-DD] ",
2. copy this string the clipboard
3. display an OK dialog just to confirm that it worked?
Since I know nothing about development on Android and Java, I'd like something that won't take me days to get up and running. Could I get this done in B4A within a day?
Thank you.
Click to expand...
Click to collapse
You could do this in 2-3 hours

Questions should be asked in Q&A forums, not Development forums.
Thread moved.

Related

SmartBoot - Bootmanager for WM6.5 .NET3.5

Hi guys,
as I've been around for a while, I decided to share a bit of my work with you, too.
So feel free and use this small program if you like. No warranties as usal from my side.
This Bootmanager has a quite intuitive UI. You get an quick overview of the phone status and can select your boot profiles which you can manage inside the UI as you like (see screen shots below).
Additionally you can have voice announcements, SenseUI control, easy backup & restore of startup folder and program settings and an extended information screen. On this info panel you can find all important information about your phone.
This app only requires .NET CF 3.5 to be installed on your device.
The Pattern of the folder structure is always "\_AutoStart_" & selected Foldername. You can change the folder names in the UI settings tab. The folder "_AutoStart_Backup" is created by the program if you back up your current folder. All other "_AutoStart_" & X folders are created initially, but you want to choose which startup links are in there (folder names are case sensitive!). Just ensure the "X" matches your folder name in the ui settings for this specific button exactly. The default buttons are for Sense UI and XDAndroid. Their respective folder names (in the settings tab) are "Sense" and "Android", therefor I have "_AutoStart_Sense" and "_AutoStart_Android" folders on the root of my phone. In the "_AutoStart_Common" folder you have all the shortcuts which have to start no matter which profile is selected.
Tipp:
I have overclocked my device continously (stable) using this method (with this App) and with SmartBoot I can easily select between OC and non-OC configurations.
For your convenience this Windows MobileĀ® freeware app supports AppToDate, an easy to use application update program. You can obtain it freely from here.
Please download from Post #2.
Thanks to eboelzner for his great Sense SDK!
Download:
Download SmartBoot only here please. (Please no mirrors or similar!)
Please feel free to leave a comment or bugs found.
PS: I will not provide any localization support. Just english language.
If you want I can create a "Light" Version without sounds and stuff, just mention it.
Also if there is demand for it I could create a step-by-step guide.
AndiCP said:
Download:
Download SmartBoot only here please. (Please no mirrors or similar!)
Please feel free to leave a comment or bugs found.
PS: I will not provide any localization support. Just english language.
If you want I can create a "Light" Version without sounds and stuff, just mention it.
Also if there is demand for it I could create a step-by-step guide.
Click to expand...
Click to collapse
Would be nice if we could download it from there. Tried for 30 min but not possible.
claus1953 said:
Would be nice if we could download it from there. Tried for 30 min but not possible.
Click to expand...
Click to collapse
Downloaded just fine for me. I plan to experiment with Android soon, and this will come in handy. Thanks.
J_M_H said:
Downloaded just fine for me. I plan to experiment with Android soon, and this will come in handy. Thanks.
Click to expand...
Click to collapse
Still no luck for me, it says "site not available or too busy etc etc"
wow
AndiCP said:
Hi guys,
as I've been around for a while, I decided to share a bit of my work with you, too.
So feel free and use this small program if you like. No warranties as usal from my side.
This Bootmanager has a quite intuitive UI. You get an quick overview of the phone status and can select your boot profiles which you can manage inside the UI as you like (see screen shots below).
Additionally you can have voice announcements and an extended information screen. On this info panel you can find all important information about your phone.
This app only requires .NET CF 3.5 to be installed on your device.
I wanted to give the community something back, even though it is not much.
But maybe somebody finds it useful, I just thought I could share. Enjoy!
And please don't be too harsh as this is my first publication. There are more to come if it goes smoothly.
Please download from Post #2.
Thanks to eboelzner for his great Sense SDK!
Click to expand...
Click to collapse
big thank
Thanks, good idea & pretty app. I'll try it.
thanks, look like a very powerful and useful program.
downloading is a bit slow, but smooth.
This promises to be a great app.
Would you consider adding a "safe mode" boot option with it? Just wondering.
And thank you very much for sharing.
hello guys. what is XDAndroid? sorry for being a noob
Thank you for your kind feedback
YOSEFE said:
This promises to be a great app.
Would you consider adding a "safe mode" boot option with it? Just wondering.
And thank you very much for sharing.
Click to expand...
Click to collapse
You currently have two options for a safe mode:
1. Tap "Do nothing" at the initial screen (will exit immediatly -> no boot programs)
2. go to settings and enable "Confirmation", then click the button of your desired boot environment (and you can decide on each short cut -> safe mode).
@All: Thanks for your kind feedback! You are welcome!
PS: If you choose option 2 from above and tap no for at least one shortcut, you will get an "Ooops! Something went wrong!" message at the end.
You can ignore this, as it simply means not all shortcuts got executed.
Where is this app made? Itsn't really clear to me
Installed .cab, soft reset, error:
SmartBoot.exe
DirectoryNotFoundException
at System.IO.Directory.InternalGetFileDirectoryNames(String fullPath, Boolean file)
at System.IO.Directory.InternalGetFiles(String path, String searchPattern)
at System.IO.Directory.GetFiles(String path, String searchPattern)
at SmartBoot.Form1.Check()
at SmartBoot.Form1.Form1_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form._SetVisibleNotify(Boolean fVis)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Application.Run(Form fm)
at SmartBoot.Form1.Main()
on TMOUS HD2 2.08 stock rom
?
twoply said:
Installed .cab, soft reset, error:
SmartBoot.exe
DirectoryNotFoundException
at System.IO.Directory.InternalGetFileDirectoryNames(String fullPath, Boolean file)
at System.IO.Directory.InternalGetFiles(String path, String searchPattern)
at System.IO.Directory.GetFiles(String path, String searchPattern)
at SmartBoot.Form1.Check()
at SmartBoot.Form1.Form1_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form._SetVisibleNotify(Boolean fVis)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Application.Run(Form fm)
at SmartBoot.Form1.Main()
on TMOUS HD2 2.08 stock rom
?
Click to expand...
Click to collapse
I've got the same problem.
Hi AndiCP,
i think you have forgotten the xml file. I mean: \Application Data\SmartBoot\Configuration.xml
I have made a empty file. Then the message is:
Fehler: There is an error in XML document (0, 0).
Click to expand...
Click to collapse
OK, that's clear.
Next point: you have written that you support only english, no problem.
But Fehler in the popup's is german . Please fix it. And also upload an XML file please.
Also the \_AutoStart_ folders are not created automaticly. Is this the way how should be?
Have we to do this on our own, or is this a litlle bug we have found ?
BTW:
i have allways installed the right .NET version from MS.
EDIT 1:
you say on your private website that the folder names are case sensitive.
Then it must be: _AutoStart_Backup
In your screenshot: _Autostart_Backup
Sorry to say that the app is NOT working on my phone at this moment.
And i'am not alone. There are more people with problems. Please fix it.
At least sense gives problems on restart the phone.
I had to de-install the good idea app. Also some strange problems
on de-installtion. It was not possible. Only with many know how
i was able to de-install it.
mr.First said:
I've got the same problem.
Click to expand...
Click to collapse
Hello twoply and mr.First,
your program error probably comes from a different Startup folder or restricted access to it.
I can't reproduce this error, but I guessed and put an additional entry into the registry ("HKEY_CURRENT_USER\Software\SmartBoot\Autostart_Folder").
If your folder is not "\Windows\AutoStart\" you can enter another path there.
I also added a reg key to customize the initial sound file ("HKEY_CURRENT_USER\Software\SmartBoot\Sound_Load").
Please download the updated version.
Further you don't have to softreset in order to try or set things up, just go to your start menu and use the shortcut.
Finally I hope this helps you, please report your results here.
mike2nl said:
Hi AndiCP,
i think you have forgotten the xml file. I mean: \Application Data\SmartBoot\Configuration.xml
I have made a empty file. Then the message is:
OK, that's clear.
Next point: you have written that you support only english, no problem.
But Fehler in the popup's is german . Please fix it. And also upload an XML file please.
Also the \_AutoStart_ folders are not created automaticly. Is this the way how should be?
Have we to do this on our own, or is this a litlle bug we have found ?
BTW:
i have allways installed the right .NET version from MS.
EDIT 1:
you say on your private website that the folder names are case sensitive.
Then it must be: _AutoStart_Backup
In your screenshot: _Autostart_Backup
Sorry to say that the app is NOT working on my phone at this moment.
And i'am not alone. There are more people with problems. Please fix it.
At least sense gives problems on restart the phone.
I had to de-install the good idea app. Also some strange problems
on de-installtion. It was not possible. Only with many know how
i was able to de-install it.
Click to expand...
Click to collapse
Hello mike2nl,
first of all "Fehler" means "Error".
Second, "Configuration.xml" not found comes from the SmartBoot Directory not being created properly. (Bug: Updated version 1.01 fixes this, then you will also have all the other folders created automatically on first launch).
Third, "AutoStart" is correct whereas in the screen shot you saw before was a left-over of an earlier version, which doesn't matter, because if it wouldn't be found it will be created during backup process anyway.
Last but not least, I can say nothing about "strange problems".
Thanks for your feedback!
Please download the updated version 1.01 or just run AppToDate
Hi AndiCP,
thanks for your fast reaction. I will test it again now. Downloaded and then install it. Will report later here....
EDIT 1:
after installing the app and two times a soft reset the app blocks sense more then once. Strange...
I had to de-install the little app. This was an adventure again. All known ways are not working.
Only massive working in the windows folder and registry cleaning has helped out of that issue.
On which system you have developed thius app? If there something special done for the SonyEricson?
EDIT 2:
after re-install the application i had denite the folder move for the autostart things. Strange, because
then the app will workig. If i have selected Sense UI i get an error message:
Ooops, something went wrong
Click to expand...
Click to collapse
Is this normal? Why you say it is something went wrong? But so far so good. Will test further now.
EDIT 3 (info only):
i have changed the autostart folder in the cab from \Windows\Auto Start to \Windows\Opstarten (dutch version)
EDIT 4 (question):
Have we to copy the apps/shortcuts for the \_AutoStart_xxx\ folders on uor own?
- if the answer yes, no problem (i think thats the way for now)
- if the answer no, then is something wrong
Possible you can think about that issue for a future version of your helpfull app.
Further i think you must add the descirption from your private website here to the first post:
The Pattern is always "\_AutoStart_" & selected Foldername. You can change the folder names in the UI settings tab. The folder "_AutoStart_Backup" is created by the program if you back up your current folder. All other "_AutoStart_" & X folders are created initially, but you want to choose which startup links are in there (folder names are case sensitive!). Just ensure the "X" matches your folder name in the ui settings for this specific button exactly. The default buttons are for Sense UI and XDAndroid. Their respective folder names (in the settings tab) are "Sense" and "Android", therefor I have "_AutoStart_Sense" and "_AutoStart_Android" folders on the root of my phone. In the "_AutoStart_Common" folder you have all the shortcuts which have to start no matter which profile is selected.
Click to expand...
Click to collapse
AndiCP said:
Hello twoply and mr.First,
your program error probably comes from a different Startup folder or restricted access to it.
I can't reproduce this error, but I guessed and put an additional entry into the registry ("HKEY_CURRENT_USER\Software\SmartBoot\Autostart_Folder").
If your folder is not "\Windows\AutoStart\" you can enter another path there.
I also added a reg key to customize the initial sound file ("HKEY_CURRENT_USER\Software\SmartBoot\Sound_Load").
Please download the updated version.
Further you don't have to softreset in order to try or set things up, just go to your start menu and use the shortcut.
Finally I hope this helps you, please report your results here.
Click to expand...
Click to collapse
Thank you for updating application.
Indeed, my Startup folder has another name. I changed the path in the registry, and now everything works.
mike2nl said:
Hi AndiCP,
thanks for your fast reaction. I will test it again now. Downloaded and then install it. Will report later here....
EDIT 1:
after installing the app and two times a soft reset the app blocks sense more then once. Strange...
I had to de-install the little app. This was an adventure again. All known ways are not working.
Only massive working in the windows folder and registry cleaning has helped out of that issue.
On which system you have developed thius app? If there something special done for the SonyEricson?
EDIT 2:
after re-install the application i had denite the folder move for the autostart things. Strange, because
then the app will workig. If i have selected Sense UI i get an error message:
Is this normal? Why you say it is something went wrong? But so far so good. Will test further now.
EDIT 3 (info only):
i have changed the autostart folder in the cab from \Windows\Auto Start to \Windows\Opstarten (dutch version)
EDIT 4 (question):
Have we to copy the apps/shortcuts for the \_AutoStart_xxx\ folders on uor own?
- if the answer yes, no problem (i think thats the way for now)
- if the answer no, then is something wrong
Possible you can think about that issue for a future version of your helpfull app.
Further i think you must add the descirption from your private website here to the first post:
Click to expand...
Click to collapse
to Edit 1: I can't reproduce and never had something like that, sounds like you have problems in your rom anyway as you are the only one reporting this.
Info: Its a simple and standard setup cab (auto generated). Nothing special or changed, it only copies the files. It works the same way on every windows mobile version.
to Edits 2&3: as I said, please check your Autostart folder and change it accordingly.
to Edit 4: Yes. I won't ever include a filemanager!
Hi AndiCP,
i have downloaded the last version yesterday. Installed it and it is running.
At now withour any issue. I think the changings are the solution. But with
un-installation i have my issues. Also when sense is off. But that is not
really a big issue, yet. I will test this again after the next hard reset.
I think this comes with the next CHT test. We, the team, are really haevy busy .
So far, excellent app, that helps me to organize my startup issues on all
CHT (e, s, ...) issues. Thanks for that. That brings us a good effort.
Will report this to co0kie (CHT) and Dark Ninja (GTX).
BTW:
possible you can tell me (PM) where you get or has made the sound files.
I will change something for my needs

[Q] How to install Android on TG01???

hello, I state that my English is poor ... hoping that I apologize for that ...
are now asking if anyone explain to me how to install Android on my TG01 ... are at zero with linux, so it must be a simple explanation ...
Thank you so much for the help
Open your eyes !!
Hey dude !!
Take a look here : http://forum.xda-developers.com/showthread.php?t=672234
Before opening a new thread, please take a look at all the opened ones.
you're right, but I was not able to find it!
thanks for the suggestion
luckylu1977 said:
you're right, but I was not able to find it!
thanks for the suggestion
Click to expand...
Click to collapse
It's right there in VERY FIRST POST in the thread indicated to you! I will be surprised and shocked if you couldn't find it!!
However, in case you really struggled, here is the WHOLE bit copied and pasted from that thread's first post.
Now to run Android properly in your phone !
1.Download any of the builds we have around here.
2.Do backup on your sdcard or if you have additional one use this one.
3.Extract the file with android in your sdcard.
4. Check all the files are inside (sdcard/Android/AndroidApps"folder", media"folder",root"folder",clrcad"file",rootfs"fil e",startup"file",system"file",zImage"file",init rd" file")
5. If you want you can take everything from Android folder and pest it in root of the sdcard but you have to change default text (set cmdline"rel_path=Android change to set cmdline"rel_path=" or set cmdline"rel_path=sdcard") tri with one if is not working try with the other one. I thing the best is leave all files and folder in default Android folder and just copy this folder to your sdcard.
6.Check your zImage and Startup is for Toshidroid :OP (TG01).
7.First RUN haret without CLRCAD.
8.It take no more than10 min to run for the first time.
9. If it take more time RESTART the phone by pressing the POWER BUTTON for 10/20 sec it will restart and back to windows.
11.Try to do the same one more time.
12.If it still not booting to Android and you receive any error messages. Check your sdcard if there is space left in it. Check error message if it say that it can find some file or it can't create a data.
13. Delete everything from your sdcard and format it to fat32.
14.Start from the beginning.
15. If it still not booting to Android then check if you have all files and all set how it has to be.
16. Don't forget you can broke your phone. And we are not responsible for any damage you cause to your phone.
17.It is all up to you.
19. If I forget something sorry about just ask there are other memebers who will try to help you if they can.
20. Sorry for my English mistakes. I'm trying to fix them. :OP
Thanks to all people who try their best to make that possible: Markinus, Arash18k,Bally3,Endrix,Nyl,Arnookie and all other.
Please don't feel bad or offended by any of our posts, but I think the response to you was correct at beginning and we all at XDA do appreciate that the number of threads are kept to minimum and you follow the rule of 'Search before asking' as this keeps it easy for moderators as well as other new members or current members to find something they are looking for in a single thread rather than 10 different threads! Imagine if every new member started opening a new thread!
when it is finished you can put in the NAND as the HD2?

[Q] ODDBall Eclipse Android App Signing Problem

Hi,
I have a simple ADWTheme app I have created which is working fine when I use a generic debug key, but when I use a private certificate created with Eclipse and build my Theme, I get a really lame/generic error when selecting a dock. Using the debug key it works fine. I even created a new key and used it, but same results. Interestingly enough Eclipse spits out nothing in terms of errors during the build or export. Even more interesting is this affects only the docks. I can select wallpapers all day long without any errors.
Any ideas are greatly appreciated
UPDATE
Okay, I signed the APK with another tool with a key created from that tool and it worked so something is wrong with Eclipse setup or my keystore.
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums
Moving to Q&A

[Q] Push source changes to Superuser app

Hello,
Recently I pull down the source code for Koushik Dutta's Superuser app. I made some changes in the source. This changes are the following:
1. SuHelper class now throws 2 kind of exceptions instead of one generic instance of Exception. I believe it is better for developing. Different exceptions, different reasons, different action to do when they are catched.
2. Fixes for several Lint's warnings.
3. Fixes in translation.
4. UI new features:
a) At the first screen you can long click at an item several actions are shown ("Allow/Deny" which changes the permission without deleting the permission, "Revoke permission", "Details" leads to the same screen as a simple click o\at an item).
b) At the details screen for every item/application and new checkbox/switch added to allow/deny superuser permission.
c) At settings screen miscellaneous settings added which refer to the pop-up dialog about the outdated su binary.
Please see the attached photos from the modified application.
I would like to ask 2 questions now:
1. Do you think that these changes are useful to you?
2. Has anyone contribute by commiting any source to this app? Should I pull the current HEAD of the from the repository or simply commit and push my changes?
Thanks in advance,
LiTTle
PS: Dear moderator's, I think that this thread fits better at "Android Software and Hacking General [Developers Only]" or "Android Software Development" but I was not able to post it there.
Still working on this
I am still working on this. New features added. I will try to post some more posts in order to move this question to the appropriate sector!
1. Minor bug fix. You can reproduce this fix by following the next steps:
-From the first screen select / click / touch an application.
-The details screen for this application is shown.
-Rotate the device.
-View the trash icon which will clear all logs. The trash menu should not appear in here.
2. Disable the countdown at Superuser Request screen. I don't like to wait. Do you?
3. Change the default position of the toast (up / center / down) when an application receives superuser privileges.
4. You can start an application from inside this application. Why only do you view the list of the applications at the first screen.? From now on, you can run them!
I downloaded the whole official repository for Superuser app, merge the changes and I created an update.zip.
Feel free to download it and and give me comments at this thread!
At least let me know that you like the changes!
PS: I just made some enhancements. The main developer is Koushik Dutta. I am not going to still reputation from him!
TheLiTTle said:
Hello,
Recently I pull down the source code for Koushik Dutta's Superuser app. I made some changes in the source. This changes are the following:
1. SuHelper class now throws 2 kind of exceptions instead of one generic instance of Exception. I believe it is better for developing. Different exceptions, different reasons, different action to do when they are catched.
2. Fixes for several Lint's warnings.
3. Fixes in translation.
4. UI new features:
a) At the first screen you can long click at an item several actions are shown ("Allow/Deny" which changes the permission without deleting the permission, "Revoke permission", "Details" leads to the same screen as a simple click o\at an item).
b) At the details screen for every item/application and new checkbox/switch added to allow/deny superuser permission.
c) At settings screen miscellaneous settings added which refer to the pop-up dialog about the outdated su binary.
Please see the attached photos from the modified application.
I would like to ask 2 questions now:
1. Do you think that these changes are useful to you?
2. Has anyone contribute by commiting any source to this app? Should I pull the current HEAD of the from the repository or simply commit and push my changes?
Thanks in advance,
LiTTle
PS: Dear moderator's, I think that this thread fits better at "Android Software and Hacking General [Developers Only]" or "Android Software Development" but I was not able to post it there.
Click to expand...
Click to collapse
Bug fixes
After a little work I found a bug every time the extra actions are shown when the user does a long click at an application. This bug is only visible for tablet users. I attach the new "update.zip" file. I attach new "update.zip" file because I don't see a lot of downloads. In case more than 5 downlaods will happen I will upload it at the play store also, along
The 1 person who tried it, she reported the error!
TheLiTTle said:
I am still working on this. New features added. I will try to post some more posts in order to move this question to the appropriate sector!
1. Minor bug fix. You can reproduce this fix by following the next steps:
-From the first screen select / click / touch an application.
-The details screen for this application is shown.
-Rotate the device.
-View the trash icon which will clear all logs. The trash menu should not appear in here.
2. Disable the countdown at Superuser Request screen. I don't like to wait. Do you?
3. Change the default position of the toast (up / center / down) when an application receives superuser privileges.
4. You can start an application from inside this application. Why only do you view the list of the applications at the first screen.? From now on, you can run them!
I downloaded the whole official repository for Superuser app, merge the changes and I created an update.zip.
Feel free to download it and and give me comments at this thread!
At least let me know that you like the changes!
PS: I just made some enhancements. The main developer is Koushik Dutta. I am not going to still reputation from him!
Click to expand...
Click to collapse
I am in touch with the developer to push my changes in his repository. Thanks for any help.
I will post again if I have trouble!
TheLiTTle said:
After a little work I found a bug every time the extra actions are shown when the user does a long click at an application. This bug is only visible for tablet users. I attach the new "update.zip" file. I attach new "update.zip" file because I don't see a lot of downloads. In case more than 5 downlaods will happen I will upload it at the play store also, along
The 1 person who tried it, she reported the error!
Click to expand...
Click to collapse

[Q]Help with Apache Ant!

Hello,
I started studying Java development some time ago. I am reading Thinking In Java, which is a very good guide for the almost-newbies like me. But in the second chapter of the book you are asked to install the book's source code. As the URL provided in the book doesn't seem to work anymore, I came across this.
Here, I met two problems:
1- I don't understand step 5. Where should I find bin, and what do they mean with "your path"?
2- I un-zipped the Ant tool in the folder, but when I try to use "Ant build" nothing happens. If I only write "build", it seems to work, but it suddenly stops. What do I have to do to get it working?
Thank you in advance.

Categories

Resources