• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

The “Dark Humor” Thread

Slightly NSFW -

A man took his beautiful wife to play her first game of golf. The wife, reluctant to try but wanting to spend more time with her husband, promptly sliced her first shot. It went right through the window of the biggest homes along the course.

The husband cringed. "I warned you to be careful! Now we'll have to go over there, find the owner, apologize and see how much that wonderful drive of yours is going to cost us!"

The couple, in silence, walked to the house and knocked on the front door.

A warm voice said, "come on in."

When they opened the door, they observed the damage that was done: glass was all over the place; and a broken bottle, evidently very old, was lying on its side near the pieces of window glass.

A man reclining on the couch asked, "are you the people who broke that window?"

“Uh, yes sir,” the husband replied, “and we're terribly sorry about that…"

“Oh, no apology is necessary!” the man said. “In fact, I want to thank you. You see, I'm actually a genie, and I've been trapped in that bottle for over a thousand years.”

“Now that you've released me,” he continued, “I'm allowed to grant three wishes. I'll give each of you one wish: but if you don't object, I'd like to reserve the last wish for myself."

“Wow, that's amazing!" The husband said. He pondered a moment and blurted out, "I'd like a million dollars a year for the rest of my life!"

“No problem," said the genie. "You've got it, it's the least I can do. Additionally, I'll guarantee you a long, healthy life! And you, young lady, what do you want?"

The wife, flattered at being called a young lady, replied, “I'd like to own a gorgeous home in every country in the world… complete with service staff."

“Consider it done," the genie said. "Soon, the deeds will begin to arrive at your home, free and clear of all mortgages. And your homes will always be safe from fire, burglary and natural disasters."

Completely flustered by the good fortune of an unfortunate golf swing, the couple asked, “and now, what's your wish, Genie?"

The genie looked at the couple solemnly, and then turned to the man.

“Please understand that I've been trapped in that bottle, all alone, for more than a thousand years. I haven't been with a woman in all those centuries. My wish, should you see fit to grant it, Sir, is to have sex with your wife."

Initially shocked by the proposal, the couple looked at one another. The husband looked at his wife and said, "gee, Honey, you know we both now have a fortune, and all those houses and staff… and it’s because of him! What do you think?"

She looked at the genie, who wasn’t unattractive at all; and back at her husband. She mulled it over for a moment more and replied, "you know, you're right. Considering our good fortune, I guess I wouldn't mind… but what about you, Baby? Will you be okay with it?"

“You know I love you, Sweetheart," the husband said. “I'd do the same for you!"

The genie thanked them and assured the couple that, because of their generous granting of his wish, the house would be cleaned and repaired at no cost to them.

The husband sat and waited nervously while the genie went upstairs with his wife. There, they spent the rest of the afternoon enjoying each other immensely.

The genie was insatiable. The woman, shocked by his stamina and skill, was breathless… and was surprised that she never wanted it to end.

After about four hours of non-stop sex, however, they snuggled warmly into each other’s arms. The genie looked directly into her eyes, smiled and asked, "I’m curious to know… what ages are you and your husband?”

“We're actually both 35," she replied, still trying to regain her composure.

“No kidding?" he responded. "Thirty-five years old… and you both still believe in genies?"

:)

Help Gallery problem

Those are excellent questions - but I don't believe you can password-protect individual apps by default. There are two options for you:

1- Use the Secure Folder for your photos. This is essentially a phone within a phone... photos, videos and other data stored in the Secure Folder are not in your regular phone's storage. You can move files in and out of the Secure Folder, which requires additional login to access.

2 - Use a 3rd party app like AppLock to add password protection to each app.

As far as WhatsApp downloads, they have to download somewhere... and the Gallery app automatically detects them. There should be a setting to exclude the Downloads folder from being scanned by the gallery app.

How i download a Stock Rom with a Micro SD Card?

Also you can't install a stock rom via SD card. You need a computer program to do it called Odin. The only way to do what you are asking is to root the device and have a custom recovery installed on the phone. But even rooting you still need a computer.
Unless the phone is already rooted - the OP hasn't answered any questions about what they are trying to do or what the state and status of the phone is.

All of which makes me suspect that my initial guess, that they are trying to bypass factory reset protection, is correct.

Calling an activity from class PintService

Grazie per la risposta. Hai ragione, oltre al codice, che ho anche intuito, sai dov'era il problema? Solo nel filtro intent in particolare nel tag type. Grazie lo stesso, ottima risposta. Buon 2023!!!!
this is an english only site.

use Google Translate
Thanks for the reply. You are right, besides the code, which I also guessed, do you know where the problem was? Only in the intent filter specifically in the type tag. Thanks all the same, great answer. Happy 2023!!!!

Pocket sized Android phone suggestions

You'll probably need to expand your budget to buy a smaller form-factor phone. Those are considered to be limited, niche market phones so they're priced accordingly. Unfortunately the trend with Android phones is to make them larger and thinner even though the overall consumer demand for those two aspects isn't actually there. I know from my perspective I don't want to deal with using a tablet-sized phone but whatever.
You'll find a lot more viable options online though, most retail stores have a rather limited number of options to choose from.

Facing problem with code

It looks like there is a problem with the line findViewById<SeekBar>(R.id.seekBar), which is not being used in the rest of the code.

One possible solution would be to remove this line from the code, as it is not being used and is likely causing the build to fail.

Here is the revised code:

Code:
@RequiresApi(Build.VERSION_CODES.M)
override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_main)

    val rollButton=findViewById<Button>(R.id.rollButton)
    val resultsTextview=findViewById<TextView>(R.id.resultsTextView)

    rollButton.setOnClickListener {
        val rand=Random().nextInt(SeekBar.generateViewId())
        resultsTextview.text=rand.toString()
    }
}

I hope this helps! Let me know if you have any questions.

Android NFCAdapter - Issue with AuthenticateSectorWithKeyA & Hex

It's possible that the issue may be related to the way that the key is being converted to a byte array. Make sure that you are using the correct syntax to convert the hexadecimal string to a byte array.

Here is an example of how you can convert the hexadecimal string to a byte array:

Code:
string hexString = "192386180500";
byte[] keybytes = new byte[hexString.Length / 2];
for (int i = 0; i < keybytes.Length; i++)
{
  keybytes[i] = Convert.ToByte(hexString.Substring(i * 2, 2), 16);
}

Alternatively, you can use the BitConverter.GetBytes method to convert the hexadecimal string to a byte array:

Code:
string hexString = "192386180500";
byte[] keybytes = BitConverter.GetBytes(long.Parse(hexString, System.Globalization.NumberStyles.HexNumber));

Once you have the keybytes array, you can pass it to the AuthenticateSectorWithKeyA method as usual.

It's also a good idea to double-check the value of the key that you are trying to use, as it's possible that there may be an issue with the key itself.

I hope this helps! Let me know if you have any questions.

Apps Inifite Step Counter app

To persist the step count across device reboots, you can use shared preferences to store the total step count.

Here is an example of how you can implement this:

Code:
// Get an instance of shared preferences
val sharedPreferences = getSharedPreferences("STEP_COUNTER_PREFS", Context.MODE_PRIVATE)

// Get the current total step count from shared preferences
val totalSteps = sharedPreferences.getInt("TOTAL_STEPS", 0)

// Register the step counter sensor listener
sensorManager.registerListener(object : SensorEventListener {
  override fun onAccuracyChanged(sensor: Sensor?, accuracy: Int) {}

  override fun onSensorChanged(event: SensorEvent?) {
    // Increment the total step count by the number of steps taken
    totalSteps += event?.values?.get(0)?.toInt() ?: 0

    // Save the updated total step count to shared preferences
    sharedPreferences.edit().putInt("TOTAL_STEPS", totalSteps).apply()
  }
}, stepSensor, SensorManager.SENSOR_DELAY_UI)

This code will read the current total step count from shared preferences when the app starts, and then use a sensor listener to increment the total step count every time the step sensor fires an event. The updated total step count is then saved back to shared preferences.

This way, the total step count will be persisted across device reboots, and you can retrieve the current total step count from shared preferences at any time by calling getInt("TOTAL_STEPS").

I hope this helps! Let me know if you have any questions.

Android BLE write data on multiple BLE h/w simultaneously

In order to write data to multiple BLE devices simultaneously, you will need to write to each device in turn using separate BluetoothGatt objects.

You can do this by creating a separate BluetoothGatt object for each device, and then using the writeCharacteristic method on each BluetoothGatt object to write data to the corresponding device.

Here is an example of how you might write data to multiple BLE devices simultaneously:

Code:
for (int i = 0; i < numDevices; i++) {
  BluetoothGatt gatt = mBluetoothGatt[i];
  BluetoothGattCharacteristic charac = btWriteGattChar[i];
  charac.setWriteType(BluetoothGattCharacteristic.WRITE_TYPE_NO_RESPONSE);
  charac.setValue(dat);
  gatt.writeCharacteristic(charac);
}

Note that writing to multiple BLE devices simultaneously may take longer than writing to a single device, as each write operation will need to be performed in sequence. You may need to adjust your code to account for this.

It's also worth noting that some BLE devices may not support concurrent write operations, in which case you may need to implement some kind of queueing mechanism to ensure that writes are performed in the correct order.

React Native Android build failing with 'compileDebugJavaWithJavac' on several packages

There are a few other things you can try if you are still having issues with the build failing:

  1. Try running react-native run-android from the command line to see if there are any additional error messages that can help identify the issue.

  2. Make sure that you have the latest version of the Android SDK and build tools installed. You can check for updates in the Android Studio SDK Manager.

  3. Make sure that you have the correct version of the Android Support Repository and Google Repository dependencies installed. You can check for updates in the Android Studio SDK Manager.

  4. Try deleting the node_modules directory and running npm install or yarn install again to make sure all of your dependencies are up to date.

  5. If you have recently updated any dependencies or libraries, it is possible that there may be compatibility issues. You can try downgrading to a previous version of the dependency to see if that resolves the issue.

  6. If none of the above steps help, you can try cleaning the project by going to "Build > Clean Project" in Android Studio.
It is also a good idea to check the React Native documentation and the documentation for any libraries you are using to see if there are any known issues or breaking changes that may be causing the build to fail.

Need Help Please

To create a balance and inventory system for your fake bank app, you can follow these steps:

  1. Create a class to represent the items that can be purchased. This class should include variables to store the name, price, and any other relevant information about the item. For example:
Code:
class Item {
  private String name;
  private int price;
  // Other variables and methods
}

  1. Create a class to represent the user's balance and inventory. This class should include a variable to store the user's balance, and a list to store the items that the user has purchased. For example:
Code:
class User {
  private int balance;
  private List<Item> inventory;
 
  // Constructor to initialize balance and inventory
  public User(int balance) {
    this.balance = balance;
    this.inventory = new ArrayList<>();
  }
 
  // Method to purchase an item
  public void buyItem(Item item) {
    if (item.getPrice() <= balance) {
      balance -= item.getPrice();
      inventory.add(item);
    } else {
      // Insufficient funds
    }
  }
 
  // Other methods to get balance and inventory
}

  1. In your app's main activity, create an instance of the User class and initialize it with the starting balance. You can then use the buyItem() method to allow the user to purchase items from the app.

  2. To display the user's balance and inventory, you can create a separate activity or fragment to show this information. You can use a RecyclerView to display the items in the user's inventory, and display the balance using a TextView or similar widget.
I hope this helps! Let me know if you have any questions.

Valu Event listener being skipped for firebase database

It looks like the issue is with the requestitems ArrayList, which is being used to store the Requestitem objects that are retrieved from the database. This ArrayList is being passed to the RequestAdapter as the data source, but it has not been initialized.

To fix this, you can initialize the requestitems ArrayList before the ValueEventListener is added. This will ensure that the ArrayList is not null when the data is being added to it in the onDataChange() method.

Try adding this line at the beginning of the onViewCreated() method:

Code:
requestitems = new ArrayList<>();

This will create a new empty ArrayList and assign it to the requestitems variable. The ValueEventListener will then be able to add items to the ArrayList without encountering a null pointer exception.

I hope this helps! Let me know if you have any questions or if you need further assistance.

Microsoft word edit doc

Seriously! I edit a document year round for gifts I find & hide for special occasions; as well as a record of my volunteer work. My Darling Bride keeps schedules of upcoming fly fishing outings, and who knows what else. Neither of us feel a need to grab the other's phone and start digging. If we do, there's a trust issue that we need to resolve quickly.

MetroPCS greatly increased phone prices. Why?

Where are you seeing these prices? Looking on tne Metro site the prices on those phones are much lower than your numbers here and there are deals that can make them very cheap or even free (new customer or adding a new line to an existing account).
As stated you do have BYOD as an option. In addition to buying new from Amazon, Best Buy etc. you may also want to check out the offerings on Swappa. New and used devices are available there at good prices.

Can someone help please

Exactly - it sounds like there's already a high level of distrust in the relationship. There is a reason he doesn't trust you, and you don't trust him. That needs correcting, with counseling and lots of open communication, or else the best thing to do (as painful as it is in the short term) is to agree to part ways amicably. (This is advice from an old Navy Chief who just passed 32 years of marriage) Just sayin'

Help Mysterious "Crown" App Symbol (most likely android) - Help for identification

I don't know what an "action bar" is, though this looks like a notification. Does it appear on the right (typically system notifications) or left (app notifications)?

The problem is that there are literally millions of apps, so unless this is a well-known one the odds of anyone reading this knowing what it is are slim. If this is on your own phone pull the notification slide down and you'll be able to see what it is. If, as is more common with these queries, it's on someone else's and you've just seen it in a screenshot, the simplest answer will be to ask the person whose phone it is. You could try a reverse image search on the image you've uploaded and see whether that finds anything.

If you want my guesses, games and gambling apps are the first things I think of when I see this, but it could be almost anything.

Filter

Back
Top Bottom