I wish to show my other apps under "More Apps" section of while exiting.
What is the the best way to do it ?
Is there is any common library to add my app icon and link of my app. so that It can be shown at the time of interest. It would be great if it is scrollable
Thanks is Advance !
Well since these are your apps you can simply hard-code the icons into a RecyclerView or ListView along with a link leading to Google Play. This really doesn't require a third-party liubrary as it can easily be done by yourself.
If you really want to allow for future expansiveness, you could use a cloud platform like parse where you store the names of different apps as parse objects along with a link and an image (logo). Then you could write a custom adapter for your list which takes the parse objects from your cloud, and populates itself with the logo,link,title,etc.
This is really a matter of comfort and preference rather than finding a library to do this for you. If you need help, feel free to ask, and good luck!
You can show a 'Dialog' asking if the user cares to check some of your other apps with two available options: 'yes' and 'no'. If the user chooses
'no', close the dialog, if he chooses 'yes' - redirect him/her to the following url:
https://play.google.com/store/apps/developer?id={Your-Google-Account-Name}
This link will be opened either in the browser or in the Google Play app, whichever your user prefers, and it'll show him/her the list of all your apps.
You can try overriding finish() (Documentation) method inside your Activity. If you're using multiple Activities, consider creating a base Activity so that you don't have to implement this in each Activity.
That said, please consider not doing this. As a user, I'd be super annoyed if I'm trying to close your app and you're not letting me do it. That'd be instant uninstallation from my side. Never annoy your users. Respect their experience.
Related
Background
I work on an app that can answer to certain queries (phone number queries, and maybe others).
Google introduced a new feature on Android 6 , called "Google Now On Tap" (AKA "Assist API") , which allows the user to query about things that are shown on the screen (triggered by long-click on home button or by saying something) without the need to type anything.
Google provided a developers tutorial for it, here
The problem
I can't find any code snippet to show how to prepare the app for it.
Only thing that I've noticed is that I can extend from Application class, and add OnProvideAssistDataListener inside , and register to it.
But, it opens a lot of questions about how to do it.
Sadly, because this topic is so new, I can't find almost anything about it, so I'd like to ask the questions here.
The questions
1) Is there any sample or at least a more explained tutorial for this new feature?
2) It is said in the docs:
In most cases, implementing accessibility support will enable the
assistant to obtain the information it needs. This includes providing
android:contentDescription attributes, populating
AccessibilityNodeInfo for custom views, making sure custom ViewGroups
correctly expose their children, and following the best practices
described in “Making Applications Accessible”.
Why and how does it work with the accessibility features of the app? What does it have anything to do with exposing child views (or views at all)? How could it even be about views, if the app doesn't run yet (because the feature is activated on any app, anywhere).
What I think is that this is called only if the foreground app is my app, but if it is this way, how can I actually offer queries that appear for all apps, depending on what the input is?
3) Does the class that extends from Application supposed to implement OnProvideAssistDataListener ? If so, why does it need to register to it? If not, how could it be that Google-Now-On-Tap works with it? It can't just open all apps that have such a classs, and see if they register...
4) The docs have a sample snippet which I didn't understand:
#Override
public void onProvideAssistContent(AssistContent assistContent) {
super.onProvideAssistContent(assistContent);
String structuredJson = new JSONObject()
.put("#type", "MusicRecording")
.put("#id", "example.comhttps://example.com/music/recording")
.put("name", "Album Title")
.toString();
assistContent.setStructuredData(structuredJson);
}
What does the new feature do with each key? Is it used by the app, or Google-Now-On-Tap ? What are my options about it?
Is this where I define if my app can handle the content that the feature suggests me? Is AssistContent supposed to be the input that I look at, and decide if my app can handle it or ignore it?
I'm new in Android programming and I need some help.
I'm doing an app for my thesis and I need at the first access(installation) to have an information page(like Google Calendar when recently installed). And the user will be able to go on pressing on a "Next" button.
This "page" must be visible only if the application is removed and after a while reinstalled.
Can someone help me to handle this?
There are many ways to go about this. One of them would be to take advantage of the SharedPreferences in Android. Make a default value of false. When your app starts, check the value in the shared preference that you set. If it is false, show the information dialog and then set it to true. If the value is true, continue with application startup. SharedPreferences will be deleted when you uninstall the application, so your information dialog will be shown again if the user uninstalls and then re-installs your app.
Here are some examples of using SharedPreferences.
You need to store some kind of flag for this, for example you could use SharedPreferences and store a key called "firstLaunch" with a default value of true. At startup read the flag, show info if it's true, and set to false.
There is a library called Showcase View to visualize the most important functions of your app.
The ShowcaseView (SCV) library is designed to highlight and showcase specific parts of apps to the user with a distinctive and attractive overlay. This library is great for pointing out points of interest for users, gestures, or obscure but useful items.
You could use that to develop your information page.
I develop the app which is provide some information to general user. it is not only showing info but also curating and recommending further detail info depending on users history;what the users clicked, searched and acted on the app. (like a google targeting AD).
For this, I have to accumulate user's activites on apps. (which button was clicked, when did they turn on the app and so on...)
For this, I have two ideas.
1. let the app to leave their log text file in local device then append lines in it whenever user act, and upload it when they turn off the app on server DB.[like a batch]
-OR-
2. let the app, update db everytime when user acts something on app by http-post.[like a realtime]
Which way is common tactics(or popular ways) on real field? or can you suggest another way?
thanks for reading.
I am pretty new to the mobile end of development so forgive my naivety.
I would like to know if it's possible to have a structure/distribution model like the following:
Master App (has many "middle-man" instances)
!
!
Middle-man ( can customize data, look & feel, via web app and redistribute)
(has many end user viewers)
!
!
!
End User viewers( can download and install middle-man abc's app with middle-man's custom info)
Is this possible? I have searched around for quite a bit but perhaps I am searching the wrong terms?
I was thinking perhaps a couple options, let me know if it's sounds wrong.
Option 1 - Middle-man provides a special key code and end user types it in after installing the app to unlock it thereby storing the unique middle-man ID and displaying only their custom info. User only needs to enter code once. relation is stored in mysql perhaps??
Option 2 - create a build of the master template for each middle-man and provide the binary/install link along with a customized ini file to load correct ID? Or something to that effect.
Any better options out there? Something that allows for upgrades/new features to be passed down to all the instances easily.
Will this type of thing have any problems with the apple store if multiple middle men decide they want it on the app store?
Maybe I'm making it more complex than needed and could just use a simple "require login" for each end-user and the end user is tied to that middle man some how?
\The app could also be android app depending on middle-man requirements
Thanks in advance for any advice or links to helpful info.
If i had understood your question right, its a straight forward mobile app tied up with the backend.
User credentials for the middleman which shall associate with your
special key code.
Associate your actors(users) with roles and permission over accessing
content in the backend.
Your mobile app will pull the content only associated for the logged
in user.
Apart from this, you can store the content for offline etc.. Take phonegap approach and it pretty much does what you wanted to do.
I am currently developing an app for android 2.2 or above.
I want to allow the user to enable a login before having access to the app. I want to allow the user to choose between various types of login like password, pin or pattern.
I was wondering if would be possible to add a pattern lock to my own app. Is there a plugin I can use to create one or use android's pattern lock for my own app. I only want this for the app I don't want it to change how the actual device is locked.
Thanks for any help you can provide.
I dont think there is a widget for this. I would create a matrix of images 3x3 give them each a listener and keep track of the order the user presses them. Then take the order, 2,3,6,5,8 for example, save them as a string "23658" this is the password! hash and save that somewhere. whenever a user inputs the button order compare the input hash to the saved one.
If any body is still searching for the answer, I found this library which is pretty useful and much better than the android-lockpattern, hosted on GitHub
There is source for this though:
http://code.google.com/p/android-lockpattern/source/browse/src/group/pals/android/lib/ui/lockpattern/widget/LockPatternUtils.java?r=7470bc287cba61198430e3d8aff32196bb5824a0