[Q] Problem with maps support api. - Java for Android App Development

Problem with a project using Google Maps Support Api. I have no problem using the current maps api, the problem is when I try to use the support api. I have this line:
Code:
googleMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.staticmapMap)).getMap();
..which works fine as "MapFragment" and "getFragmentManager".
In my XML I have:
Code:
<fragment
android:id="@+id/staticmapMap"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment"/>
The error I keep getting is :
An instance of type 'android.support.v4.app.Fragment' can not be of type 'com.google.android.gms.maps.SupportMapFragment'.
Click to expand...
Click to collapse
Any ideas how I can fix this to use the support framework? I have searched the web far and wide, tried tweaking my code several ways but no solution seems to work.
Thanks

Related

[Q] Google homepage location isnt working!

Hi this problems been happening for a while now, when i go on the homepage google where the blue dot for location should be, it says this instead
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
"Xxxx://xxxxxxxxxx/DTD/xhtml-mobile10.dtd" >
<html xmlns="xxxx://xxxxxxxx/1999/xhtml">
<head>
<title>* Error *</title>
<!--
Change href="style.css" below to the file name and
relative path or URL of your external style sheet.
-->
<!--
<link rel="stylesheet" href="style.css" type="text/css"/>
<style> document-wide styles would go here </style>
-->
</head>
<body>
<h1>Sorry</h1>
<ul>
HTTP request was interrupted by the host!
</ul>
</body>
</html>
My wildfire is rooted using the generic htc rom from shipped roms, any help or advice would be much appreciated. Thanks
Can someone help please
What about looking into the Internet settings and find something like "Location Permissions" ?
I guess you can find it there
going to www.google.com always shows me location not available.
m.google.com/m does. Try that for a change
thanks, I use google.com like sander said, guess the UK's versions has bugs atm

[Q] Eclipse - check API specific code ?

Does anyone know how I can get Eclipse to check my code & see if all the API calls will work on a specific revision ? I've just written some code that used -
Code:
.getTextContent()
on an XML node. Worked fine on my (2.2) phone, but others were getting "Force Close" errors. I eventually worked out they had Andy 2.1, and getTextContent() was introduced in 2.2. OK, I rewrote it to use
Code:
.getNodeValue()
as I want it to run on their phones.
Is there any way I can get Eclipse to check my code against the Min SDK Version, to ensure all of it will work ? Sorry if its an obvious question, but its really annoying me. Thanks.

[Q] Color of status bar and navigation bar.

Hello everyone,
I am a beginner developer and I love design material. I've searched but I can not find how to change the color of status bar and navigation bar without needing root.
Thibaut
use this library system tint library
Thank you,
I just installed the library. I wanted to change the color but the library crashes the application, but I have no errors in eclipse.
There is no way to change the color without library?
Thibaut.
luxe38 said:
Thank you,
I just installed the library. I wanted to change the color but the library crashes the application, but I have no errors in eclipse.
There is no way to change the color without library?
Thibaut.
Click to expand...
Click to collapse
Logs, or it didn't happen.
For now I can’t see because I have a new problem .
What should I do ?
Thibaut.
luxe38 said:
For now I can’t see because I have a new problem .
What should I do ?
Thibaut.
Click to expand...
Click to collapse
You haven't added the library well.
OK, no import problem after restart Eclipse. Here the error I get:
Thibaut
luxe38 said:
OK, no import problem after restart Eclipse. Here the error I get:
Thibaut
Click to expand...
Click to collapse
Library still not properly added, copy the jar file to lib folder in your project.
Its still not working.
Thibaut.
luxe38 said:
Hello everyone,
I am a beginner developer and I love design material. I've searched but I can not find how to change the color of status bar and navigation bar without needing root.
Thibaut
Click to expand...
Click to collapse
you can do this by creating your custom theme for action bar .[xml approach]
<View
android:id="@+id/statusBarBackground"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
public void setStatusBarColor(View statusBar,int color){
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
Window w = getWindow();
w.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS,WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
//status bar height
int actionBarHeight = getActionBarHeight();
int statusBarHeight = getStatusBarHeight();
//action bar height
statusBar.getLayoutParams().height = actionBarHeight + statusBarHeight;
statusBar.setBackgroundColor(color);
}
}

VoLTE and WiFi Calling Working on MetroPCS (and probably other T-Mobile MVNO's)

DISCLAIMER: This will only work on Android 8.0, and may not work on some versions of 8.0 depending on the security patch date. I'm using firmware version 47.A.1.16.20 with a security patch level of 2018/09/01.
I figured out how to get VoLTE and WiFi Calling to work on MetroPCS. The XZ1C works on T-Mobile because it recognizes T-Mobile specific SIM cards and loads the appropriate files when it detects one. For whatever reason, MetroPCS has SIM cards that don't provide a sim_config_id that the phone will recognize as being part of T-Mobile. The list of sim_config_id values that are recognized are contained in a file located within the APK /oem/overlay/com.sonymobile.customizationselector-res-305.apk. Within the APK, the file is located at /res/xml/configuration_selectors.xml. The xml contents are listed below:
Code:
<?xml version="1.0" encoding="utf-8"?>
<configurations>
<configuration config_id="408">
<sim_config_id>S264.1</sim_config_id>
<sim_config_id>S264.2</sim_config_id>
<sim_config_id>S264.3</sim_config_id>
<sim_config_id>S264.4</sim_config_id>
<sim_config_id>S264.5</sim_config_id>
<sim_config_id>S264.6</sim_config_id>
<sim_config_id>S264.7</sim_config_id>
<sim_config_id>S264.8</sim_config_id>
<sim_config_id>S264.9</sim_config_id>
<sim_config_id>S264.10</sim_config_id>
<sim_config_id>S264.11</sim_config_id>
<sim_config_id>S264.12</sim_config_id>
<sim_config_id>S264.13</sim_config_id>
<sim_config_id>S264.14</sim_config_id>
<sim_config_id>S264.15</sim_config_id>
<sim_config_id>S264.16</sim_config_id>
<sim_config_id>S264.17</sim_config_id>
<sim_config_id>S264.18</sim_config_id>
<sim_config_id>S8663.1</sim_config_id>
</configuration>
</configurations>
In order to get the MetroPCS SIM recognized, you need to add one line to the bottom of the list. This changes the code to the following:
Code:
<?xml version="1.0" encoding="utf-8"?>
<configurations>
<configuration config_id="408">
<sim_config_id>S264.1</sim_config_id>
<sim_config_id>S264.2</sim_config_id>
<sim_config_id>S264.3</sim_config_id>
<sim_config_id>S264.4</sim_config_id>
<sim_config_id>S264.5</sim_config_id>
<sim_config_id>S264.6</sim_config_id>
<sim_config_id>S264.7</sim_config_id>
<sim_config_id>S264.8</sim_config_id>
<sim_config_id>S264.9</sim_config_id>
<sim_config_id>S264.10</sim_config_id>
<sim_config_id>S264.11</sim_config_id>
<sim_config_id>S264.12</sim_config_id>
<sim_config_id>S264.13</sim_config_id>
<sim_config_id>S264.14</sim_config_id>
<sim_config_id>S264.15</sim_config_id>
<sim_config_id>S264.16</sim_config_id>
<sim_config_id>S264.17</sim_config_id>
<sim_config_id>S264.18</sim_config_id>
<sim_config_id>S8663.1</sim_config_id>
[COLOR="Red"][B] <sim_config_id>S8957.1</sim_config_id>[/B][/COLOR]
</configuration>
</configurations>
If you're on a different T-Mobile MVNO that supports VoLTE and WiFi Calling, but it's not working on your XZ1C, you can probably still get this to work. You'll need to figure out what sim_config_id to use using the following command:
Code:
adb shell getprop persist.sys.sim_config_ids
This should output a value similar to S8957.1. Use your value in the configuration_selectors.xml file.
You also need to change the overlay priority in the AndroidManifest.xml file. The normal overlay has a priority of 305. I changed mine to 310, but anything over 305 should work.
Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="[B]your.package.name[/B]">
<overlay android:priority="310" android:targetPackage="com.sonymobile.customizationselector"/>
</manifest>
In order to modify this APK, I used apktool to decompile the original APK and compile the modified APK.
https://ibotpeaches.github.io/Apktool/
I followed the guide located here:
https://forum.xda-developers.com/showthread.php?t=2213985
Once the APK is built and signed, install it with adb
Code:
adb install yourapkhere.apk
This is an overlay file which works using RRO, so you need to give the file the proper permissions to run. Enter the following command:
Code:
adb shell cmd overlay enable --user 0 yourapkhere.apk
Reboot your phone and the overlay should be active.
Due to the way the phone works, you need to trick the phone into loading the correct modem binary file. It loads a default modem when it doesn't recognize a T-Mobile SIM. But it won't load the T-Mobile modem even if you install the APK. I ended up having to get an unactivated T-Mobile SIM and put that in the phone to trigger the switch. Once you trigger it, you'll get a popup saying that the phone needs to reboot to optimize for your network. After it reboots and loads the proper modem, you can shutdown, put in your MetroPCS SIM card and boot. That should do it.
There's one big caveat: This will only work on 8.0. The overlay permission model changed in 8.1+ so this change won't work on those ROM's. The fix is still good, but you'd need to use root to make the change. I'm sure there will be a way around this eventually, but I don't have one at the moment.
For more technical information, I tracked my progress trying to get my X Compact working on MetroPCS with VoLTE and WiFi Calling. There's a lot of information regarding the XZ1C in there that might be of interest.
https://forum.xda-developers.com/x-compact/how-to/trying-to-figure-how-to-enable-volte-t3877692
Theoretically, this should work for the XZ1, the XZ Premium (with proper files flashed), and possibly other Sony phones that contain the correct modem binary file. If you get it to work, please reply to the thread.
Here are some pictures showing the features working.
camdecoster said:
Here are some pictures showing the features working.
Click to expand...
Click to collapse
What program did you use to check if volte and wifi calling works or not?
Yevgen.A said:
What program did you use to check if volte and wifi calling works or not?
Click to expand...
Click to collapse
I didn't use a program, just the dialer. If LTE stays on during a call, that means VoLTE is working. A WiFi call will show the symbol seen in my picture.
Fix for Android 9?
echo124 said:
Fix for Android 9?
Click to expand...
Click to collapse
As mentioned in the OP, this fix only works on Android 8. If you're on 9, you'll have to root.
camdecoster said:
As mentioned in the OP, this fix only works on Android 8. If you're on 9, you'll have to root.
Click to expand...
Click to collapse
Great, how to apply after? Danke
echo124 said:
Great, how to apply after? Danke
Click to expand...
Click to collapse
You should be able to follow the same procedure, though you'll likely need to unlock the bootloader.
.

[ROM] [UNOFFICIAL] LineageOS 20.0 (Android 13) for Mi 8 Lite [platina]

Changelog :
- Initial build
- Android 13.0.0_r16
- Based on 4.4 kernel
Downloads :
Here
Flashing instructions :
- Perform a backup of your current ROM (optional)
- Use TWRP from above download link (this TWRP is able to decrypt FBE encryption).
- Perform clean install from TWRP (factory reset, format data and wipe system)
- Flash ROM
- Flash GApps (optional).
What's not working:
Let me know.
Source : https://github.com/LineageOS
Kernel : sdm660
Device tree : platina
Hi you, thanks for bring los 20 to mi 8 lite.
Is this kernel editable for change battery capacity in directory sys/class/power_supply/*/charge_full_design? Mine has upgrade to redmi note 8 battery but never reach actual capacity with new battery. I think its limit from kernel.
Can you provide that feature in the next update?
Thanks you
So far everything works fine. Battery consumption is as exspected. Nice work. Thanks.
I have a problem when taking a photo through whatsapp on the main camera, I press to take a photo and it locks, it returns to whatsapp with a message talking about application permissions, the front camera does not have this problem. Sometimes it works, but most of the time it has this problem.
obs: now remembering pixelExperience 13 I also had the same problem.
falcaoab10 said:
I have a problem when taking a photo through whatsapp on the main camera, I press to take a photo and it locks, it returns to whatsapp with a message talking about application permissions, the front camera does not have this problem. Sometimes it works, but most of the time it has this problem.
obs: now remembering pixelExperience 13 I also had the same problem.
Click to expand...
Click to collapse
If you can replicate that issue and grab the log, it will be very helpful.
sabar_op said:
If you can replicate that issue and grab the log, it will be very helpful.
Click to expand...
Click to collapse
how do i do it? how do I activate the log and which folder does it go to?
Hey,
So far so good . Thanks
thank you very much i tried it no problem it needs some more improvement but successful
thank you for this beautiful rom. However I have
1) a problem with location (no GApps istalled), as unifiedNLP or microG apparently will not do the job.
2) USB connection over Android file transfer works on one computer, but not on the other. Same type Mac, same OS.
3) for a Gapps install, if necessary for location: How to?
4) also SBBmobile, a Swiss public transport app, or Öffi, a german publich traffic app, will not work (yet)
5) Volkswagen maps & more, a app for the Volkswagen e-Up complains aiut 'not enough memory', but had worked fine on LineageOS 17.
Installed over adb sideload after system sweep, with pitchblack twrp.
After a re-install, mi8 lite now connects correctly with android file transfer, location works except on SBB Mobile and Öffi and ZVV transport, all of which requesting precise location, which is on but does not seem available to these apps.
Hi, can you add the "Double tap to sleep" feature to the home screen?
I am using this (https://forum.xda-developers.com/t/...illa-by-zeelog-stable-no-bugs-smooth.4516771/) rom on my another phone. This rom has this feature.
Hi! everything after install it'ok. battery drain ok. excellent fluidity in operation.
Ihave trouble only with main aperture camera because after 1 or 2 shots the app freeze and the shot key stop to working. after restart the camera app do not change anything. I have resolve problem with google camera 7.3.018....Urnyx, and open camera. These 2 app working fine.
If you have suggestion to solve problem with default camera app they are welcome
Hey @sabar_op , would you mind sharing your roomservice.xml? I'm trying to setup my local build-env for LOS20 based on your device repo's atm.
L
sabar_op said:
If you can replicate that issue and grab the log, it will be very helpful.
Click to expand...
Click to collapse
I have the same problem with the camera
Bafio66 said:
Hi! everything after install it'ok. battery drain ok. excellent fluidity in operation.
Ihave trouble only with main aperture camera because after 1 or 2 shots the app freeze and the shot key stop to working. after restart the camera app do not change anything. I have resolve problem with google camera 7.3.018....Urnyx, and open camera. These 2 app working fine.
If you have suggestion to solve problem with default camera app they are welcome
Click to expand...
Click to collapse
the main camera suddenly freezes, the application is displayed but the buttons within it do not work
The main camera suddenly freezes, the application is displayed but the buttons within it do not work, within WhatsApp many times when trying to take a photo, it says that it has a problem with the application permissions
9Lukas5 said:
Hey @sabar_op , would you mind sharing your roomservice.xml? I'm trying to setup my local build-env for LOS20 based on your device repo's atm.
L
Click to expand...
Click to collapse
See in my github for device and vendor tree..
GitHub - sabarop/device_xiaomi_platina: Dependency of Xiaomi Mi 8 Lite (platina)
Dependency of Xiaomi Mi 8 Lite (platina). Contribute to sabarop/device_xiaomi_platina development by creating an account on GitHub.
github.com
GitHub - sabarop/vendor_xiaomi_platina
Contribute to sabarop/vendor_xiaomi_platina development by creating an account on GitHub.
github.com
lewismsc said:
I have the same problem with the camera
Click to expand...
Click to collapse
I did not use whatsapp...so again please send me the log.
sabar_op said:
See in my github for device and vendor tree..
GitHub - sabarop/device_xiaomi_platina: Dependency of Xiaomi Mi 8 Lite (platina)
Dependency of Xiaomi Mi 8 Lite (platina). Contribute to sabarop/device_xiaomi_platina development by creating an account on GitHub.
github.com
GitHub - sabarop/vendor_xiaomi_platina
Contribute to sabarop/vendor_xiaomi_platina development by creating an account on GitHub.
github.com
Click to expand...
Click to collapse
I looked into the links in the OP already and tried to find out which branch in each repo is the one to go, but up to now, the build fails.
So, my roomservice.xml looks like this atm:
XML:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="sabarop" fetch="https://github.com/sabarop/" />
<project name="device_xiaomi_platina" path="device/xiaomi/platina" remote="sabarop" revision="lineage-20-eas-wip" />
<project name="vendor_xiaomi_platina" path="vendor/xiaomi/platina" remote="sabarop" revision="13" />
<project name="kernel_xiaomi_sdm660_clover" path="kernel/xiaomi/sdm660" remote="sabarop" revision="lineage-20-4.4" />
</manifest>
After running breakfast and mka -j 4 I see the following lines before it fails:
Code:
out/soong/make_vars-lineage_platina.mk was modified, regenerating...
[ 99% 474/475] finishing build rules ...
FAILED:
build/make/core/main.mk:1308: warning: device/xiaomi/platina/lineage_platina.mk includes non-existent modules in PRODUCT_PACKAGES
Offending entries:
android.hardware.power-service.xiaomi-libperfmgr
build/make/core/main.mk:1308: error: Build failed.
12:45:03 ckati failed with: exit status 1
#### failed to build some targets (11:28 (mm:ss)) ####
That's why I wanted to just see your roomservice.xml, to make sure I got all needed device specific repo's and branches right
L
9Lukas5 said:
I looked into the links in the OP already and tried to find out which branch in each repo is the one to go, but up to now, the build fails.
So, my roomservice.xml looks like this atm:
XML:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="sabarop" fetch="https://github.com/sabarop/" />
<project name="device_xiaomi_platina" path="device/xiaomi/platina" remote="sabarop" revision="lineage-20-eas-wip" />
<project name="vendor_xiaomi_platina" path="vendor/xiaomi/platina" remote="sabarop" revision="13" />
<project name="kernel_xiaomi_sdm660_clover" path="kernel/xiaomi/sdm660" remote="sabarop" revision="lineage-20-4.4" />
</manifest>
After running breakfast and mka -j 4 I see the following lines before it fails:
Code:
out/soong/make_vars-lineage_platina.mk was modified, regenerating...
[ 99% 474/475] finishing build rules ...
FAILED:
build/make/core/main.mk:1308: warning: device/xiaomi/platina/lineage_platina.mk includes non-existent modules in PRODUCT_PACKAGES
Offending entries:
android.hardware.power-service.xiaomi-libperfmgr
build/make/core/main.mk:1308: error: Build failed.
12:45:03 ckati failed with: exit status 1
#### failed to build some targets (11:28 (mm:ss)) ####
That's why I wanted to just see your roomservice.xml, to make sure I got all needed device specific repo's and branches right
L
Click to expand...
Click to collapse
Choose branch lineage-20 for device tree
sabar_op said:
Choose branch lineage-20 for device tree
Click to expand...
Click to collapse
Tried lineage-20-base first as this has quite new updates in it, but in this branch the device.mk:8 tries to call
vendor/xiaomi-firmware/platina/firmware.mk, which doesn't exist. So I switched to lineage-20-eas-wip not having this line.
Using the lineage-20 and commenting the device.mk:8 the build runs atm (didn't finish yet, but builds), thanks.
L

Categories

Resources