How to tell where my Deep Links are being shared? - java

Deep linking's picked up popularity recently and I'm hoping to understand them a lot better sooner than later.
I've configured my app for deep linking and can open it from a deep link (testing on a local environment).
However, I can't know any information about /where/ the app was opened... or can I?
For example, if my users install my app, and they share a deep link on Facebook... I can't necessarily "force" them to include any parameters for tracking or analytics purposes!
So in this situation... I'm wondering, how can I know the page they shared it on? I want to get this data. Or is it just impossible? Or, as a last resort, will I have to just "guess" by say, checking what activity was switched out of before my app's activity was launched? (If it is possible...)

You can, you have two options. You can either build it yourself, or use a tool that does this. Branch.io is one option.
If you want to build yourself, you need to do the following:
Generate a link, and have some data in your servers associated with that link. E.g. https://mylink.com/abcd = a link posted on Facebook
When someone clicks, get their IP address, and then redirect them to your app
Upon app open, send IP address, and have your server match that IP address from step 2. If it's a match, voila, you know where they've come from!

Related

How to take a webpage's content to create a native app for it? e.i not just a webview of the website

I want to create an app for a website that I don't own, like youtube or reddit. Every time I search for help, all I keep getting is how to create a webview. I've done that but that's not what I want. I want to take the website's content and create an app with it, like create my own buttons and such. I want to convert a website into an app.
I was thinking of somehow loading the website in the background and creating activities/buttons/intents that basically do what the webpage does but I don't know how to go about that or if there's a better way.
Thank you in advance.
Please let me know if clarification is needed.
Alright i got -3 votes for some reason and it has been 12 hours since i posted this question, i'm guessing the question has been consumed by the abyss of questions by now.
I made a reddit post and got some responses:
one user:
The term you’re looking for is “web scraping“ or “site scraping”. I think that’s probably what you need to research before you’re ready to handle how to make that into an app.
That’s a good starting point and once you have the content from scraping, making the app is no different than any other app.
second user:
If the website has a public (or private) API, you can use your buttons and networking calls to their API to build your client app. You are building a "YouTube client" in this case using the YouTube API.
If they dont have an API and you don't want to display their website, what you are doing is trying to reverse engineer their website and hijack the UI which is not a good practice and may even be illegal depending on the site and terms.
third user:
#second user is right on the money, but one thing I'll like to add is, the goal is to get data off of the website so that you can use in your app. An API is one (convenient) way of doing that but others are,
RSS or similar feed content (prefer this if there website supports)
HTML scraping
The above two will require you store the data somewhere else (and possible expose an API instead) because of technical reasons: you don't have access to older entries in RSS feeds and it's atrocious to keep on scraping everytime you need to access the website data. They can be done on the client (mobile app) but are best done on a server. This means you might need to get your hands dirty writing server code but you don't have to.
/thread
I'm going to do research on website scrapping and APIs to see which route i should go.
Hopefully this helped someone else.

Java/Android - Best way to update apps that are not in the Play Store

I am installing security software/hardware into a couple different school districts. The application is at it's final stage, however I will need to send updates to users periodically. For example, a general password will be changed for the application every 6 months.
Installing an .apk is considered an "update" after the initial application is installed, correct?
I just have a feeling that there should be some easy way of doing this. I don't really want to give people an .apk. Someone could get smart and tear it apart to find the contents. That, and some others might not understand how to install files on their phone.
What are your ideas? Maybe a web link a user can go to that starts the install for them?
You have multiple misconceptions how updating, APKs and keeping keys secure work.
You have to host your APKs somewhere. Github releases is a pretty common way (but slow), but you could also use google drive, dropbox or your own server.
Your app has to fetch the server regularly and check if a new APK is available (pull-based). Second option is to use push notification in some kind e.g. FCM (push-based). Then you download the APK and let the user install it. Your app cannot start a installation by itself, it has to be done by the user.
But you can redirect the user to the installation menu with that APK, so he just has to click "Install". "Install from unknown sources" has to be enabled for that, if not the user will get an information about that from the OS with a way to enable.
There are apps like "APK extractor" which get you the APKs from google play without root, so there's nothing wrong about giving out the APK. Your APK should never contain secure keys which the user isn't allowed to see. It's easy to reverse engineer those keys, it's just a matter of time.

Getting user behavior on the Android Phone (App History, Browse History etc)

Is it possible to get the user behavior on the phone (for example Alpesh has an Android phone and he uses multiple apps, browser YouTube etc). Whatever he is doing on the phone I want to get all those things from behind (which apps he has installed, which app he opens and what he search on the phone, All these data I want to get programmatically so what all can be get in android).
For now I am aware that installed apps list can be get easily but I want to get usage history and what he do all on mobile.
This is not a code solution, but an answer to your question, so you can get start some where.
In my opinion your question title are asking about two things.
(part 1) Getting User Behavior on the Android Phone (part 2)(App History, Browse
History etc)
1- First part Getting User Behavior on the Android Phone:
There is a concept called context awareness. Short described; it is about gathering different information from the phone, like light sensor, motion sensor, sound, location or even user behavior etc. and depending on your app requirement and the gathered information:
You could send these information over cloud data store for statically usage
You could make your phone doing (behavior) different things depending on location, motion or what ever.
etc.
For context awareness it is an open area for pervasive computing research. And it is not just few lines of code to write, it is typically a complete solution depending on requirement. Example I have built a context awareness application to gather noise collected by phones from different locations for research purpose inspired from this framework, but I am pretty sure you can find other frameworks or even build your own, as I did in my case.
The mentioned framework has some examples.
2- The second part is about App History, Browse History etc.:
This is possible, but you still need to build a peace of software (App) to collect all these information (logs) from the phone. Hereafter you can make phone act on different conditions and/or again send it over a RESTful API over cloud service data store, there is no limit for it.
The problem is, there is no thing out of the box for your requirement. Even if you find frameworks you still need to research it and further work on it.
You can find different examples for your requirement, like to collect browser history, you can find SO question here:
Get browser history and search result in android
Or get list of installed application:
How to get a list of installed android applications and pick one to run
My point here is you need to solve small goals at a time and put your knowledge together at the end.
Both 1 and 2 can also be related to each other, depending on your achievement.
Conclusion
Make a goal to your project.
Define the main requirements and tasks of your project.
Research your options (Technology, Cost, Target Audience, What data I can or I should not collect, what is possible to collect, what is the limits, Privacy issues etc.).
Split your project in small assets and try to solve small problems/goals.
Finally you would be able to put the puzzles together and build your final application
but i want to get usage history and what he do all on mobile
This is not possible and shouldn't ever be possible. Each app is sandboxed by Android so apps cannot inspect what other apps are doing. Think about it, you wouldn't want apps to be able to intercept private information such as banking details.
Every app is isolated from the other ones. Unless you develop a system signed app, you will not be able to gather all that data.
What you could do is to develop your own Android Rom where you then develop your data collection the exact way you want. Then you need to distribute your rom, which is another story...

Connect multiple desktop apps to one online database

I'm starting a new project. It consists of:
Java desktop application downloadable from the internet with a client database.
PHP website on the internet with a server database.
The user who downloaded the app will use it to add items (not important what are they now) to the local database offline. When/If he is online, the item will be added to the server database so other connected users (through the desktop app or through the website) will see it.
I googled the issue and found it's more complected than I guess. One of the solution is to use some ready tools like SymmetricDS and Daffodil to gain in term of security, performance and scalability, but they're difficult to configure and install in both client and server side, and need the access to command prompt which requires me to pass to a dedicated host (well, that is not a real problem). Also, all what I want is just what I've described, not all what these tools actually provide.
Can I achieve that by myself within my Java application and maybe with the help of
the web server PHP?
I'm using MySQL for the info.
Edit: what really matters is to send items to the server database. Reading it can be less tricky using RSS Feed reading, for example.
Basically, you can use HTTP/HTTPS API. When a user online, send items to your php file and mark the items "sended" at local database. But you have to control edited or deleted statuses. So, yes that is much complicated but a solution.
Well the easiest solution that comes to my mind would be to save for each item a last edit date (on the server as well as on the client). Additionaly you have to keep track when a client got his last update from the server.
So whenever a client goes online the server sends him all updates.
But for that you have to make sure that the time on the client and the server are the same, and it doesn't solve the problem what happens if two clients edit the same item.
CouchDB solves the distributed synchronization problem very nicely, but it is a NoSQL DB. Depending on what your application should do, using it would boil down to using instances of CouchDB both locally inside very application, and on the central server.
You'd have to deal with conflicts nevertheless. The only thing CouchDB will support you with is easier detection of conflicts, and the data of both conflicting edits, so your application can work it out either automatically, or with user help.
On the other hand, generatin a unique id on the central server can be as easy as adding the creating user's id to each item id.

Android number of exact downloads

From what I know, you can't get the exact number of users which downloaded your app, unless you're connected to your Google plus account. Is that true? (I haven't yet got a google play (android market) account, my app isn't yet up on the market, so i just wanna make sure i'm saying valid things here.)
Is there any way i could programmatically get the number of downloads, preferably in real time?
From what I've found, there isn't an API for the market which let's me do this. So how can this be accomplished?
I need to take that value and in real time update a graph on my website and blog.
Can anyone come up with a workaround for this? One thing i was thinking of was: to either make a Firefox extension which on my home machine, automatically connects to my Google plus account, takes the required value and updates the page via ftp or something, or instead of Firefox extension i could use PHP locally to do the parsing and whatnot. But i'd need to keep my home machine always on, which i don't really want to.
Any other ideas? I really need that exact value, and i need it to be automated :)
When the user downloads the app, you could have it do a callback to a script on your site that does a tally for you. The app should, obviously, only call this on the first run (but, depending on how you implemented it, would probably be called on each refresh of the app's cache/data). If you don't have a service that needs registration, you could have it done in the background.
Not possible by default. The only figures that do exist are only updated daily at most.
You would need to devise your own way to count downloads such as requiring your users to register on your own service.

Categories

Resources