Prevent from duplicate installation in different devices - codenameone

We provide a subscription to our app.
Are there any standard technics to prevent users from duplicate installations in different devices?

In app payment requires that you let a user restore his purchases on a different device. I'm not aware of a standard way to verify that the previous devices content was removed.
If you're asking about just copying the files then there's storage encryption which you can read about here. Notice that it is breakable if someone tries.

You can collect device information from each device and then just compare if the new device is trying to install the app with the same account as in another device.

Related

How to make an option to IMEI in CN1?

I am clear that in ANDROID there are restrictions to obtain the IMEI, but I need to guarantee that the project I have is installed only on allowed cell phones. For this I think that a unique code is necessary that is generated from the cell phone (equal to the IMEI) and that is stored in parallel in the server's database to validate that it is correct.
Is there any way to simulate this condition from CN1?
Google play will block the installation of your app. If you still want to do it you can use:
String IMEI = Display.getInstance().getProperty("IMEI");
Notice that you would need to add the "read phone state" permission to the manifest for this to work.
I don't think this is a good idea though. How will you find the IMEI in the first place to perform the restriction?
Blocking installation isn't a practical option, you should block access so unauthorized users won't be able to launch the app and that's more portable too.
Thank you Mr. Shai, my project blocks access to unauthorized users, but there is the alternative of installing the application on another cell phone and that is what I want to avoid.
Something important, the following link talks about an alternative to have a unique code, but it is totally oriented to android and I do not handle it and I do not know how to implement it in CN1. I copy the link to see if its integration is possible.
Android 10: IMEI no longer available on API 29. Looking for alternatives

How to create a phone tracker in codename one

Pls I Want to develop an app that can track the location of a stolen phone. I was able to fetch "Country, "Carrier, "MCC", "MNC". In my research is as if I will need Local Area Code (LAC)- To detect device in which region.
and Cell ID - Unique id of that region. pls how can I go about this? Or can anybody help with the coding. Thanks
Some of that data is available in the Display class. However, devices block the access to this information to protect users privacy from spyware. You would need complex permissions & authorization to access that sort of information from a system level.
That means you need to understand native code and even if you do this is impossible to implement on locked down platforms such as iOS.

Protecting the video files from access by third party apps from iOS sandbox

I have a requirement where my app records the video files and stores them in app's documents directory. I want no other app should access these files other that my app. I have set file sharing enabled to NO. But I see some apps like iExplorer can show the video files saved under my app's documents directory. Can I know how this can be avoided.
I have also heard that by mounting the iOS device disk to any unix/linux machine can list out all the contents of the app sandbox.
So I want to know how to prevent this happening.
I tried with adding NSFileProtectionComplete as a attribute when saving the file. But this didn't solve the problem. Please help me on this.
Thanks,
I realize this is a little old but in the hopes of helping the next person who stumbles upon this:
You're probably looking for an encryption solution, combined with the standard steps for hiding your app documents folder as you've mentioned. Encryption won't necessarily hide the files but it will make them unreadable.
NSFileProtectionComplete only encrypts files when the device is locked. See the App Programming Guide for iOS section Protecting Data Using On-Disk Encryption. Also, keep in mind that when testing this, you'll have to wait 10-20 seconds after the device is locked before trying to verify that the file is inaccessible. If you want the encryption to persist past that point you'll have to handle it yourself. Something along what's described in this SO post perhaps.

Sharing files without letting the end users store them into their PC

We got PDF files that are only allowed to be viewed in the office. Some users keep those files in the flash drive disk and bring them home or send them to their email. What'd be the best way to prevent this situation. Taking a screenshot of screen is still enabled.
Network : 100 Mbps LAN-based
Number of concurrent users to view file
: Around 50 at a time.
If a user can read a file, he can copy it. You definitely need a piece of software to act as the go-between. There are a few software solutions out there that use DRM encryption to protect your PDF files. Some claim to prevent screen captures as well.
In your situation, you would probably want to have the DRM software check for a license certificate server on your network to ensure they are at the office before letting them open the file. This would allow them to still use take-home thumbdrives and laptops to get work done.
Try searching for "PDF DRM" and see what you find.

using IsolatedStorageFile with Silverlight 4

I am looking at writing a silverlight app that I plan to use OOB setting to enable use on both PC and mac.
I have been doing a little investagation on the isolationstoragefile and what I understand is it will work for both pc and mac without a problem.....Is that correct?
The application I am building is going to be a business application that will submit details back to the main database if there is an available connection. If not then I want to store the information locally until there is an available connection.
My question is lets say I have 3 user accounts using the same machine. Can I have the isolationfile stored in the same place? or must it be under the user profile?
I don't want to have orphaned records which I could see happening if the data is stored on each user's profile.
Any advise would be great!
I understand is it will work for both pc and mac without a problem.
That is correct. You don't need to worry about the mechanics of how it is persisted to disk.
I have 3 user accounts using the same machine. Can I have the isolationfile stored in the same place? or must it be under the user profile?
IS is located under the user profile. In a full trust (elevated) OOB app you may be able to store files elsewhere on the file system by using the FileSystemObject or by using some COM interop, but there is no guarantee that you can get to that file again (NOTE: i haven't played with saving files external to IS, so may be wrong/misinformed on this). If you can whack files out to anywhere on the file system you should be very careful doing it - what if you are running on a Mac?
I don't want to have orphaned records which I could see happening if the data is stored on each user's profile.
If you mean data may be stored locally because of no connection, then that user logs off and never logs back in again to that machine so their data never syncs to the server, then yes that is a possibility. Having a service monitoring for saved data files would be ideal, but you can't do that under SL. To completely eliminate that issue may take a change in your product, like writing it as a WPF client instead of SL.

Resources