Posts

Showing posts with the label android

Throwing Water Balloons at People Prank

Video Channel: RebelTV Play our new game: Pie Smash ► iPhone http://goo.gl/zXgD4R ► Android http://goo.gl/yoM5Th New Pranks every Tuesday 6 PM EST Make sure to Subscribe and turn on Post Notifications 🔔 In this video we took a bunch of water balloons and popped them on people, for our camera equipment we use Sony, Cannon, and Lumix cameras. For audio we use Android and Apple cell phones to capture the sound. const player = new window.Plyr('#player', {keyboard: {global: true,},tooltips: {controls: true,},captions: {active: true,},iconUrl: '/js/plyr.svg',autoplay: true});player.source = {type: 'video',sources: [{src: '//youtube.com/watch?v=kU0oEhE8gzs',provider: 'youtube',}],}; Throwing Water Balloons at People Prank Download var switchTo5x=true;stLight.options({publisher: "8370abff-a8c4-40e1-9890-b965a65c3b93", doNotHash: false, doNotCopy: false, hashAddressBar: false}); Throwing Water Balloons at People Prank Video Channel: RebelTV ...

LoginButton from Facebook SDK is null

LoginButton from Facebook SDK is null I'm using FB SDK and LoginButton is null even if the UI shows it right. JAVA: loginButton = findViewById(R.id.login_button); XML: <com.facebook.login.widget.LoginButton android:id="@+id/login_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_marginTop="30dp" android:layout_marginBottom="30dp"/> GRADLE: compile 'com.facebook.android:facebook-login:4.34.0' Can you check that the layout you've set in the setContentView() is the one with the button? I often make this mistake. – Sanchita Santra Jun 30 at 10:51 This was the problem. The button was inside of one nav_header. To access the obj...

React Native error 'Unable to resolve module `react-native` '

React Native error 'Unable to resolve module `react-native` ' I am attempting to learn React Native so I went ahead and followed all the steps in the Getting Started guide at the official documentation site. I have some experience with React so i wanted to expand on it. React Native React I did wade in around 6 months ago for a simple 'hello world' app and everything worked fine for me on both the Android emulator and the IoS simulator. Did test on my device as well and had no issues. Since i got busy with other work i did not get back to it until now. The error i get when i attempt the react-native run-android command: react-native run-android Metro Bundler ready. Loading dependency graph, done. error: bundling failed: Error: Unable to resolve module `react-native` from `/Users/arunmenon/Sites/reactnative/website/index.js`: Module `react-native` does not exist in the Haste module map or in these directories: /Users/arunmenon/Sites/reactnative/website/node_modu...

firebase cloud messaging not received notification in some device

firebase cloud messaging not received notification in some device I used FCM to push notification, its work successfully in background and foreground mode, in the device that I used to debug while another device does not work in background mode. here is my code I wish ur help to know what the issue .is it from phone so how to fix it ? or from google services. here MyFirebaseInstanceIDService public class MyFirebaseInstanceIDService extends FirebaseInstanceIdService { SharedPrefManager sharedPrefManager; @Override public void onTokenRefresh() { // Get updated InstanceID token. String refreshedToken = FirebaseInstanceId.getInstance().getToken(); Log.wtf("myfirebase", "Refreshed token: " + refreshedToken); sendRegistrationToServer(refreshedToken); } public void sendRegistrationToServer(String refreshedToken ) { sharedPrefManager=new SharedPrefManager(getApplicationCon...

Nested setOnClickListener in Java / Android

Nested setOnClickListener in Java / Android I am trying to setup a onclicklistner on a dialog button. If the listener is set using bnxt.setOnClickListener(new x()); the app works as expected but if the below given 2nd implementation is used, the app crashes. Any hint or help is highly appreciated. bnxt.setOnClickListener(new OnClickListener() { ... Supplied code: class x implements OnClickListener { x() { } public void onClick(View v) { if (listener != null) { final Dialog dialog = new Dialog(getActivity()); FancyButton m_no = (FancyButton) dialog.findViewById(R.id.b_no); m_no.setOnClickListener(new OnClickListener() { public void onClick(View v) { dialog.dismiss(); } }); dialog.show(); } } } public View onCView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_x, container, fa...

How do I hide the navigation bar in the editor for android studio?

How do I hide the navigation bar in the editor for android studio? How do I make the bottom navigation bar disappear in the visual XML editor in Android Studio? I added a screenshot of the navigation bar which I want to remove. I have looked at both of these and they were no help to me. How to hide navigation bar permanently in android activity? How to emulate immersive mode in layout editor Here is the screenshot of the Navigation bar: https://imgur.com/gallery/GlmDsIs Here is my XML Code for activity_main: <?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" android:background="#474747" tools:context=".Main...

How to utilise seperate ConstraintSet actions for different TextViews in the same ConstraintLayout?

How to utilise seperate ConstraintSet actions for different TextViews in the same ConstraintLayout? My question follows on from this question: Android : How to programatically set layout_constraintRight_toRightOf "parent". I have the written the following code that should constrain the new TextView to either the left (btnSendL) or the right (btnSendR) of a ConstraintLayout. @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); final ConstraintLayout clMessagesContainer = (ConstraintLayout) findViewById(R.id.clMessagesContainer); final EditText txtMessage = (EditText) findViewById(R.id.txtMessage); Button btnSendL = (Button) findViewById(R.id.btnSendL); Button btnSendR = (Button) findViewById(R.id.btnSendR); btnSendL.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v) { TextView lblNxtMessage =...

Android WebView shouldInterceptRequest?

Android WebView shouldInterceptRequest? I need to intercept android requests. I passed an HTTPClient and implemented shouldInterceptRequest. The doc says If the return value is null, the WebView will continue to load the resource as usud But when I return the value of super or return null it breaks and won't load the webview? Any thoughts? class WebViewClientImpl(val webView: WebView): WebViewClient() { @RequiresApi(Build.VERSION_CODES.LOLLIPOP) override fun shouldInterceptRequest(view: WebView?, request: WebResourceRequest?): WebResourceResponse? { retuen null } } 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.

Items in RecyclerView in a Fragmnet don't appear

Image
Items in RecyclerView in a Fragmnet don't appear I saw there are similar post but my code is the same as the codes in the solutions so they weren't useful in my case. My app starts but and two tabs are shown. However the one that is supposed to show the items from a RecyclerView that's in it is empty.I also get this error: E/RecyclerView: No adapter attached; skipping layout So I have an Activity with a TabLayout and a ViewPager public class MainActivity extends AppCompatActivity { TabLayout tabLayout; ViewPager viewPager; PagerAdapter pagerAdapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); tabLayout=findViewById(R.id.tab_layout); viewPager=findViewById(R.id.view_pager); tabLayout.addTab(tabLayout.newTab().setText("CitiesFragment")); tabLayout.addTab(tabLayout.newTab().setText("My CitiesFragme...

Rounded corner mapbox mapView

Image
Rounded corner mapbox mapView So I'm trying to add a small mini map to my android app with a mapbox mapView. I'm trying to add rounded corners to it and I can't seem to find a way to do that. Is there a good way to do this? I know one option is to use a CardView but it doesn't seem to round the corners of the map. use any library for that. – Harshit Agrawal Jun 21 at 16:30 yes, you can do this. Follow this answer. It will help you to do that. – Sayem Jun 21 at 16:45 I don't entirely understand that method. I tried to do what the answer said but the mapbox mapview doesn't resize. Is this maybe an issue with mapbox? ...

clean code but app won't work

clean code but app won't work http://localhost:63342/-dnmx7eyt5qt81ikj125hc4xxyfyaia04pcuum/thejustjava/app/src/main/res/layout/activity_main.xml I used the following java and xml code to create justjava app (LINKS: https://gist.github.com/udacityandroid/273e1273286e5169c87d) and (https://gist.github.com/udacityandroid/609dbb5370ba0665955a) but when i try to start the app, this message appears: XML document structures must start and end within the same entity. Any assistance with this issue? show YOUR code from YOUR project. you are missing a end tag somewhere in your layout. (or other xml doc) – DroiDev Jun 29 at 19:02 Check all your xml files. try commenting out files one by one. You can narrow it down this way. Then examine carefully starting and closing of tags – Suhaib Roomy ...

IllegalStateException in MediaPlayer#Pause

IllegalStateException in MediaPlayer#Pause I uploaded my app at google console and in prelaunch report , in 2 devices only, there was this issue java.lang.IllegalStateException FATAL EXCEPTION: ControllerMessenger Process: com.wolframite.manos.crack_the_code, PID: 11744 java.lang.IllegalStateException at android.media.MediaPlayer.isPlaying(Native Method) at com.wolframite.manos.crack_the_code.Music$1.onReceive(Music.java:36) at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:311) at android.support.v4.content.LocalBroadcastManager.access$000(LocalBroadcastManager.java:47) at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:120) at android.os.Handler.dispatchMessage(Handler.java:102) at android.support.test.espresso.base.Interrogator.a(Interrogator.java:19) at android.support.test.espresso.base.UiControllerImpl.a(UiControllerImpl.java:142) at android.support.test.espresso.base.UiControllerIm...

How to know if array list is empty in java?

How to know if array list is empty in java? my array is like as below: unitList = new ArrayList<String>( Arrays. asList(result.getJSONObject( position ). getString( "units" ).replace("[", ""). replace("]", ""). split(","))); I want to know if it have at least one element in this array, when I use this function: unitList.size() it return this: 06-30 02:04:51.453 18653-18653/search.bert.searchviewtest I/unitList.size: 1 06-30 02:04:51.453 18653-18653/search.bert.searchviewtest I/unitList: 06-30 02:04:56.123 18653-18653/search.bert.searchviewtest I/unitList.size: 6 06-30 02:04:56.123 18653-18653/search.bert.searchviewtest I/unitList: ["1", "2", "3", "4", "5", "6"] This is very strange, because do not have any element, but it return 1. If the list is ["1"], will it also return 1? ...

Adding Android Studio Project to new git Repository

Adding Android Studio Project to new git Repository I create a new repository from bitbucket and create new android project want to add in a new repository but whenever I do the old android bitbucket project added to new repository along with the new Android project, I want only one project with one repository, I tried all nothing is working, I have also changed url from git bash but whenever I add, commit and push project from android studio, it also show old project hierarchy in push window and it pushes to new repository. I don't want to add old project with new repository. I tried many command rehead,rebash etc etc..any help will be appreciated What is the directory structure of your two projects? I mean, are both projects in the same directory? Does that parent directory have a .git directory? (Be sure to "show hidden files" in order to check.) – Code-Apprentice Jun 29 at 18:11 ...