Eclipse Question - Android Q&A, Help & Troubleshooting

I'm in the process of figuring out how to develop for android...and I'm trying to add an EditText field but I get and error. Looking at the graphical layout, the screen fades out. Is there a reason this would happen.
I am also getting an error that says "Failed to load properties file for android project".
Any help is welcomed.
Thanks in advance.

ok
jacari91 said:
I'm in the process of figuring out how to develop for android...and I'm trying to add an EditText field but I get and error. Looking at the graphical layout, the screen fades out. Is there a reason this would happen.
I am also getting an error that says "Failed to load properties file for android project".
Any help is welcomed.
Thanks in advance.
Click to expand...
Click to collapse
if you what to write something on a button on your app screen,,,, it's not directly done for android
so you have to go to a "Value" folder of your project and u will find a "string.xml " file
here you can add what ever text you want to use it on your app screen where ever you wanna
1- click on string file and you will see an interface and an add button
2- click on add button -> select string
3- now you have to enter a string NAME and string Value
4- string NAME is an ID of this string
5- string Value is an Value that you can use it on your app screen
NOW save your project
and go to main.xml
right click on button -> edit text
and you will see add ID's that you interned in string .xml
<<<<this is used for managing app's that have Multi Languages :good:>>>>
click on THANKS button if you find it helpful

osama_m2s said:
if you what to write something on a button on your app screen,,,, it's not directly done for android
so you have to go to a "Value" folder of your project and u will find a "string.xml " file
here you can add what ever text you want to use it on your app screen where ever you wanna
1- click on string file and you will see an interface and an add button
2- click on add button -> select string
3- now you have to enter a string NAME and string Value
4- string NAME is an ID of this string
5- string Value is an Value that you can use it on your app screen
NOW save your project
and go to main.xml
right click on button -> edit text
and you will see add ID's that you interned in string .xml
<<<<this is used for managing app's that have Multi Languages :good:>>>>
click on THANKS button if you find it helpful
Click to expand...
Click to collapse
Thanks. Let's say I'm making a to-do app...would this allow me to make an area where the user would enter their task?

Related

HKEY_LOCAL_MACHINE\Software\HTC\HTCHome\PROFILE\* help

can anyone put the contents of the keys in HKEY_LOCAL_MACHINE\Software\HTC\HTCHome\PROFILE\*
here please?
im using mary's ROM and i think there's a PATH key missing or something as i cant get the icons to show in the HTCHome tab
thx
The keys I have in Niki project v2:
CONTRLSTATE dword value 0
STATE dword value 3
And folder named AUTO containing the following keys:
Disp string with a square symbol as the string value
Path string with value Show
Type dword value with value 0
Good luck.
badaas said:
can anyone put the contents of the keys in HKEY_LOCAL_MACHINE\Software\HTC\HTCHome\PROFILE\*
here please?
im using mary's ROM and i think there's a PATH key missing or something as i cant get the icons to show in the HTCHome tab
thx
Click to expand...
Click to collapse
Maybe today New Rom!!!!
wmn79 said:
The keys I have in Niki project v2:
...
Good luck.
Click to expand...
Click to collapse
thanks
thx hellonasty too! did you cook the s600 dll in with the new ROM?
cheers

[Beta 0.1.4][25-Mar-09] UCMe2 - Selective backup and SDConfig tool for reflashing

Premise is that there are many backup utilities that will backup/restore either dirs or the whole ROM, but not just for a specific apps settings. There are many ways that dev could use to store their settings for a given app, but getting them all to do the same way is "difficult". However, if program A had it's settings in a settings.ini (or whatever name) and that specific file could be backed up and restored later after a hard reset or new ROM installed, it would make the flashing a ROM even easier since UC came out.
My idea is for an app that works sort of like AppToDate, in that it will parse a collection of ini files in a directory to determine what a given progam uses for it's configuation (files or reg keys) and will backup/restore them.
Basically all that someone needs to do is:
- Extract the UMCe2.zip to a folder on their Storage Card
- Register Mortscript (just click on it once, from this point on you can just click on a script and it will run.)
- Place the INI files that define the files or keys of the app that you'd like to backup/restore into the \Storage Card\UCMe2\ini folder. I have posted a small collection of some INI files as examples
- If you'd like startmenu shortcuts, I attached a few dummy.exe files that you can put into the UCMe2 folder so you can make shortcuts.
- Run the UCMe2_Backup and it will read every INI file in the ini folder and store the backup files in \Storage Card\UCMe2\Backup
- Run the UCMe2_Restore and it will read every INI file in the ini folder are restore the backups
I want the app do do a few things:
* to run start to finish unattended... start the program and it just runs, with no questions asked. (for scheduling purposes)
* the config ini for apps need to be simple to read/edit, so user community can post/share them, or be created by the original app devs
Feel free to create your own INI files and post them here for others to share
I have updated the scripts to include the SDConfigCE tool, to create a new SDConfig.txt based on the files that you have placed in the CABS subfolder.
Additionally, I have included XCopyCE support in the created SDConfig.txt file to copy files placed in the Files subfolder to the device.
(added test sdconfigce.zip to attempt to detect devices with internal storage vs. storage card and SHOULD manage other ROM languages)
Todo list:
add ProcKill and SuggestReboot options to ini file
-optional kill process before backup/restore
-optional suggest reboot after restore if suggested in ini file
add optional Disable parameter to ini file to "turn it off"
add section to backup/restore individual reg values (instead of entire subKey)
-[RegValues]
-Value1= root, subkey, value, data, type
Build in Restore script to run during UC to further automate UC
Provide bulk REG file import, over and above the scripted reg key values provided by INI files
Click to expand...
Click to collapse
Bug List:
Validation key in ini files do not like LONG reg root names, workaround is to change them to HKLM or HKCU as necessary
- change: Validate = HKEY_LOCAL_MACHINE,Software\Apps\Google Maps
- to: Validate = HKLM,Software\Apps\Google Maps
Click to expand...
Click to collapse
Updates in version 0.1.4:
updated bug in restoring of backup files. Now it will create missing directories and actually copy in the files :-0
Click to expand...
Click to collapse
Updates in version 0.1.3:
updated bug in validation logic on the restoring of backup.
Modified Backup script to automatically generate new SDConfig to make that "last minute" backup into a 1 step process.
Click to expand...
Click to collapse
Updates in version 0.1.2:
Created tool to create SDConfig.txt file automatically based on the presence of CAB or XML files in the CABs subfolder
Provided XCopyCE support to do file copy of the contents of the Files subfolder to the device during UC
Updated Menu applet to call the SDConfigCE tool
Click to expand...
Click to collapse
Updates in version 0.1.1:
Replaced dependancy of SKTools with DotFred Taskmanager for reg functions (it is even smaller and faster and freeware)
Changed display of progress in GUI
Added Version numbers in script and GUI
Click to expand...
Click to collapse
Initial release 0.1.0
How to make your own INI file:
The ini file is a very simple thing to make as it is basically just a text file with a few bracketed headers (sections) and values in them.
The easiest way to do so, is to place a copy of the template on your PC desktop and open it with notepad.
Then use the freeware tool CERegEditor ( http://ceregeditor.mdsoft.pl/ ) to read your device's registry... MOST apps save their customization in:
HKEY_CURRENT_USER\Software\ (App Publisher) \ (App Name)
There are plenty of sample files to use as references. If you need help, I'm certain that someone in this community can help.
PocketBreeze.ini
[UCMe2]
appname=PocketBreeze
subdir=PocketBreeze
Validate = HKLM,Software\Apps\SBSH.net PocketBreeze
[regkey]
key1=HKEY_CURRENT_USER\Software\SBSH\PocketBreeze
Click to expand...
Click to collapse
OwnerSettings.ini
[UCMe2]
appname=Owner
subdir=Owner
[regkey]
key1=HKEY_CURRENT_USER\ControlPanel\Owner
Key2=HKEY_LOCAL_MACHINE\Ident
key3=HKEY_CURRENT_USER\Software\Microsoft\Bluetooth\Settings
Click to expand...
Click to collapse
GoogleMaps.ini
[UCMe2]
appname=GoogleMaps
subdir=GoogleMaps
Validate=HKLM,Software\Apps\Google Maps
[Files]
cache-GLM.dat=\Application Data\GoogleMaps\cache-GLM.dat
index-GLM.dat=\Application Data\GoogleMaps\index-GLM.dat
prefs.dat=\Application Data\GoogleMaps\prefs.dat
prefsext.dat=\Application Data\GoogleMaps\prefsext.dat
prefsext2.dat=\Application Data\GoogleMaps\prefsext2.dat
prefsfriends.dat=\Application Data\GoogleMaps\prefsfriends.dat
prefsfriendsmini.dat=\Application Data\GoogleMaps\prefsfriendsmini.dat
strings-all.zlb=\Application Data\GoogleMaps\strings-all.zlb
Click to expand...
Click to collapse
Format of ini file is:
[UCMe2]
AppName = Friendly name for future use
subdir = subfolder to store the files
Validate = condition to look for before restoring (either a filepath and name or reg key... Reg key must be formatted like ROOT,KEY)
[regkey]
filename1 = regkey to backup
filename2= other regkey
[Files]
destinationfilename1.ext = source filename with full path
destinationfilename2.ext = source filename with full path
Just create an ini file for each app to backup
**** Reserved for suggestions or requests
I'm thinking of adding a switch to the ini files as a block to prevent backing up certain apps...
It would be used to "install" an app that only needs file copy like an exe or shortcuts or similar... no sense of copying back those files for backup, as they would never change.
an entry in the ini like:
[UCMe2]
RestoreOnly = 1
Would it make a difference to anyone if I CREATED new app shortcuts, or just copied the old ones for backup/restore?
Another optional ini setting should be:
[UCMe2]
Validate = <fullpath\file> or Reg key
Which would only restore the backups of the appropriate reg key or path\file exists. No sense restoring data for an app if it isn't yet installed.
hmmm...
I've added a bit of a GUI to the backup process, just to see something while it runs. I'll get around to doing the same to the restore mode...
UCMe2.mscr
Code:
ScriptDir = SystemPath("ScriptPath")
IniFiles = ScriptDir \ '*.ini'
StatusType(ST_LIST)
StatusInfo("UCMe2 Backup", "Backup process running")
ForEach F in files (IniFiles)
AppName = IniRead(F,"UCMe2","appname")
SD = IniRead(F,"UCMe2","subdir")
RestoreOnly = IniRead(F,"UCMe2","RestoreOnly")
StatusShow()
StatusMessage( AppName, ST_LIST, TRUE )
If (RestoreOnly = False)
MkDir(ScriptDir \ SD)
ForEach K, V in iniKeys (F,"regkey")
RunWait(Scriptdir\"SKTools.exe","#REXP(" & V & ") #FNAME(" & ScriptDir \ SD \ K & ".reg)")
StatusMessageAppend( "." )
EndForEach
ForEach K, SettingsFile in iniKeys (F,"Files")
copy (SettingsFile, ScriptDir \ SD \ K ,TRUE)
StatusMessageAppend( "." )
EndForEach
StatusMessageAppend( "OK" )
ElseIF
StatusMessageAppend( " - Skipped by RestoreOnly value" )
EndIf
EndForEach
StatusMessage( "Backup Complete" )
WriteStatusHistory( Scriptdir \ "BackupLog.txt" )
StatusMessage( "Window closing in 5 seconds" )
Sleep( 5000 )
StatusType(ST_HIDDEN)
Updated the scripts a bit and made a GUI menu... but that has limited value, beyond my playing with MortScript
here is a template of the current ini entires, but most of them aren't necessary... see the examples I already have in the zip.
Code:
[UCMe2]
appname = (descriptive Name)
subdir = (subfolder name)
RestoreOnly = 0/1 (1 = do not back up this app)
Validate = <fullpath\file> or Regkey HKLM,Software\appname\key (NOTE the comma in the reg key)
[regkey]
key1="HKEY_CURRENT_USER\Software\AppName\etc"
key2="HKEY_LOCAL_MACHINE\Software\AppName\etc"
[Files]
backupFilename.ext=Fullpath to sourcefilename.ext
anotherbackupFilename.ext=Fullpath to sourcefilename.ext
andanotherFilename.ext=Fullpath to sourcefilename.ext
rilphone2.ini
[UCMe2]
appname=Rilphone2
subdir=Rilphone2
[regkey]
key1=HKEY_LOCAL_MACHINE\Drivers\BuiltIn\RIL
[Files]
rilphone2.dll=\WINDOWS\rilphone2.dll
Click to expand...
Click to collapse
PocketBreeze.ini
[UCMe2]
appname=PocketBreeze
subdir=PocketBreeze
RestoreOnlyIfRegExists = 1
Validate = HKLM\Software\Apps\SBSH.net PocketBreeze
[regkey]
key1=HKEY_CURRENT_USER\Software\SBSH\PocketBreeze
Click to expand...
Click to collapse
I see where I should make a subdir to hold the INI files, and another to hold the backup folders... the prog dir is getting cluttered
I can see another mini app for this process... one to enable or disable individual ini files... (probably just move them to a different folder instead of deleting the ini file)
I don't think Mortscript has that kind of support for forms, so it might remain a manual process for a while. Lemme see how clever I can be
attached pics to post 1
there is a minor issue in the restore script... I have to re-think my logic for the validation determination, but I'll get that
I fixed the restore mode problem. as well are eliminated 2 unnecessary fields from the INI files.. the RestoreIfRegExists (or file)... now it just examines the content of the validate field... if it has a comma in it, it assumes it is a reg entry.
I still need to put in error handling, but I have to figure out how that all works in MortScript.
I also am considering having it backup/restore specific reg values, in addition to the whole key, but much of will be based on MortScript... it is lacking in reg features and I'm currently dependant on SKTools to do the reg functions... I'd much prefer to do it internally, but MS doesn't have a way of determining the regtype that it is reading, so I can't store that so I can restore it to the correct type.
fixed a simple issue of the reg export grabbing the level higher and exporting from there.
let me be the first one to reply the app looks nice, isent it nice that MortScript can be used in many ways?
This is great, I will be watching on this
that's funny how this is like a 2-page OP
but this is a fantastic idea and crazy useful if it comes to fruition. between this and UC or sashimi, flashing roms would have so little downtime..wow....

Delete eclipse appcompat_v7 package

I accidentally deleted appcompat_v7 from package explorer, now my android projects have errors in folder values (styles.xml) and src folder. How can i fix this mistake. I tryed to import android-support-v7-mediarouter, my error from project scr gone, but i still have errors in styles.xml,and i have error too in android-support-v7-mediarouter in res/value/styles.xml . i fix a error , another one apears. Sorry for my bad english .
ImP4Kter said:
I accidentally deleted appcompat_v7 from package explorer, now my android projects have errors in folder values (styles.xml) and src folder. How can i fix this mistake. I tryed to import android-support-v7-mediarouter, my error from project scr gone, but i still have errors in styles.xml,and i have error too in android-support-v7-mediarouter in res/value/styles.xml . i fix a error , another one apears. Sorry for my bad english .
Click to expand...
Click to collapse
Add the appcompat_v7 project to your application project as a library:
In the Project Explorer, right-click your project and select Properties.
In the category panel on the left side of the dialog, select Android.
In the Library pane, click the Add button.
Select the library project and click OK. For example, the appcompat project should be listed as android-support-v7-appcompat.
In the properties window, click OK.
https://developer.android.com/tools/support-library/setup.html#libs-with-res
(ref, from http://stackoverflow.com/questions/...mpat-v7-and-now-my-android-projects-wont-work)
btw, u have to import the whole appcompat_v7 but not only android-support-v7-mediarouter, so if you didn't download whole android-support-v7 then download in sdk manager!
hope this can help your problem!

[Q] password.key decription

!!! Discussion is for educational purpose only !!!
As we know, Android stores Lockscreen's Pin and Password in data/system/password.key
In this file appears an alphanumeric string (probably an hex string which refer to other databases).
I've made a research, but I didn't find if it's possible to know the Lockscreen's password/pin starting with this file.
Any idea?
Can anyone try to explain how does it work?

how can i write to a file and read from it in android studio?

hi always use c and c++ but now i'm trying to create a game application with ndk
but it needs some java codes and i dont know java at all!!
i want to create a file
write a string in that file
then read that string again from that file?
can you help me? or show me a way to do that?!
mjs2001227 said:
write a string in that file
then read that string again from that file?
Click to expand...
Click to collapse
Write String to File in Java - TutorialKart
To write String to File in Java, there are many processes we can follow. Some of them are using FileUtils class of apache's commons.io library, Input Streams, etc.
www.tutorialkart.com
good luck!

Categories

Resources