Posts

Showing posts with the label android

Auto scroll horizontally barteksc pdfviewer

Auto scroll horizontally barteksc pdfviewer I have been trying to make the pdf viewer to automatically scroll horizontal. Can some one suggest me how to achieve it? Could you show us what have you tried so far? – Dima Kozhevin Jul 1 at 9:45 I just used the 'com.github.barteksc.pdfviewer.PDFView' library and want to know if auto scroll is possible. – Health Home Jul 1 at 9:50 By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Does Android 8+ support adhoc networks?

Does Android 8+ support adhoc networks? I want to create an app that can connect to a PC by wifi without the need for a router. Is it possible to do such a thing on the latest androids? Their tracker says "Won't fix (obsolete)" and past SO questions say "not yet" but those are from 2011. By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

support repository in Android SDK Manager

Image
support repository in Android SDK Manager cannot see the support repository in Android SDK Manager to install constraint layout Click on Launch Standalone SDK Manager or Switch for extra customization. – Khaled Lela Jul 1 at 12:15 Launch Standalone SDK Manager Switch I did so.But it still doesn't show up. – Shravya Jul 1 at 14:28 By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Duplicate Resources: Is there a way to automatically ignore the duplicate resource when building in android studio

Duplicate Resources: Is there a way to automatically ignore the duplicate resource when building in android studio I'm new to Android propramming and this is also my first time asking a question in here, so if my question or my English is not good or sounds stupid to you, I'm sorry about that. Back to my question, suppose that I have 2 res folder but not in the same path,and with each of res folder which has a values folder. In values folder, there is a string.xml file. (See the picture below). Inside of each of string.xml file, there are 2 string names which defined similarly. When I build the project, error occurs. Error:Execution failed for task ':app:mergeDebugResources'. [string/app_name] E:AndroidStudioProjectstestappsrcmainresvaluesstrings.xml [string/app_name] E:AndroidStudioProjectstestappsrcmainjavacomexamplequywntestresvaluesstring.xml: Error: Duplicate resources Of coure with only 2 string.xml file, I can rename or delete it manually, but when I have a lot...

How to use camera roll image in webview react native?

How to use camera roll image in webview react native? I'm trying to capture image from a webview in react native and then display the same on my html page. Problem: I cannot access camera and save images from webview. Solution: I am capturing and saving the images using react-native-camera. Next Problem: I want to display this above saved image in my webview and then save it on a server. Note: My page is able to capture and save the data on server when i am opening it in a browser. I am facinf issues with webview in react native. mywebview.js file import React from 'react'; import { StyleSheet, View, WebView, ActivityIndicator } from 'react-native'; const HtmlPage = require('./index.html'); const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center' }, horizontal: { flexDirection: 'row', justifyContent: 'space-around', padding: 10 } }) class WebViewScreen ex...

Namespace not found android

Namespace not found android I try to make a new project in android studio but get this error Namespace '' is not bound less... (Ctrl+F1) This inspection checks for unbound namespace prefixes in XML, Somebody can help me? We need more information here, paste a complete error stack – Digvijaysinh Gohil Jul 1 at 9:30 By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

SQLiteException when querying a SELECT [on hold]

SQLiteException when querying a SELECT [on hold] I am developing an Android application with an SQLite database. It records transactions. The transactions table has the colums: transactions idTransaction INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT date DATE NOT NULL type INT NOT NULL details VARCHAR(100) NOT NULL notes VARCHAR(300) NOT NULL amount DOUBLE NOT NULL account INT NOT NULL category INT NOT NULL Also I made a method to get a cursor with all transactions: // Select all Transactions protected Cursor getTransactions() throws SQLException { Cursor mCursor = null; String colums = new String{"idTransaction", "date", "type", "details", "notes", "amount", "account", "category"}; mCursor = this.getReadableDatabase().query("Transactions", colums, null, null, null, null, "name ASC"); return mCursor; } In other class I made a method to move through the cursor that I get whe...

I have some data in Firebase and want to retrieve it. Sometimes it can be null. How do I not get an exception for it?

I have some data in Firebase and want to retrieve it. Sometimes it can be null. How do I not get an exception for it? FetchDataMethod private void fetchData() { mDatabaseReference.child("UserData").child(RecieversId).addChildEventListener(new ChildEventListener() { @Override public void onChildAdded(DataSnapshot dataSnapshot, String s) { ImageView Image = (ImageView) findViewById(R.id.imageView); TextView Name = (TextView) findViewById(R.id.name); TextView Status = (TextView) findViewById(R.id.status); TextView Email = (TextView) findViewById(R.id.email); TextView Ph = (TextView) findViewById(R.id.ph); TextView Quote = (TextView) findViewById(R.id.quote); for (DataSnapshot postSnapshot : dataSnapshot.getChildren()) { String image = postSnapshot.child("Image").getValue().toString(); String name = postSnapshot.child("Name")....

Cascade delete based on @ForeignKey in Android Rooms ORM

Cascade delete based on @ForeignKey in Android Rooms ORM I have two entities DBList adnd DBListContent . With one to many relationship between DBList and DBListContent . DBList DBListContent DBList DBListContent Here is the DBList class DBList @Entity(tableName = "lists") public class DBList { @PrimaryKey private String listId; private String title; private String createdDateTime; } Here is the DBListContent DBListContent @Entity(tableName = "listContents") public class DBListContent { @PrimaryKey public String listContentId; public String content; public String lastEditedBy; public String lastEditedDateTime; @ForeignKey(entity = DBList.class, parentColumns = "listId", childColumns = "dbListId", onDelete = CASCADE) public String dbListId; } When I delete a row in lists table, the corresponding rows in the listContents table are not deleted. lists listContents I deleted the rows using the following ...

Android Error to get location

Android Error to get location Hello I want to get location but it is not loading. My class for load location: public class GetGPCAdress implements LocationListener { Activity activity; GetAdress getAdress; public GetGPCAdress(Activity activity, GetAdress getAdress) { this.activity = activity; this.getAdress = getAdress; try { LocationManager locationManager = (LocationManager) activity.getSystemService(Context.LOCATION_SERVICE); locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1, 5, this); } catch(SecurityException e) { e.printStackTrace(); } } @Override public void onLocationChanged(Location location) { getAdress.get_gpc_address(location.getLatitude(), location.getLongitude()); } .... and from activity i run it private void load_locatio () { Log.d("NekTest", "StartLoadLocation"); new GetGPCAdress(activity, new GetGPCAdress.GetAdress() { @Override public void ...

Notification Option in Firebase Assitance is not showing

Image
Notification Option in Firebase Assitance is not showing The Notification Option in Firebase Assitance is not showing. I search a lot but i did not find solution. if You know please help I am beginner Typically screen shots of code are not helpful. Please post the code and configuration you have so far as TEXT . – RyanNerd Jul 1 at 7:14 @RyanNerd The Firebase Assistant is a GUI add-on to Android Studio. In this case the screenshots seem the only way to show that OP is looking for. – Frank van Puffelen Jul 1 at 14:28 @Farooq: To be able receive notifications in your app, just add the Cloud Messaging library. To do more advanced things, see the links in SHRAIYSH's a...

Android - app has been rejected because it is primarily child-directed

Android - app has been rejected because it is primarily child-directed I made an app in Adobe Animate for Kids which was accepted 1st time and after some days I added Admob ads in my app and did not change anything except this. But now my app is not accepting on play store and first release is still online. Can anyone guide me what issue can be here. This is my app id air.com.ejaz.kidsabc and this is the email which i received on rejection on 2nd release Thanks for submitting your app to Google Play. I reviewed KidsABC Learn, air.com.ejaz.kidsabc, and had to reject it because your Play Store listing suggests your app may be primarily directed to children under the age of 13 as defined by COPPA. Apps that are primarily child-directed must opt-in to the Designed for Families program. If you submitted an update, the previous version of your app is still live on Google Play. Here's how you can submit your app for another review: Read through the Primarily Child-Directed Dec...

Implement a search bar like Google Maps' in an Android application

Image
Implement a search bar like Google Maps' in an Android application I'm building an app that makes use of Google Maps API, and I want it to have a floating search bar at the top, exactly like the one present in Google Maps app. I've found out about Places Autocomplete, but the application will not search for places but another kind of data that the users will have created. I've also found out about a library named Float Search View, but it's been discontinued for some time already, therefore I'd like to pass on this. I'd also like to create it manually because this is the first Android app I'll be building, I want to learn. I have tried implementing a SearchView in my XML: SearchView <android.support.v7.widget.SearchView android:id="@+id/searchView" android:layout_width="match_parent" android:layout_height="wrap_content" app:iconifiedByDefault="false" app:queryHint="@string/search_hint...

log file for errors?

log file for errors? I am developing an Android-App with "Aide".Aide is an app for developing android apps with android devices. When i start the app, i have created, i get an error like "the app has aborted unfortunately". how can i resolve what happened wrong ? is there a log-file where i can see the stack trace ? is ist possible that everytime an error happens a dialog apperas with the stack trace instead of the message "the app has aborted" ? thanks for everybody who can help me. Greets Arne 4 Answers 4 If you want to observe the stack trace, all you need is a LogCat reader, like CatLog, for instance. Note that if your device is Jelly Bean of higher, you'll need root permissions to read the logs. EDIT: Further research indicates that there is a LogCat reader built into AIDE. The root permission issue still applies. I have never used Aide, but the concept will ...

Button background as transparent

Button background as transparent I have a button. When I press the button I have to make text as bold otherwise normal. So I wrote styles for bold & normal. <style name="textbold" parent="@android:style/TextAppearance"> <item name="android:layout_width">wrap_content</item> <item name="android:layout_height">wrap_content</item> <item name="android:textStyle">bold</item> </style> <style name="textregular" parent="@android:style/TextAppearance"> <item name="android:layout_width">wrap_content</item> <item name="android:layout_height">wrap_content</item> <item name="android:textStyle">normal</item> </style> Now I have a button_states.xml as: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <...

Issues with XML Layout and Software Buttons

Image
Issues with XML Layout and Software Buttons So basically I have an activity with 4 buttons that in Android Studio look out of the way of the software buttons at the bottom of the screen but when I run it on my phone they are not. I'm not sure if I have the right constraints on the bottom button or not? <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".NewMainMenu" tools:layout_editor_absoluteY="25dp"> <Button android:id="@+id/button" android:layout_width="411dp" android:layout_height="100dp" android:layout_marginTo...

Text Size Change in Adapter class updates text size in all activities

Text Size Change in Adapter class updates text size in all activities The following is my WordAdapter class WordAdapter public class WordAdapter extends ArrayAdapter<Word> { /** Resource ID for the background color for this list of words */ private int mColorResourceId; /** * Create a new {@link WordAdapter} object. * * @param context is the current context (i.e. Activity) that the adapter is being created in. * @param words is the list of {@link Word}s to be displayed. * @param colorResourceId is the resource ID for the background color for this list of words */ public WordAdapter(Context context, ArrayList<Word> words, int colorResourceId) { super(context, 0, words); mColorResourceId = colorResourceId; } @Override public View getView(final int position, View convertView, ViewGroup parent) { // Check if an existing view is being reused, otherwise inflate the view View listItemView = convertView; if (listItemView == null) { listItemView =...