Hi
I want to create a picture based password system, wherein the user clicks on certain positions in an image, and then that is verified..
Can anyone help me out..how to store these pixel locations. Since the size is small, i want to store them in an array using SharedPreferences and then extract it from there to verify it,
I tried saving it but when i access the file..i only get the last pixel stored. I need access to 5 pixels positions that were clicked on.
There is actually an app that was featured before that is exactly what your looking for....... I just can't remember
Sent from my Nexus 4 using xda app-developers app
Shria said:
Hi
I want to create a picture based password system, wherein the user clicks on certain positions in an image, and then that is verified..
Can anyone help me out..how to store these pixel locations. Since the size is small, i want to store them in an array using SharedPreferences and then extract it from there to verify it,
I tried saving it but when i access the file..i only get the last pixel stored. I need access to 5 pixels positions that were clicked on.
Click to expand...
Click to collapse
You can hide a small button(transparent) behind the picture. Then it would be very simple.
Bro this might get you in trouble Picture Password is a patented tech. from
Microsoft © Windows ® 8
and you definetly dont wanna get sued by a corporate gaint
Sent from my GT-S5302 using Tapatalk 2
How is your layout setup? And what are you using to get the coordinates? Some code would help.
Sent from a Toasted Devil
You could add an onTouchListener: http://stackoverflow.com/questions/4207067/how-to-implement-touch-listener-on-image
So i used an SQLite database and im done with it!
thank you for ur replies.
Related
Has anyone figured out how to allow multiple users share applications across users and Google accounts? It's my tablet but I wanted to give my girlfriend her own homescreen (she has her own google account). Is there away to allow her to share some of my applications?
No, not yet. The second account is completely sandboxed, she won't even be able to access your sdcard partition.
yumcax said:
No, not yet. The second account is completely sandboxed, she won't even be able to access your sdcard partition.
Click to expand...
Click to collapse
Ok, thanks.
Another question...
The application that is installed, will it be installed again on the other user environment taking up double space? If not then I might opt for the 16GB...
I'm using the app called Multiuser App Share. It works good for most apps. Those requiring root are no-go tho, as is most paid apps. The 2ed user does take up its own storage space. Some is shared but it's mostly settings stuff & requires little space. I'm rooted with 3 backups & that's using 16gb on my 32gb device. Backups are large as you could expect having to backup 2 users data.
Sent from my Nexus 10 using Tapatalk 2
If you do not use this Multi User App Share applications, say I have "[email protected]" and I install Angry Birds therefore I have the associate link on this account.
On "[email protected]" I also install angry birds and associate it to this account. When I install it for the second time on the secondary user, does it download the same .apk or is the OS smart enough to realise, hey the primary user or other users has this .apk, lets not download it and use the same .apk.
This is not related to data storage as it is stored on the /u/0/ for the primary user and /u/1/ from my understanding so I am aware of that.
Don't care with applications which requires roots as I read that the secondary user cannot get root. Just care about storage and big .apk may be a problem if I buy the 16GB Nexus 10.
The 2 users are pretty much separated. As far as apps & storage, each user is separate having their very own apks, app data, media & media storage, pictures, etc. Sorta like having 2 complete tablets on one. Ex.: Right now each user on my tablet is using about 3.5 gb of data/media storage for 7 gb total. I don't know of any apk that is actually "shared", as in both users use the same single apk. The share-app I spoke of above allows an apk to be installed from the primary to the secondary. It's for installing apks AFAIK. Some say they can share games, but not so on mine yet. The tablet is still new to me, but this is what I'm seeing so far.
Sent from my Nexus 10 using Tapatalk 2
Actually. I run multi right now and it doesn't redownload the apps it just grants (or so it seams...) the user access to the app. Now the data for apps are separate. Then again I have one account I use for my apps so both users have that account to get apps from.
Sent from my Nexus 10 using xda app-developers app
This was a test to show you using my single app account and instilling nova on the "test" account. Nova is well over a gig if not two and you'll notice the storage usage on the test account
Sent from my Nexus 10 using xda app-developers app
I see what your saying. Looking closer & playing with the Multiuser app, I allowed the 2ed user the use of Deadtrigger installed in the Primary account. Then going into 2ed account & opening that game, there was no waiting for a download - it simply opened & was available for play.... Cool
Sent from my Nexus 10 using Tapatalk 2
So it looks like the primary account needs to be added as well to the secondary account and then things should work?
djd338 is that what you done on yours or was Deadtrigger was installed or linked to two separate accounts?
springy said:
So it looks like the primary account needs to be added as well to the secondary account and then things should work?
djd338 is that what you done on yours or was Deadtrigger was installed or linked to two separate accounts?
Click to expand...
Click to collapse
I only installed it one time & on the primary user account. All else happened within the Multiuser App Share-app. Deadtrigger was installed to Primary. The Multiuser app opened & the box for Deadtrigger was checked to allow sharing. Opening 2ed user account allowed for immediate play. Paid games (Nova3 & GTA) where also checked to allow sharing, but when 2ed user opened them on that side, a popup appeared saying it was not allowed.
Sent from my Nexus 10 using Tapatalk 2
Yah you might want to try having a Google account for just you paid apps like how I do then any device or account can have them with no trouble and you don't have to worry about other people going through your email
Sent from my Nexus 10 using xda app-developers app
Tesla67 said:
Yah you might want to try having a Google account for just you paid apps like how I do then any device or account can have them with no trouble and you don't have to worry about other people going through your email
Sent from my Nexus 10 using xda app-developers app
Click to expand...
Click to collapse
There should be some way to lock everything but Google play access when you add account on secondary user. I have disabled all syncing on my Google account which I have added to my wife's and kids account. That way at least the calendar and Gmail app is not automatically showing my things. But I think that there are place for improvement with multiuser support. For example shared folders so all users easily can access common files.
Skickat från min Nexus 10 via Tapatalk 2
There are 2 methods as far as I know:
1) Add the Google account with apps to the 2nd user, when you install a 'common' app, you'll notice that it'll finish downloading instantly, as if it didn't really download anything. I believe what happens is that the 'restriction' for that specific app is removed for the 2nd user, which brings us to #2
2) The 'multiuser app share' does exactly this -- it edits the package-restrictions.xml of the secondary user and removes the offending lines.
Don't quote me on this, I'm not really an expert on the matter, but I have actually manually enabled apps through this method (#2). My first try got my 2nd user messed up (after reboot, it went through setup again) but it magically 'installed' all my apps from the primary user. The subsequent attempts worked just fine ('enabling' individual apps)
The only problem I see is that the multi share app might break after another OTA update. I am sure Google will sort this out in 4.2.2 which is rumour to be coming out soon (or has according to some reports)
Sent from my Nexus 4 using xda app-developers app
Running a test secondary user on my HTC Inspire/Synergy's 4.2.1 SR6 (OFFICIAL codefireX Builds - http://forum.xda-developers.com/showthread.php?t=2003273).
I have found that it separates "users" data/apps fine (Gallery shows "0" files - GREAT!!! But, the app "File Manager" is listed in the available apps, which of course you can use to view the contents of the SD card - and the other user's files.
So how do you block certain apps from being used? I've tried Titanium's "freeze", but it only froze the app on my user profile, and the other user profile still had it running.
I just got my N10 today.
I backed up ym phone with Titanium and rooted the tablet.
Then I made some accounts, mine as owner, my GF's as a second. Then I restored my backup using my account.
MOST apps were then on my GF's, but they don't have their own data.. this is quite stupid to be honest. A 1GB game means 2GB downloaded, despite it could quite easily share the same location.
Good Afternoon,
I am in need of some support or help if possible please,
i am trying to create an application using the new android studio(this is my 1st time trying to make an app)
i have managed to get my logo as the app icon
got a contact icon /name/tel number and the app to load on my nexus 4 ok and i can change the details on the app from my phone,
i am now truly stuck. i require photo albums to be in the app with tabs,
the app is for my small business
i ideally need 2 tabs at the bottom (about us/photos)
the photo tab to load all the albums of photos i need to be viewed by people 20 albums about 200 photos in total.
i have tried and tried to follow guides but they seem to be all for eclipse and eclipse wont let me create a new app at all(all updated just wont show the next button after package name ect...
this is the only app i need to make, i would love to try and make myself but this is proving either to hard for myself or im missing something very basic....
are there devs on here that create small apps like this at a cost ?
are there any better tutorials for the new studio builder?
any feedback welcome.
regards
XDA is not a place where you can hire devs as far as photo album are concerned I recently worked with one They're quite simple to build but rendering Images on them is a pain but once you get the algorithm right it's all good take a look at a very scratch version of what I made If its something you'd want I can help you with it
Sent from my GT-S5302 using Tapatalk 2
Hi,
What's the best approach to load a listview contents from a backend-server (internet)? I mean, I want to populate on-the-go a listview that will retrieve data from a internet server. For example, I want to know all orders from my e-commerce from my app, and I have like 5000 orders in the last week, I won't load this 5000 orders because my app will have a great load time and memory consumation.
My idea is load more when user get close to the last element of list, but I don't know how to do this, and about memory consumation? Is better to continue with the data in memory (when user goes back to upper), or save it on a file-cache (better than memory?) and load when user scroll back to the top?
Thanks,
While the user is the activity you must hold each of the list item in memory anything other than that will cause serious lag in your app
While at other times you may cache them to save resources
Sent from my GT-S5302 using Tapatalk 2
You definetely need ASyncTask here. You can define a class as asynctask, which lets you implement a few methods to use as a background thread. So whenever you wan to load more items you can call this background thread which does not block the UI.
Also, if I remember correctly, you can implement a method which lets you know which list item is at the top of the screen, the total number of items in the listview, and the number of items on the screen.So with this method you can find out whrn you reached the last item in the listview.
I hope this helped a little, at least you got some stuff to google
Sent from my NexusHD2 using xda app-developers app
Ya as he said use a global variable and update it in getView if adapter hence ull know the last loaded view
Sent from my GT-S5302 using Tapatalk 2
Is there a way to do this? Thanks ,
I have seen software which "claims" to do it with desktop software. Dont think any of them work with tiles though sadly.
Is creating a new user account with less installed applications not an option?
SixSixSevenSeven said:
Is creating a new user account with less installed applications not an option?
Click to expand...
Click to collapse
Thanks. No this isn't a good option for a tablet..
Switching users is *really* easy on Win8/ Windows RT, but OK...
There's no practical way to do exactly what you want without putting some OS-enforced security boundary between you and the other user. The most obvious, and by far the easiest, is to create a second user account. However, if that doesn't cut it for you...
In decreasing order of security:
* Create an NT driver that intercepts requests to open a specific program, and demands a password first.
* Create or find a user program that will encrypt a program so it can't be run, then demand that anybody trying to open that program supply the password first. (Note: this is way weaker than it probably sounds to you, and also way more complicated.)
* Remove the shortcuts to the app, replace them with a script that demands a password, then launches the app itself if the PW is correct. (Note: this is trivially insecure, and still bloody complicated to do "right".)
There are various other options, such as hiding the app, making the user do something (like alter its permissions) before running it, or similar. None of them are what you're asking for, though, and most of them are insecure, hideously complex, or both).
GoodDayToDie said:
* Remove the shortcuts to the app, replace them with a script that demands a password, then launches the app itself if the PW is correct. (Note: this is trivially insecure, and still bloody complicated to do "right".)
Click to expand...
Click to collapse
This was also my idea of doing it.. It is probably easy to do a skript with autoit http://www.autoitscript.com/site/autoit/ to do this.. Altgough i have years to program with it..
But things like this are easy in android.. I believe that microsoft should copy some things from it..
Thanks again,
Sent from my Nexus 7 using xda premium
sosimple said:
This was also my idea of doing it.. It is probably easy to do a skript with autoit http://www.autoitscript.com/site/autoit/ to do this.. Altgough i have years to program with it..
But things like this are easy in android.. I believe that microsoft should copy some things from it..
Thanks again,
Sent from my Nexus 7 using xda premium
Click to expand...
Click to collapse
Oh you mean how android actually copied microsoft?
You are just messing around with this. Having a separate user is much easier and much better in every respect when you want to restrict access to some app.
Hey Guys,
I am creating a app to rename other apps via xposed and the main code is written. Now I simply want to make a interface where you can define a app to rename and then enter a new name. For the beginning I thought about a Activity where you enter the Package Name and the desired name. Later on I want to use a list view to show all apps, from where you can choose one to rename(Like App Settings etc.). To show the renamed apps I want to use a ListView. Now I am stuck with a problem: My xposed code works with an array to check and rename. The list view can be used with an array or an arraylist, but I need a way to store the preferences(which are stored in a array).
Do you have a good idea or a sample how to realise this? And does somebody know a nice App List type of thing(I googled, but the project there aren't usable with my kind of approach.)
GalaxyInABox said:
Hey Guys,
I am creating a app to rename other apps via xposed and the main code is written. Now I simply want to make a interface where you can define a app to rename and then enter a new name. For the beginning I thought about a Activity where you enter the Package Name and the desired name. Later on I want to use a list view to show all apps, from where you can choose one to rename(Like App Settings etc.). To show the renamed apps I want to use a ListView. Now I am stuck with a problem: My xposed code works with an array to check and rename. The list view can be used with an array or an arraylist, but I need a way to store the preferences(which are stored in a array).
Do you have a good idea or a sample how to realise this? And does somebody know a nice App List type of thing(I googled, but the project there aren't usable with my kind of approach.)
Click to expand...
Click to collapse
Ah the data storage problem... I think we all came across this at least once . I suppose you read this guide on the different options available? Well there are actually three options: SharedPreferences, text or csv file and SQL.
The first one would need some work around and is probably the slowest. You would save a separate string directly into the SharedPreferences (maybe in a new file to avoid collisions?) with the array name and its index somehow in the key. That's just two methods of coding but not the nicest way to do it.
The text or csv file however is the more common way, here you'd save your array in one line of the file, each item separated with a ; or some other char. Needs a bit more coding and also the WRITE_EXTERNAL_STORAGE permission on preKitKat if I remember correctly.
The third one is the nicest and most modular one. Because it makes use of SQL it needs quite a bit of knowledge and some coding (but less than the text file).
I guess for simple things that you want to do it is better to stay away from SQL for now unless you know how to use it and use the SharedPreferences.
Edit: take a look at the answers to this question, they give you the code as well... And you can use StringSets in ICS and above if the order of your list doesn't matter !
I'd say go down the SQLite DB way, chances are that if you plan on expanding your coding knowledge and want to keep creating apps you'll be needing to learn this in the future anyway so why delay?
Google AndroidHive and look at their SQL tutorial - I used it when learning and found it very informative
Sent from my HTCSensation using Tapatalk
Thank you very much! As coming from windows, first of all I thought about SQL as well, but it seems oversized for the set of data i want to store. I also took a look at the stackoverflow thread you linked. It looks easy to implement, but the need to use an external class file made me look for another way. I found this one, which works pretty well for me, as I look forward to interchange the method of saving the data with a better one using the SharedPreferences(which actually should be really easy with my code).
Maybe you can tell me yet another thing: Is there a way of declaring an object(like the ArrayList) to make it accessible from every class except from giving every class(activity) it's own "load the preferences" and "save the preferences" code block or sending intents all over the place? This would make saving much easier and allow me to update the preferences during runtime and without a reboot
Edit: This was my answer to.SimplicityApks ^^ I'll take a closer look at SQL now, since you, Jonny, told me that it' nevertheless necessary.
GalaxyInABox said:
Thank you very much! As coming from windows, first of all I thought about SQL as well, but it seems oversized for the set of data i want to store. I also took a look at the stackoverflow thread you linked. It looks easy to implement, but the need to use an external class file made me look for another way. I found this one, which works pretty well for me, as I look forward to interchange the method of saving the data with a better one using the SharedPreferences(which actually should be really easy with my code).
Maybe you can tell me yet another thing: Is there a way of declaring an object(like the ArrayList) to make it accessible from every class except from giving every class(activity) it's own "load the preferences" and "save the preferences" code block or sending intents all over the place? This would make saving much easier and allow me to update the preferences during runtime and without a reboot
Edit: This was my answer to.SimplicityApks ^^ I'll take a closer look at SQL now, since you, Jonny, told me that it' nevertheless necessary.
Click to expand...
Click to collapse
Welcome
You mean you want to make your ArrayList, which is an instance variable in the activity, accessible to every other class within your package without having an instance of your activity at hands? Well the basic solution would be to make the ArrayList static. But that is not recommended because it won't be created and garbage collected at the same time as your activity and also it's not a nice way .
If you had an instance of the activity it would be just using a public getter for it, but without I'd put your ArrayList into a separate class following the Singleton pattern. That way you have only one global instance which contains the ArrayList.
Thanks again for your reply! I changed my mind about the ArrayList and created a method, where everything is stored in the SharedPreferences and the ArrayList's only purpose is the use with the ListView and Adapter. This way I don't have to write the ArrayList to the SharedPreferences and changes will be much easier to control. Although I had to implement another type of save/load method to interact with the class thats being loaded by xposed. That was needed because of the restriction that you can only load SharedPreferences with a context, which my class doesn't have. It's an inconvenient way, but it works