I am new to Android app development, I have a simple app which works on WebView to open a website. I want to add "bookmark this webpage" option in my app but I don't know how to proceed.
You can add any button to your app. Or if you are using Toolbar you can add bookmark button to your options and you can save the page url to Sqllite database or any other storage. There are many other ways also.
you can have a look at the following links-
First- Second-
I hope this would help you.
Well you can create a class for that extends SQLLiteOpenHleper. This provides functionality for accessing sqllite database-
You can refer to this and this link for SQlLite..
And you can create a query for creating a table having columns like id, bookmark name and bookmark url.
You can also add some functions for setting name and url, getting name and urls etc.
I hope you find this helpful.
Related
I have a flutter application and I am using firestore database, but when I add a URL in the description field and run my application, this URL is not clickable, it stays like a text, just like the rest of the description
How can I make it work the way I need it?
It's probably a better idea to store the url on the database as a separate attribute. You can then decide when and where to display it. If you keep it in the description text then you have to search for and extract it.
I am trying to create an app that displays a list of pdf files, and then load the pdf file in a new browser tab / android activity.
The idea is the user will click a button "Lectures" and then will be shown the list of lectures, clicking on any list item will load the specific pdf file.
I currently have a node js mysql back end, for user login and routes to other pages, which is followed up with both a handlebars and android front end.
I am struggling to understand how I can store pdf files so they can be called based on what the user clicks, I want to store the pdf files on a server rather than within my application and then call them when required.
I have seen a method using ejs view engine to render list of files in public folder, which then allows you to do this, but this entails storing pdfs within the application, alternatively I can host the files with my web hosting, still need to figure out how to load them based on user action.
Would appreciate any direction or solution!
Thanks in advance
Mohamed V
Without knowing how you have the DB set I will talk more along the lines of how you would do this and then modify as needed. In most cases you would probably want to use an object store to store the PDF files. This will allow for access on any application.
Your DB should contain a file name of the PDF file, as an example, lets say you table for 'files' is as such
id, filename, name, extension, courceID
Here you would have the filename maybe the extension type and a refrenceID
Next, in your response callback, you simply return the query for the files, for example let say you run a query like SELECT filename, name WHERE courceID = '12345'
You then return this to the view, if its ejs then you would just pass the object and do something like
<% for ( in in files ) {%>
<div><a href="url-to-object-store/<%-files[i].filename%>"><%-files[i].filename%>
<%}%>
I'm currently doing a project from one of my subjects in my university. I'm about to do an attendance app that checks if the professors are present, late, or absent in the room based on the schedule. I made an app in an android studio which uses radio groups and radio buttons that will change the text in the text view which will show if the professors attendance status. I'm thinking of making a button that will upload the text views with the attendance statuses to a website which holds the data(database).
I'm not used to programming in the android studio that is why I would like to know if a way to upload the text views on a website. Thanks
It's quite simple, You have to create Weg api that you can call from the android mobile application and pass the current status of the professor or the whatever you want to pass on the server. That api will update the database as per whatever you have passed from the mobile application.
Also, One more thing that you can not pass the text view, you just need to pass the text of that view.
I hope, you will get answer from this.
Happy coding...
Assign value of textview to a string variable.
And use this string in your api to pass data.
For example if you have a textview with name teacher, you can get its value using this line.
String st_teacher = teacher.getText();
Now use that st_teacher value in your api to upload data.
I am Building an app to upload images to my company server,
Now on our server there are categories(just folders) built into our file upload system
The Thing is I am going to make a listview/spinner to select the category(generated from a json) I just want to know the feasibility of using that selection and then calling the selection in Uri.builder, just need to know if it is possible before i start coding
This is Actually easily solved
So you create a String to assign to the data you will pass to the URI Builder
Then You add Something like this to your spinner onItemSelect
Task=taskSpinner.getSelectedItem().toString();
Then in the URI Builder
you add something like this
.appendQueryParameter("TimeLogMinutes", minutesText.getText().toString())
I have successfully added a word to Android's predefined user dictionary, but i want to create a custom dictionary which can only be accessed by my application.
For example: When i type "lol", the suggestions show me "laugh out loud" but when I want another meaning of "lol" then I can manually add another meaning of "lol" (eg, "xxxxxx" - so the next time the user writes "lol" in an EditText, the suggestions will show him "xxxxxx").
No other application should have access my dictionary data.
I have worked with spell checker class but it gives me only correct word and I can't my own word meanings.
Please give me some suggestions or links.
There is an Androids inbuilt class UserDictionary so that you can add your spells programmatically into that, Here is a link you can go through with , and which may relates to your problem .(In this solution nidhi has manged programmatically to retrieve data back)
Add word to user dictionary and retrieve them back from dictionary
In addition you can go through following links to :
http://developer.android.com/reference/android/provider/UserDictionary.html
http://developer.android.com/reference/android/provider/UserDictionary.Words.html
Moreover if you want a custom personal dictionary then manually you have to store words and retrieve them back .
Hope that helps !!!